summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/configure.developer2
-rw-r--r--source3/include/smb.h7
-rw-r--r--source3/param/loadparm.c16
-rw-r--r--source3/printing/lpq_parse.c51
4 files changed, 74 insertions, 2 deletions
diff --git a/source3/configure.developer b/source3/configure.developer
index e7c8831f62..07ce9fcf12 100755
--- a/source3/configure.developer
+++ b/source3/configure.developer
@@ -1,4 +1,4 @@
#!/bin/sh
-CFLAGS="-g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD"
+CFLAGS="-g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
export CFLAGS
./configure $*
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 57a62b7f1f..a5ace1eb4d 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1405,7 +1405,12 @@ enum server_types
/* printing types */
enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
- PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2};
+ PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
+ PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2
+#ifdef DEVELOPER
+,PRINT_TEST,PRINT_VLP
+#endif /* DEVELOPER */
+};
/* Remote architectures we know about. */
enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_WIN2K, RA_SAMBA};
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index dc2082423b..9dcd7bbc2e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -561,6 +561,10 @@ static struct enum_list enum_printing[] = {
{PRINT_CUPS, "cups"},
{PRINT_LPRNT, "nt"},
{PRINT_LPROS2, "os2"},
+#ifdef DEVELOPER
+ {PRINT_TEST, "test"},
+ {PRINT_TEST, "vlp"},
+#endif /* DEVELOPER */
{-1, NULL}
};
@@ -1099,6 +1103,18 @@ static void init_printer_values(void)
string_set(&sDefault.szLpresumecommand,
"qstat -s -j%j -r");
break;
+#ifdef DEVELOPER
+ case PRINT_TEST:
+ case PRINT_VLP:
+ string_set(&sDefault.szPrintcommand, "vlp print %p %s");
+ string_set(&sDefault.szLpqcommand, "vlp lpq %p");
+ string_set(&sDefault.szLprmcommand, "vlp lprm %p %j");
+ string_set(&sDefault.szLppausecommand, "vlp lppause %p %j");
+ string_set(&sDefault.szLpresumecommand, "vlp lpresum %p %j");
+ string_set(&sDefault.szQueuepausecommand, "vlp queuepause %p");
+ string_set(&sDefault.szQueueresumecommand, "vlp queueresume %p");
+ break;
+#endif /* DEVELOPER */
}
}
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c
index e0b3ed192f..f6bf7f06df 100644
--- a/source3/printing/lpq_parse.c
+++ b/source3/printing/lpq_parse.c
@@ -938,6 +938,51 @@ static char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "fre
static char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL };
static char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL };
+#ifdef DEVELOPER
+
+/****************************************************************************
+parse a vlp line
+****************************************************************************/
+static BOOL parse_lpq_vlp(char *line,print_queue_struct *buf,BOOL first)
+{
+ int toknum = 0;
+ fstring tok;
+
+ /* First line is printer status */
+
+ if (!isdigit(line[0])) return False;
+
+ /* Parse a print job entry */
+
+ while(next_token(&line, tok, NULL, sizeof(fstring))) {
+ switch (toknum) {
+ case 0:
+ buf->job = atoi(tok);
+ break;
+ case 1:
+ buf->size = atoi(tok);
+ break;
+ case 2:
+ buf->status = atoi(tok);
+ break;
+ case 3:
+ buf->time = atoi(tok);
+ break;
+ case 4:
+ fstrcpy(buf->user, tok);
+ break;
+ case 5:
+ fstrcpy(buf->file, tok);
+ break;
+ }
+ toknum++;
+ }
+
+ return True;
+}
+
+#endif /* DEVELOPER */
+
/****************************************************************************
parse a lpq line. Choose printing style
****************************************************************************/
@@ -976,6 +1021,12 @@ BOOL parse_lpq_entry(int snum,char *line,
case PRINT_LPROS2:
ret = parse_lpq_os2(line,buf,first);
break;
+#ifdef DEVELOPER
+ case PRINT_VLP:
+ case PRINT_TEST:
+ ret = parse_lpq_vlp(line,buf,first);
+ break;
+#endif /* DEVELOPER */
default:
ret = parse_lpq_bsd(line,buf,first);
break;