From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONTRIB/SNIP/printq.c | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 reference/C/CONTRIB/SNIP/printq.c (limited to 'reference/C/CONTRIB/SNIP/printq.c') diff --git a/reference/C/CONTRIB/SNIP/printq.c b/reference/C/CONTRIB/SNIP/printq.c new file mode 100755 index 0000000..c0f4818 --- /dev/null +++ b/reference/C/CONTRIB/SNIP/printq.c @@ -0,0 +1,46 @@ +/* printq.c 12-22-91 Robert Mashlan, Public Domain + + A small program that utilizes the prnspool module, + which is an interface to the DOS program PRINT.COM + +*/ + +#include "prnspool.h" +#include +#include + +int main(int argc, char **argv ) +{ + char far *files; + int i; + int addfiles = 1; + + if (!printspool_installed()) + { + printf("print.com not installed\n"); + return 0; + } + for (i = 1; i < argc; i++) + { + if (stricmp(argv[i],"/T") == 0) + printspool_cancel(); /* cancel all files in queue */ + else if (stricmp(argv[i],"/C") == 0) + addfiles = 0; /* cancel all listed files */ + else if (stricmp(argv[i],"/P") == 0) + addfiles = 1; /* add all listed files */ + else + /* here the specified file should really have the full pathname */ + { + if (addfiles) + printspool_submit(argv[i]); + else printspool_remove(argv[i]); + if (printspool_errno) + puts(printspool_errlist[printspool_errno]); + } + } + printf("files currently in queue:\n"); + for (files = printspool_getqueue(); *files; files += 64) + printf("\t%Fs\n", files); + printspool_endhold(); + return 0; +} -- cgit v1.2.3-54-g00ecf 1d7fd26a668de83c5cb996de05f8f'>commitdiff
next.git/log/include/trace/events/udp.h?h=nds-private-remove&id=16a16cd35ee29d9bea54dd60e55d9c1cc685a37d&showmsg=1'>Expand)
AgeCommit message (Expand)AuthorFilesLines
AuthorFilesLines