From d0741c4a635d2192e1285e7ea6f739d609f74d15 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Fri, 21 Oct 2011 10:47:07 +0600 Subject: [PATCH] Cleanup for dcpj125 family drivers --- .../brcupsconfig/Makefile | 0 .../brcupsconfig/brcups_commands.h | 0 .../brcupsconfig/brcupsconfig.c | 0 .../cupswrapperdcpj125 | 0 .../cupswrapperdcpj315w | 0 .../cupswrapperdcpj515w | 0 .../cupswrapperdcpj715w | 0 .../cupswrappermfcj220 | 0 .../cupswrappermfcj265w | 0 .../cupswrappermfcj270w | 0 .../cupswrappermfcj410 | 0 .../cupswrappermfcj410w | 0 .../cupswrappermfcj415w | 0 .../cupswrappermfcj615w | 0 .../cupswrappermfcj630w | 0 .../ppd}/dcpj125.ppd | 0 .../ppd}/dcpj315w.ppd | 0 .../ppd}/dcpj515w.ppd | 0 .../ppd}/dcpj715w.ppd | 0 .../ppd}/mfcj220.ppd | 0 .../ppd}/mfcj265w.ppd | 0 .../ppd}/mfcj270w.ppd | 0 .../ppd}/mfcj410.ppd | 0 .../ppd}/mfcj410w.ppd | 0 .../ppd}/mfcj415w.ppd | 0 .../ppd}/mfcj615w.ppd | 0 .../ppd}/mfcj630w.ppd | 0 dcpj125cupswrapper-1.1.1-3/Copying | 341 ---------- dcpj315wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- dcpj515wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- dcpj715wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj220cupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj265wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj270wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj410cupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj410wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj415wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj615wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- mfcj630wcupswrapper-1.1.1-3/Copying | 341 ---------- .../brcupsconfig/Makefile | 89 --- .../brcupsconfig/brcups_commands.h | 590 ------------------ .../brcupsconfig/brcupsconfig.c | 585 ----------------- 72 files changed, 17996 deletions(-) rename {dcpj125cupswrapper-1.1.1-3 => cupswrapperdcpj125-1.1.1-3}/brcupsconfig/Makefile (100%) mode change 100755 => 100644 rename {dcpj125cupswrapper-1.1.1-3 => cupswrapperdcpj125-1.1.1-3}/brcupsconfig/brcups_commands.h (100%) mode change 100755 => 100644 rename {dcpj125cupswrapper-1.1.1-3 => cupswrapperdcpj125-1.1.1-3}/brcupsconfig/brcupsconfig.c (100%) mode change 100755 => 100644 rename {dcpj125cupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrapperdcpj125 (100%) mode change 100755 => 100644 rename {dcpj315wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrapperdcpj315w (100%) mode change 100755 => 100644 rename {dcpj515wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrapperdcpj515w (100%) mode change 100755 => 100644 rename {dcpj715wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrapperdcpj715w (100%) mode change 100755 => 100644 rename {mfcj220cupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj220 (100%) mode change 100755 => 100644 rename {mfcj265wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj265w (100%) mode change 100755 => 100644 rename {mfcj270wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj270w (100%) mode change 100755 => 100644 rename {mfcj410cupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj410 (100%) mode change 100755 => 100644 rename {mfcj410wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj410w (100%) mode change 100755 => 100644 rename {mfcj415wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj415w (100%) mode change 100755 => 100644 rename {mfcj615wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj615w (100%) mode change 100755 => 100644 rename {mfcj630wcupswrapper-1.1.1-3/PARTS => cupswrapperdcpj125-1.1.1-3}/cupswrappermfcj630w (100%) mode change 100755 => 100644 rename {dcpj125cupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/dcpj125.ppd (100%) mode change 100755 => 100644 rename {dcpj315wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/dcpj315w.ppd (100%) mode change 100755 => 100644 rename {dcpj515wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/dcpj515w.ppd (100%) mode change 100755 => 100644 rename {dcpj715wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/dcpj715w.ppd (100%) mode change 100755 => 100644 rename {mfcj220cupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj220.ppd (100%) mode change 100755 => 100644 rename {mfcj265wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj265w.ppd (100%) mode change 100755 => 100644 rename {mfcj270wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj270w.ppd (100%) mode change 100755 => 100644 rename {mfcj410cupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj410.ppd (100%) mode change 100755 => 100644 rename {mfcj410wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj410w.ppd (100%) mode change 100755 => 100644 rename {mfcj415wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj415w.ppd (100%) mode change 100755 => 100644 rename {mfcj615wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj615w.ppd (100%) mode change 100755 => 100644 rename {mfcj630wcupswrapper-1.1.1-3/PPD => cupswrapperdcpj125-1.1.1-3/ppd}/mfcj630w.ppd (100%) mode change 100755 => 100644 delete mode 100755 dcpj125cupswrapper-1.1.1-3/Copying delete mode 100755 dcpj315wcupswrapper-1.1.1-3/Copying delete mode 100755 dcpj315wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 dcpj515wcupswrapper-1.1.1-3/Copying delete mode 100755 dcpj515wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 dcpj715wcupswrapper-1.1.1-3/Copying delete mode 100755 dcpj715wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj220cupswrapper-1.1.1-3/Copying delete mode 100755 mfcj220cupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj265wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj265wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj270wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj270wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj410cupswrapper-1.1.1-3/Copying delete mode 100755 mfcj410cupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj410wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj410wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj415wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj415wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj615wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj615wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c delete mode 100755 mfcj630wcupswrapper-1.1.1-3/Copying delete mode 100755 mfcj630wcupswrapper-1.1.1-3/brcupsconfig/Makefile delete mode 100755 mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h delete mode 100755 mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c diff --git a/dcpj125cupswrapper-1.1.1-3/brcupsconfig/Makefile b/cupswrapperdcpj125-1.1.1-3/brcupsconfig/Makefile old mode 100755 new mode 100644 similarity index 100% rename from dcpj125cupswrapper-1.1.1-3/brcupsconfig/Makefile rename to cupswrapperdcpj125-1.1.1-3/brcupsconfig/Makefile diff --git a/dcpj125cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/cupswrapperdcpj125-1.1.1-3/brcupsconfig/brcups_commands.h old mode 100755 new mode 100644 similarity index 100% rename from dcpj125cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h rename to cupswrapperdcpj125-1.1.1-3/brcupsconfig/brcups_commands.h diff --git a/dcpj125cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/cupswrapperdcpj125-1.1.1-3/brcupsconfig/brcupsconfig.c old mode 100755 new mode 100644 similarity index 100% rename from dcpj125cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c rename to cupswrapperdcpj125-1.1.1-3/brcupsconfig/brcupsconfig.c diff --git a/dcpj125cupswrapper-1.1.1-3/PARTS/cupswrapperdcpj125 b/cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj125 old mode 100755 new mode 100644 similarity index 100% rename from dcpj125cupswrapper-1.1.1-3/PARTS/cupswrapperdcpj125 rename to cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj125 diff --git a/dcpj315wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj315w b/cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj315w old mode 100755 new mode 100644 similarity index 100% rename from dcpj315wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj315w rename to cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj315w diff --git a/dcpj515wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj515w b/cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj515w old mode 100755 new mode 100644 similarity index 100% rename from dcpj515wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj515w rename to cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj515w diff --git a/dcpj715wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj715w b/cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj715w old mode 100755 new mode 100644 similarity index 100% rename from dcpj715wcupswrapper-1.1.1-3/PARTS/cupswrapperdcpj715w rename to cupswrapperdcpj125-1.1.1-3/cupswrapperdcpj715w diff --git a/mfcj220cupswrapper-1.1.1-3/PARTS/cupswrappermfcj220 b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj220 old mode 100755 new mode 100644 similarity index 100% rename from mfcj220cupswrapper-1.1.1-3/PARTS/cupswrappermfcj220 rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj220 diff --git a/mfcj265wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj265w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj265w old mode 100755 new mode 100644 similarity index 100% rename from mfcj265wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj265w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj265w diff --git a/mfcj270wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj270w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj270w old mode 100755 new mode 100644 similarity index 100% rename from mfcj270wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj270w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj270w diff --git a/mfcj410cupswrapper-1.1.1-3/PARTS/cupswrappermfcj410 b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj410 old mode 100755 new mode 100644 similarity index 100% rename from mfcj410cupswrapper-1.1.1-3/PARTS/cupswrappermfcj410 rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj410 diff --git a/mfcj410wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj410w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj410w old mode 100755 new mode 100644 similarity index 100% rename from mfcj410wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj410w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj410w diff --git a/mfcj415wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj415w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj415w old mode 100755 new mode 100644 similarity index 100% rename from mfcj415wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj415w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj415w diff --git a/mfcj615wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj615w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj615w old mode 100755 new mode 100644 similarity index 100% rename from mfcj615wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj615w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj615w diff --git a/mfcj630wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj630w b/cupswrapperdcpj125-1.1.1-3/cupswrappermfcj630w old mode 100755 new mode 100644 similarity index 100% rename from mfcj630wcupswrapper-1.1.1-3/PARTS/cupswrappermfcj630w rename to cupswrapperdcpj125-1.1.1-3/cupswrappermfcj630w diff --git a/dcpj125cupswrapper-1.1.1-3/PPD/dcpj125.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/dcpj125.ppd old mode 100755 new mode 100644 similarity index 100% rename from dcpj125cupswrapper-1.1.1-3/PPD/dcpj125.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/dcpj125.ppd diff --git a/dcpj315wcupswrapper-1.1.1-3/PPD/dcpj315w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/dcpj315w.ppd old mode 100755 new mode 100644 similarity index 100% rename from dcpj315wcupswrapper-1.1.1-3/PPD/dcpj315w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/dcpj315w.ppd diff --git a/dcpj515wcupswrapper-1.1.1-3/PPD/dcpj515w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/dcpj515w.ppd old mode 100755 new mode 100644 similarity index 100% rename from dcpj515wcupswrapper-1.1.1-3/PPD/dcpj515w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/dcpj515w.ppd diff --git a/dcpj715wcupswrapper-1.1.1-3/PPD/dcpj715w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/dcpj715w.ppd old mode 100755 new mode 100644 similarity index 100% rename from dcpj715wcupswrapper-1.1.1-3/PPD/dcpj715w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/dcpj715w.ppd diff --git a/mfcj220cupswrapper-1.1.1-3/PPD/mfcj220.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj220.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj220cupswrapper-1.1.1-3/PPD/mfcj220.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj220.ppd diff --git a/mfcj265wcupswrapper-1.1.1-3/PPD/mfcj265w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj265w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj265wcupswrapper-1.1.1-3/PPD/mfcj265w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj265w.ppd diff --git a/mfcj270wcupswrapper-1.1.1-3/PPD/mfcj270w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj270w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj270wcupswrapper-1.1.1-3/PPD/mfcj270w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj270w.ppd diff --git a/mfcj410cupswrapper-1.1.1-3/PPD/mfcj410.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj410.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj410cupswrapper-1.1.1-3/PPD/mfcj410.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj410.ppd diff --git a/mfcj410wcupswrapper-1.1.1-3/PPD/mfcj410w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj410w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj410wcupswrapper-1.1.1-3/PPD/mfcj410w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj410w.ppd diff --git a/mfcj415wcupswrapper-1.1.1-3/PPD/mfcj415w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj415w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj415wcupswrapper-1.1.1-3/PPD/mfcj415w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj415w.ppd diff --git a/mfcj615wcupswrapper-1.1.1-3/PPD/mfcj615w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj615w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj615wcupswrapper-1.1.1-3/PPD/mfcj615w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj615w.ppd diff --git a/mfcj630wcupswrapper-1.1.1-3/PPD/mfcj630w.ppd b/cupswrapperdcpj125-1.1.1-3/ppd/mfcj630w.ppd old mode 100755 new mode 100644 similarity index 100% rename from mfcj630wcupswrapper-1.1.1-3/PPD/mfcj630w.ppd rename to cupswrapperdcpj125-1.1.1-3/ppd/mfcj630w.ppd diff --git a/dcpj125cupswrapper-1.1.1-3/Copying b/dcpj125cupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/dcpj125cupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/dcpj315wcupswrapper-1.1.1-3/Copying b/dcpj315wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/dcpj315wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/dcpj315wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/dcpj515wcupswrapper-1.1.1-3/Copying b/dcpj515wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/dcpj515wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/dcpj515wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/dcpj715wcupswrapper-1.1.1-3/Copying b/dcpj715wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/dcpj715wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/dcpj715wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj220cupswrapper-1.1.1-3/Copying b/mfcj220cupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj220cupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj220cupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj220cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj265wcupswrapper-1.1.1-3/Copying b/mfcj265wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj265wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj265wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj270wcupswrapper-1.1.1-3/Copying b/mfcj270wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj270wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj270wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj410cupswrapper-1.1.1-3/Copying b/mfcj410cupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj410cupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj410cupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj410cupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj410wcupswrapper-1.1.1-3/Copying b/mfcj410wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj410wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj410wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj415wcupswrapper-1.1.1-3/Copying b/mfcj415wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj415wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj415wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj615wcupswrapper-1.1.1-3/Copying b/mfcj615wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj615wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj615wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -}; diff --git a/mfcj630wcupswrapper-1.1.1-3/Copying b/mfcj630wcupswrapper-1.1.1-3/Copying deleted file mode 100755 index b830682..0000000 --- a/mfcj630wcupswrapper-1.1.1-3/Copying +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/Makefile b/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/Makefile deleted file mode 100755 index 3235c81..0000000 --- a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Makefile for building brcupsconfpt1 -# Generated by tmake at 10:00, 2010/02/26 -# Project: brcupsconfpt1 -# Template: app -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = gcc -CFLAGS = -pipe -Wall -W -O2 -CXXFLAGS= -pipe -Wall -W -O2 -INCPATH = -I../common -LINK = gcc -LFLAGS = -LIBS = $(SUBLIBS) -MOC = $(QTDIR)/bin/moc -UIC = $(QTDIR)/bin/uic - -TAR = tar -cf -GZIP = gzip -9f - -####### Files - -HEADERS = brcups_commands.h -SOURCES = brcupsconfig.c -OBJECTS = brcupsconfig.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = -TARGET = brcupsconfpt1 -INTERFACE_DECL_PATH = . - -####### Implicit rules - -.SUFFIXES: .cpp .cxx .cc .C .c - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< - -####### Build rules - - -all: $(TARGET) - -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) - -moc: $(SRCMOC) - -tmake: Makefile - -Makefile: brcupsconfpt1.pro - tmake brcupsconfpt1.pro -o Makefile - -dist: - $(TAR) brcupsconfpt1.tar brcupsconfpt1.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) - $(GZIP) brcupsconfpt1.tar - -clean: - -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) - -rm -f *~ core - -####### Sub-libraries - - -###### Combined headers - - -####### Compile - -brcupsconfig.o: brcupsconfig.c - diff --git a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h b/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h deleted file mode 100755 index c6bd93b..0000000 --- a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcups_commands.h +++ /dev/null @@ -1,590 +0,0 @@ -/* $Id: brcups_commands.h,v 1.11 2005/08/22 02:20:49 cvs Exp $ */ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 -//* -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - -#ifndef _BRCUPS_COMMANDS_H_ -#define _BRCUPS_COMMANDS_H_ - -#ifndef _BRPRINTER_ /*BRPRINTER*/ -#define _BRPRINTER_ -#endif /*_BRPRINTER_*/ - - - - -char brprintconf[30]="brprintconf"; - -typedef struct { - char *option; - char *value; -} CMDLINELIST; - -// +++++++++++++++++++++++++++ -// command line (Brother command) -// +++++++++++++++++++++++++++ - -CMDLINELIST commandlinelist[] = { - // Collate - { "Collate=OFF" , "-collate OFF" }, - { "Collate=ON" , "-collate ON" }, - // Media -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "BRColorMediaType=Plain" , "-md Plain" }, - { "BRColorMediaType=Inkjet" , "-md Inkjet" }, - { "BRColorMediaType=BrotherGlossy" , "-md BrotherGlossy" }, - { "BRColorMediaType=Glossy" , "-md Glossy" }, - { "BRColorMediaType=Transparencies" , "-md Transparencies" }, - -#endif /*_BRPRINTER_*/ - - // RResolution - { "BRResolution=150x150dpi" , "-reso 150x150dpi" }, - { "BRResolution=300x300dpi" , "-reso 300x300dpi" }, - { "BRResolution=600x600dpi" , "-reso 600x600dpi" }, - { "BRResolution=1200x1200dpi" , "-reso 1200x1200dpi" }, - { "BRResolution=1200x2400dpi" , "-reso 1200x2400dpi" }, - { "BRResolution=1200x6000dpi" , "-reso 1200x6000dpi" }, - - // BiDirPrint - { "BRBiDir=OFF" , "-bidir OFF" }, - { "BRBiDir=ON" , "-bidir ON" }, - { "noBRBiDir" , "-bidir OFF" }, - { "BRBiDir" , "-bidir ON" }, - - // Mirror -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "MirrorPrint=OFF" , "-mirro False" }, - { "MirrorPrint=ON" , "-mirro True" }, - { "noBrMirror" , "-mirro False" }, // For Debian - { "BrMirror" , "-mirro True" }, // For Debian -#else - { "MirrorPrint=OFF" , "-mirro OFF" }, - { "MirrorPrint=ON" , "-mirro ON" }, - { "NoMirrorPrint" , "-mirro OFF" }, - { "MirrorPrint" , "-mirro ON" }, -#endif - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BRInputSlot=AutoSelect", "-feed AutoSelect" }, - { "BRInputSlot=Tray1" , "-feed Tray1" }, - { "BRInputSlot=Tray2" , "-feed Tray2" }, -#endif - - // BRMonoColor - { "BRMonoColor=Color" , "-corm Color" }, - { "BRMonoColor=Mono" , "-corm Mono" }, - - -// Paper - - -#ifdef _BRPRINTER_ - - { "PageSize=BrA3_S", "-pt BrA3_S" }, - { "PageSize=BrA3_A3", "-pt BrA3_A3" }, - { "PageSize=BrA3_B_S", "-pt BrA3_B_S" }, - { "PageSize=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "PageSize=B4", "-pt B4" }, - { "PageSize=BrB4_S", "-pt BrB4_S" }, - { "PageSize=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "PageSize=BrB4_B_S", "-pt BrB4_B_S" }, - { "PageSize=Tabloid", "-pt Tabloid" }, - { "PageSize=BrLedger_S", "-pt BrLedger_S" }, - { "PageSize=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "PageSize=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif - { "PageSize=A4", "-pt A4" }, - { "PageSize=BrA4_B", "-pt BrA4_B" }, - { "PageSize=Letter", "-pt Letter" }, - { "PageSize=BrLetter_B", "-pt BrLetter_B" }, - { "PageSize=Legal", "-pt Legal" }, - { "PageSize=Executive", "-pt Executive" }, - { "PageSize=B5", "-pt B5" }, - { "PageSize=A5", "-pt A5" }, - { "PageSize=A6", "-pt A6" }, - { "PageSize=BrA6_B", "-pt BrA6_B" }, - { "PageSize=PostC4x6", "-pt PostC4x6" }, - { "PageSize=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "PageSize=IndexC5x8", "-pt IndexC5x8" }, - { "PageSize=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PageSize=PhotoL", "-pt PhotoL" }, - { "PageSize=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "PageSize=Photo2L", "-pt Photo2L" }, - { "PageSize=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "PageSize=Postcard", "-pt Postcard" }, - { "PageSize=BrHagaki_B", "-pt BrHagaki_B" }, - { "PageSize=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "PageSize=EnvC5", "-pt EnvC5" }, - { "PageSize=EnvDL", "-pt EnvDL" }, - { "PageSize=Env10", "-pt Env10" }, - { "PageSize=EnvMonarch", "-pt EnvMonarch" }, - { "PageSize=EnvYou4", "-pt EnvYou4" }, -#if 1 - // for Command Line -#ifdef _BRPRINTER_ /*_BRPRINTER_*/ - { "media=BrA3_S", "-pt BrA3_S" }, - { "media=BrA3_A3", "-pt BrA3_A3" }, - { "media=BrA3_B_S", "-pt BrA3_B_S" }, - { "media=BrA3_B_A3", "-pt BrA3_B_A3" }, - { "media=B4", "-pt B4" }, - { "media=BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "media=BrB4_B_B4", "-pt BrB4_B_B4" }, - { "media=BrB4_B_S", "-pt BrB4_B_S" }, - { "media=Tabloid", "-pt Tabloid" }, - { "media=BrLedger_S", "-pt BrLedger_S" }, - { "media=BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "media=BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "media=A4", "-pt A4" }, - { "media=BrA4_B", "-pt BrA4_B" }, - { "media=Letter", "-pt Letter" }, - { "media=BrLetter_B", "-pt BrLetter_B" }, - { "media=Legal", "-pt Legal" }, - { "media=Executive", "-pt Executive" }, - { "media=B5", "-pt B5" }, - { "media=A5", "-pt A5" }, - { "media=A6", "-pt A6" }, - { "media=BrA6_B", "-pt BrA6_B" }, - { "media=PostC4x6", "-pt PostC4x6" }, - { "media=BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "media=IndexC5x8", "-pt IndexC5x8" }, - { "media=BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "media=PhotoL", "-pt PhotoL" }, - { "media=BrPhotoL_B", "-pt BrPhotoL_B" }, - { "media=Photo2L", "-pt Photo2L" }, - { "media=BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "media=Postcard", "-pt Postcard" }, - { "media=BrHagaki_B", "-pt BrHagaki_B" }, - { "media=DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "media=EnvC5", "-pt EnvC5" }, - { "media=EnvDL", "-pt EnvDL" }, - { "media=Env10", "-pt Env10" }, - { "media=EnvMonarch", "-pt EnvMonarch" }, - { "media=EnvYou4", "-pt EnvYou4" }, -#endif // 1 -// Thick - { "BRColorPaperThick=Regular", "-thick Regular" }, - { "BRColorPaperThick=Thick", "-thick Thick" }, - - // Thick - { "BRDocument=Photo", "-doc Photo" }, - { "BRDocument=Graphics", "-doc Graphics" }, - { "BRDocument=Custom", "-doc Custom" }, - - // ColorMatch - { "BRColorMatching=Natural", "-cm Natural" }, - { "BRColorMatching=Vivid", "-cm Vivid" }, - { "BRColorMatching=None", "-cm None" }, - - // BRHalfTonePattern - { "BRHalfTonePattern=Diffusion", "-ht Diffusion" }, - { "BRHalfTonePattern=Dither", "-ht Dither" }, - - // BRColorEnhancement - { "BRColorEnhancement=OFF", "-ce OFF" }, - { "BRColorEnhancement=ON", "-ce ON" }, - - // BRSlowDrying - { "BRSlowDrying=OFF", "-sd OFF" }, - { "BRSlowDrying=ON", "-sd ON" }, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - //BRJpegPrint - {"BRJpeg=Recommended", "-jpeg Recommended" }, - {"BRJpeg=QualityPrior", "-jpeg QualityPrior" }, - {"BRJpeg=SpeedPrior", "-jpeg SpeedPrior" }, - //BRReversePrint - {"BRReverse=ON","-rev ON"}, - {"BRReverse=OFF","-rev OFF"}, - - // Duplex - { "BRDuplex=None" , "-duplex None" }, - { "BRDuplex=DuplexTumble" , "-duplex DuplexTumble" }, - { "BRDuplex=DuplexNoTumble" , "-duplex DuplexNoTumble" }, - - // Manul Duplex - { "BRManualDuplex=Even" , "-manualduplex Even" }, - { "BRManualDuplex=Odd" , "-manualduplex Odd" }, - { "BRManualDuplex=OFF" , "-manualduplex OFF" }, - - // Advanced Duplex Mode - { "BRDuplexMode=Normal" , "-advduplexmode Normal" }, - { "BRDuplexMode=Duplex1" , "-advduplexmode Duplex1" }, - { "BRDuplexMode=Duplex2" , "-advduplexmode Duplex2" }, - - -#endif /*_BRPRINTER_*/ /*BRPRINTER*/ - - { NULL , NULL }, -}; - - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_commandlinelist[] = { - { NULL , NULL }, -}; - -// +++++++++++++++++++++++++++ -// command line numerical value -// +++++++++++++++++++++++++++ -CMDLINELIST commandlinelist2[] = { - { "Copies=" , "-copy " }, - { "BRBrightness=" , "-brit " }, - { "BRContrast=" , "-cont " }, - { "Margin=" , "-margin " }, - { "BRRed=" , "-red " }, - { "BRGreen=" , "-green " }, - { "BRBlue=" , "-blue " }, - { NULL , NULL }, -}; - -/* PPD Default */ -// +++++++++++++++++++++++++++ -// PPD setting list -// +++++++++++++++++++++++++++ - -typedef struct { - char *value; - char *brcommand; -} PPDCOMMANDLIST; - - -typedef struct { - char *label; - PPDCOMMANDLIST ppdcommandlist[]; -} PPDCOMMAND; - -// ***** DefaultBRResolution ***** -PPDCOMMAND DefaultBRResolution={ - "DefaultBRResolution", - { - - { "150x150dpi" , "-reso 150x150dpi" }, - { "300x300dpi" , "-reso 300x300dpi" }, - { "600x600dpi" , "-reso 600x600dpi" }, - { "1200x1200dpi" , "-reso 1200x1200dpi" }, - { "1200x2400dpi" , "-reso 1200x2400dpi" }, - { "1200x6000dpi" , "-reso 1200x6000dpi" }, - { NULL , NULL } - } -}; - -// ***** DefaultPageSize ***** -PPDCOMMAND DefaultPageSize={ - "DefaultPageSize", - { -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "BrA3_S", "-pt BrA3_S" }, - { "BrA3_A3", "-pt BrA3_A3" }, - { "BrA3_B_S", "-pt BrA3_B_S" }, - { "BrA3_B_A3", "-pt BrA3_B_A3" }, /*BRPRINTER*/ - { "B4", "-pt B4" }, - { "BrB4_S", "-pt BrB4_S" },/*BRPRINTER*/ - { "BrB4_B_B4", "-pt BrB4_B_B4" }, - { "BrB4_B_S", "-pt BrB4_B_S" }, - { "Tabloid", "-pt Tabloid" }, - { "BrLedger_S", "-pt BrLedger_S" }, - { "BrLedger_B_Ledger", "-pt BrLedger_B_Ledger" }, - { "BrLedger_B_S", "-pt BrLedger_B_S" }, -#endif /*_BRPRINTER_*/ - { "A4", "-pt A4" }, - { "BrA4_B", "-pt BrA4_B" }, - { "Letter", "-pt Letter" }, - { "BrLetter_B", "-pt BrLetter_B" }, - { "Legal", "-pt Legal" }, - { "Executive", "-pt Executive" }, - { "B5", "-pt B5" }, - { "A5", "-pt A5" }, - { "A6", "-pt A6" }, - { "BrA6_B", "-pt BrA6_B" }, - { "PostC4x6", "-pt PostC4x6" }, - { "BrPostC4x6_B", "-pt BrPostC4x6_B" }, - { "IndexC5x8", "-pt IndexC5x8" }, - { "BrIndexC5x8_B", "-pt BrIndexC5x8_B" }, - { "PhotoL", "-pt PhotoL" }, - { "BrPhotoL_B", "-pt BrPhotoL_B" }, - { "Photo2L", "-pt Photo2L" }, - { "BrPhoto2L_B", "-pt BrPhoto2L_B" }, - { "Postcard", "-pt Postcard" }, - { "BrHagaki_B", "-pt BrHagaki_B" }, - { "DoublePostcardRotated", "-pt DoublePostcardRotated" }, - { "EnvC5", "-pt EnvC5" }, - { "EnvDL", "-pt EnvDL" }, - { "Env10", "-pt Env10" }, - { "EnvMonarch", "-pt EnvMonarch" }, - { "EnvYou4", "-pt EnvYou4" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRMonoColor***** -PPDCOMMAND DefaultBRMonoColor={ - "DefaultBRMonoColor", - { - { "Color" , "-corm Color" }, - { "Mono" , "-corm Mono" }, - { NULL , NULL } - } -}; - - -// ***** DefaultBRSlowDrying***** -PPDCOMMAND DefaultBRSlowDrying={ - "DefaultBRSlowDrying", - { - { "OFF", "-sd OFF" }, - { "ON" , "-sd ON" }, - { NULL , NULL } - } -}; - -// ***** DefaultBRColorMediaType***** -PPDCOMMAND DefaultBRColorMediaType={ - "DefaultBRColorMediaType", - { - -#ifdef _BRPRINTER_ /*BRPRINTER*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossyR" , "-md BrotherGlossyR" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#else /*_BRPRINTER_*/ - { "Plain" , "-md Plain" }, - { "Inkjet" , "-md Inkjet" }, - { "BrotherGlossy" , "-md BrotherGlossy" }, - { "Glossy" , "-md Glossy" }, - { "Transparencies" , "-md Transparencies" }, -#endif /*_BRPRINTER_*/ - - { NULL , NULL } - } -}; - - -// ***** DefaultBRColorPaperThick ***** -PPDCOMMAND DefaultBRColorPaperThick={ - "DefaultBRColorPaperThick", - { - { "Regular", "-thick Regular" }, - { "Thick", "-thick Thick" }, - { NULL , NULL } - } -}; - -// ******DefaultBRBiDir********** -PPDCOMMAND DefaultBRBiDir={ - "DefaultBRBiDir", - { - { "OFF" , "-bidir OFF" }, - { "ON" , "-bidir ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBrMirror********** -PPDCOMMAND DefaultBrMirrorPrint={ - "DefaultBrMirror", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "OFF" , "-mirro OFF" }, - { "ON" , "-mirro ON" }, -#else - { "OFF" , "-mirro False" }, - { "ON" , "-mirro True" }, -#endif - { NULL , NULL } - } -}; - -// ******DefaultBRDocument********** -PPDCOMMAND DefaultBRDocument={ - - - "DefaultBRDocument", - { - { "Photo", "-doc Photo" }, - { "Graphics", "-doc Graphics" }, - { "custom", "-doc Custom" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorMatching********** -PPDCOMMAND DefaultBRColorMatching={ - "DefaultBRColorMatching", - { - { "Natural", "-cm Natural" }, - { "Vivid", "-cm Vivid" }, - { "None", "-cm None" }, - { NULL , NULL } - } -}; - -// ******DefaultBRHalfTonePattern********** -PPDCOMMAND DefaultBRHalfTonePattern={ - "DefaultBRHalfTonePattern", - { - - { "Diffusion", "-ht Diffusion" }, - { "Dither", "-ht Dither" }, - { NULL , NULL } - } -}; - -// ******DefaultBRColorEnhancement********** -PPDCOMMAND DefaultBRColorEnhancement={ - "DefaultBRColorEnhancement", - { - { "OFF" , "-ce OFF" }, - { "ON" , "-ce ON" }, - { NULL , NULL } - } -}; - -// ******DefaultBRInputSlot********** -PPDCOMMAND DefaultBRInputSlot={ - "DefaultBRInputSlot", - { -#ifndef _BRPRINTER_ /*BRPRINTER*/ - { "AUTO" , "-feed AUTO" }, -#else - { "AutoSelect" , "-feed AutoSelect" }, -#endif - { "Tray1" , "-feed Tray1" }, - { "Tray2" , "-feed Tray2" }, - { NULL , NULL } - } -}; - -#ifdef _BRPRINTER_ /*BRPRINTER*/ -// ******DefaultBRReversePrint********** -PPDCOMMAND DefaultBRReverse={ - "DefaultBRReverse", - { - { "OFF" , "-rev OFF" }, - { "ON" , "-rev ON" }, - - { NULL , NULL } - } -}; -// ******DefaultBRJpegPrint********** -PPDCOMMAND DefaultBRJpeg={ - "DefaultBRJpeg", - { - { "Recommended" , "-jpeg Recommended" }, - { "QualityPrior" , "-jpeg QualityPrior" }, - { "SpeedPrior" , "-jpeg SpeedPrior" }, - { NULL , NULL } - - } -}; -#endif /*BRPRINTER*/ - -// ******DefaultBRDuplex********** -PPDCOMMAND DefaultBRDuplex={ - "DefaultBRDuplex", - { - { "None" , "-duplex None" }, - { "DuplexTumble" , "-duplex DuplexTumble" }, - { "DuplexNoTumble" , "-duplex DuplexNoTumble" }, - { NULL , NULL } - } -}; -// ******DefaultBRDuplexMode********** -PPDCOMMAND DefaultBRDuplexMode={ - "DefaultBRDuplexMode", - { - { "Normal" , "-advduplexmode Normal" }, - { "Duplex1", "-advduplexmode Duplex1" }, - { "Duplex2" , "-advduplexmode Duplex2" }, - { NULL , NULL } - } -}; - -// ******DefaultBRManualDuplex********** -PPDCOMMAND DefaultBRManualDuplex={ - "DefaultBRManualDuplex", - { - { "OFF" , "-manualduplex OFF" }, - { "Even", "-manualduplex Even" }, - { "Odd" , "-manualduplex Odd" }, - { NULL , NULL } - } -}; - - -PPDCOMMAND *ppdcommand_all_list[] = { - &DefaultBRInputSlot, - &DefaultBRResolution, - &DefaultPageSize, - &DefaultBRMonoColor, - &DefaultBRSlowDrying, - &DefaultBRColorMediaType, - &DefaultBRColorPaperThick, - &DefaultBRBiDir, - &DefaultBrMirrorPrint, - - &DefaultBRDocument, - &DefaultBRColorMatching, - &DefaultBRHalfTonePattern, - &DefaultBRColorEnhancement, -#ifdef _BRPRINTER_ /*BRPRINTER*/ - &DefaultBRJpeg, - &DefaultBRReverse, - &DefaultBRDuplex, - &DefaultBRManualDuplex, - &DefaultBRDuplexMode, -#endif /*_BRPRINTER_*/ - NULL -}; -/* PPD Default end*/ -// +++++++++++++++++++++++++++ -// PPD numerical value -// +++++++++++++++++++++++++++ - -CMDLINELIST PPDdefaultN[] = { - {"DefaultBRBrightness", "-brit "}, - {"DefaultBRContrast", "-cont "}, - {"DefaultBRRed", "-red "}, - {"DefaultBRGreen", "-green "}, - {"DefaultBRBlue", "-blue "}, - { NULL , NULL }, -}; - - -// +++++++++++++++++++++++++++ -// command line (Standard command) -// +++++++++++++++++++++++++++ -CMDLINELIST standard_media_commandlinelist[] = { - { NULL , NULL } -}; - -#endif //_BRCUPS_COMMANDS_H_ diff --git a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c b/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c deleted file mode 100755 index 485a8e5..0000000 --- a/mfcj630wcupswrapper-1.1.1-3/brcupsconfig/brcupsconfig.c +++ /dev/null @@ -1,585 +0,0 @@ -//* Brother CUPS wrapper tool -//* Copyright (C) 2005 Brother. Industries, Ltd.//* -//* Ver1.00 - -//* This program is free software; you can redistribute it and/or modify it -//* under the terms of the GNU General Public License as published by the Free -//* Software Foundation; either version 2 of the License, or (at your option) -//* any later version. -//* -//* This program is distributed in the hope that it will be useful, but WITHOUT -//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -//* more details. -//* -//* You should have received a copy of the GNU General Public License along with -//* this program; if not, write to the Free Software Foundation, Inc., 59 Temple -//* Place, Suite 330, Boston, MA 02111-1307 USA -//* - - -#include -#include -#include -#include - -#include "brcups_commands.h" - - -CMDLINELIST standard_side_commandlinelist[]; - -int divide_media_token(char *input,char output[5][30]); - - -#if 0 -#define DEBUGPRINT(a) fprintf(stderr,a);fflush(stdout) -#define DEBUGPRINT1(a1,a2) fprintf(stderr,a1,a2);fflush(stdout) -#define DEBUGPRINT2(a1,a2,a3) fprintf(stderr,a1,a2,a3);fflush(stdout) -#define DEBUGPRINT3(a1,a2,a3,a4) fprintf(stderr,a1,a2,a3,a4);fflush(stdout) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) fprintf(stderr,a1,a2,a3,a4,a5);fflush(stdout) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) fprintf(stderr,a1,a2,a3,a4,a5,a6);fflush(stdout) -#else -#define DEBUGPRINT(a) -#define DEBUGPRINT1(a1,a2) -#define DEBUGPRINT2(a1,a2,a3) -#define DEBUGPRINT3(a1,a2,a3,a4) -#define DEBUGPRINT4(a1,a2,a3,a4,a5) -#define DEBUGPRINT5(a1,a2,a3,a4,a5,a6) -#endif - - - -int log_level = 0; - - -typedef struct { - char value[50]; - char option[50]; -} SETCOMMAND; - - -SETCOMMAND command_array[100]; - - -// -// local functions -// -int initialize_command_list(); -int add_command_list(char *option,char *command); -int add_command_list_brcommand(char *command); -int exec_brprintconf(char *brprintconf,char *printer); -char *strstr_ex(char *data , char *serch_data); -char *delete_ppd_comment(char *line); -char *chk_ppd_default_setting_line(char *ppd_line); -char *get_token(char *input,char *output); - -void write_log_file(int level,char *format,...); -int main(int argc,char * argv[]) { - - char *printer; - char ppd_line[500],tmp[500],*p_tmp,tmp_n[10],tmp_op[500]; - FILE *fp_ppd; - char *p; - char *commandline,*ppdfile, *printer_model; - int i,ii; - DEBUGPRINT("main:start\n"); - - if(argc < 1){ - return 0; - } - printer = argv[1]; - if(argc > 2){ - ppdfile= argv[2]; - } - else{ - ppdfile=""; - } - if(argc > 3){ - if(argv[3][0] >= '0' && argv[3][0] <= '9'){ - - log_level = argv[3][0] -'0'; - } - else{ - log_level = 0; - } - } - else{ - log_level = 0; - } - - if(argc > 4){ - commandline = argv[4]; - } - else{ - commandline = "NULL COMMAND LINE"; - } - - printer_model = argv[5]; - - fp_ppd = fopen(ppdfile , "r"); - if( fp_ppd == NULL) return 0; - - - initialize_command_list(); - - //************************************ - // set PPD option - //************************************ - - - DEBUGPRINT("main:set PPD option (string)\n"); - write_log_file(5,"PPD SETTING\n"); - - while(fgets(ppd_line,sizeof(ppd_line),fp_ppd)){ - if(NULL == delete_ppd_comment(ppd_line))continue; - if(NULL == chk_ppd_default_setting_line(ppd_line))continue; - - //************************************ - // set PPD option (string) - //************************************ - - for ( i = 0; ppdcommand_all_list[i]!= NULL; i ++) - { - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->label); - if(p) - { - - #if 1 - char * tmp; - tmp = p + strlen( ppdcommand_all_list[i]->label); - #endif - for (ii = 0; ppdcommand_all_list[i]->ppdcommandlist[ii].value != NULL; ii++) - { - - p = strstr_ex(ppd_line,ppdcommand_all_list[i]->ppdcommandlist[ii].value); - - if(p) - { - add_command_list_brcommand(ppdcommand_all_list[i]->ppdcommandlist[ii].brcommand); - break; - } - } - } - } - - - - //************************************ - // set PPD option (numerical) - //************************************ - for ( i = 0; PPDdefaultN[i].option!= NULL; i ++){ - strcpy(tmp,PPDdefaultN[i].option); - p_tmp = tmp; - if(tmp[0] == '^')p_tmp ++; - p = strstr_ex(ppd_line,p_tmp); - if(p){ - sprintf(tmp,"%s %s",PPDdefaultN[i].value, - p + strlen(PPDdefaultN[i].option)); - - get_token(PPDdefaultN[i].value ,tmp_op); - get_token(p + strlen(PPDdefaultN[i].option) ,tmp_n); - - add_command_list(tmp_op,tmp_n); - - } - } - - } - - - - //************************************ - // set brother command line option (string) - //************************************ - DEBUGPRINT("main:set brother command line option (string)\n"); - write_log_file(5,"BROTHER COMMAND LINE SETTING(S)\n"); - for ( i = 0; commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist[i].option); - if(p){ - add_command_list_brcommand(commandlinelist[i].value); - } - } - - - - - - - - //************************************ - // set cups standard command line option (duplex) - //************************************ - DEBUGPRINT("main:set standard command line option (duplex)\n"); - write_log_file(5,"STANDARD COMMAND LINE SETTING(DUPLEX)\n"); - for ( i = 0; standard_side_commandlinelist[i].value != NULL; i ++){ - p = strstr_ex(commandline,standard_side_commandlinelist[i].option); - if(p){ - add_command_list_brcommand(standard_side_commandlinelist[i].value); - } - - - } - - - - - //************************************ - // set command line option (numerical) - //************************************ - DEBUGPRINT("main:set command line option (numerical)\n"); - write_log_file(5,"COMMAND LINE SETTING(N)\n"); - - for(i = 0; commandlinelist2[i].option != NULL; i ++){ - p = strstr_ex(commandline,commandlinelist2[i].option); - if(p){ - get_token(commandlinelist2[i].value ,tmp_op); - get_token(p + strlen(commandlinelist2[i].option) ,tmp_n); - sprintf(tmp,"%s %s",tmp_op,tmp_n ); - - add_command_list(tmp_op,tmp_n); - - } - } - - //************************************ - // call brprintconf - //************************************ - - exec_brprintconf(brprintconf,printer_model); - - return 0; -} - - - - - -int initialize_command_list(){ - int i; - char *p; - - p = (char *)command_array; - for ( i = 0; i < (int)sizeof(command_array) ; i ++){ - *p = 0; - - p ++; - } - return i; -} - - -int exec_brprintconf(char *brprintconf,char *printer){ - int i; - char exec[300]; - - DEBUGPRINT("exec_brprintconf:start\n"); - - for ( i = 0; command_array[i].value[0] != 0; i ++ ){ - sprintf(exec,"%s_%s %s \"%s\"",brprintconf, printer, - command_array[i].option, - command_array[i].value); - - write_log_file(1,"%s\n",exec); - - system(exec); - - } - - return 0; -} - - - -int add_command_list(char *option,char *value){ - char *p; - int i; - - if(!option || !value || !option[0] || !value[0]){ - return 0; - } - - for ( i = 0; command_array[i].option[0] != 0; i ++ ){ - p = strstr_ex(command_array[i].option , option); - if(p){ - write_log_file(3," C %s %s\n",option,value); - strcpy(command_array[i].value, value); - break; - } - } - - if(command_array[i].option[0] == 0){ - - strcpy( command_array[i].option ,option); - strcpy( command_array[i].value ,value); - write_log_file(3," A %s %s\n",option,value); - } - return 1; -} - - - - -int add_command_list_brcommand_sub(char *command){ - char option[100],*p1,*p2; - char value[100]; - - strncpy(option,command,sizeof(option)-1); - - option[strlen(option)] = 0; - - p1 = strchr(option, ' '); - p2 = strchr(option, '\t'); - - if(p1 > p2 && p2 != NULL)p1 = p2; - - if(p1 == NULL){ - return 0; - } - - *p1 = 0; - p1 ++; - - while(*p1 == ' ' || *p1 == '\t') p1 ++; - - strcpy(value , p1); - - return add_command_list(option,value); - -} - - - - -int add_command_list_brcommand(char *command){ - char multi_brcommands[500]; - - char *p,*start; - strcpy(multi_brcommands,command); - - - start = multi_brcommands; - - while((p = strchr(start+1,'-'))){ - if(p > multi_brcommands+1){ - if(*(p-1) == ' ' || *(p-1) == '\t'){ - *(p-1) = 0; - } - } - add_command_list_brcommand_sub(start); - start = p; - } - - add_command_list_brcommand_sub(start); - - return 0; -} - - -char *get_next_element(char *data,char *search_word){ - char *p; - p = strstr(data,search_word); - if(!p)return p; - p += strlen(search_word); - - while(*p == ' '|| *p == '\t' || *p == ';' || *p == ':')p++; - - return p; - -} - - - - -char *strstr_ex(char *data , char *search_data){ - char *p , *pp; - p = strstr(data,search_data); - if(!p)return p; - - pp = p; - p += strlen(search_data); - - if(p > search_data){ - if ( ! ((*(p-1) == ' '|| *(p-1) == '\t' || *(p-1) == ';' || *(p-1) == ':' - || *(p-1) == 0 || *(p-1) == '\n' || *(p-1) == '*') || - *(p-1) == '=' )){ - - - - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - - } - if(pp > data){ - p = pp-1; - if( ! (*p == ' '|| *p == '\t' || *p == ';' || *p == ':' - || *p == 0 || *p == '\n' || *p == '*')) return NULL; - } - - return pp; -} - -char *delete_ppd_comment(char *line){ - char *p; - p = strchr(line , '%'); - if(p)*p = 0; - - p = strchr(line , 0x0a); - if(p)*p = 0; - - p = strchr(line , 0x0d); - if(p)*p = 0; - p = strchr(line , 0x0c); - if(p)*p = 0; - - if(line[0] == 0)return NULL; - - return line; - -} - - - -char *chk_ppd_default_setting_line(char *ppd_line){ - char *p; - p=strstr(ppd_line,"*Default"); - if(p != ppd_line)return NULL; - return p; -} - - - - -char *get_token(char *input,char *output){ - char c,*pi,*po; - - po = output; - pi = input; - - while((c = *pi)){ - switch(c){ - case ' ': - - case '\t': - case '=': - case ':': - case 0x0d: - case 0x0a: - case 0x0c: - pi++; - continue; - case 0x00: - break; - } - break; - } - - - while((c = *pi)){ - switch(c){ - case ' ': - case '\t': - case '=': - case 0x0d: - case 0x0a: - case 0x0c: - case 0x00: - *po = 0; - - return output; - - - break; - } - *po = c; - po ++; - pi ++; - } - *po = 0; - - - return output; -} - -//--------------------for debug log------------------- -void write_log_file(int level,char *format,...){ - - char logdata[300]; - va_list argp; - va_start(argp,format); - - - if(log_level == 0)return; - if(level > log_level)return; - - vsprintf(logdata,format,argp); - - fputs(logdata , stdout); - fflush(stdout); - return ; -} - - - - -#define MEDIAEQ1 "media=" -#define MEDIAEQ2 "PageSize=" - -int divide_media_token(char *input,char output[5][30]){ - char media_command[100]; - char *p,*pp; - int i; - - if((p = strstr(input,MEDIAEQ1)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ1)); - } - else if((p = strstr(input,MEDIAEQ2)) != NULL) - { - strcpy(media_command,p+strlen(MEDIAEQ2)); - } - else - { - return 0; - } - - - - media_command[sizeof(media_command)-1] = 0; - media_command[sizeof(media_command)-2] = 0; - media_command[sizeof(media_command)-3] = 0; - - - p = strchr(media_command,' '); - if(p)*p =0; - - p = strchr(media_command,'\t'); - - if(p)*p =0; - - p = strchr(media_command,'\n'); - if(p)*p =0; - - p = media_command; - - for (i = 0; i < 5; ){ - if(*p == 0)break; - pp = strchr(p , ','); - if(pp) *pp = 0; - strcpy(output[i],p); - i ++; - if(pp == NULL)break; - p = pp+1; - } - return i; -} - -CMDLINELIST standard_side_commandlinelist[] = { - - { "sides=two-sided-long-edge" , "-dx ON -dxt LONG" }, - { "sides=two-sided-short-edge" , "-dx ON -dxt SHORT" }, - { "sides=one-side" , "-dx OFF" }, - { NULL , NULL } -};