From 4505feedfeb2e838ccc3a5b370f1f80bb8d2cfb6 Mon Sep 17 00:00:00 2001 From: "H. William Welliver III" <bill@welliver.org> Date: Fri, 3 Jul 1998 16:30:19 -0400 Subject: [PATCH] Updated to the 1998-07-03 version. Thanks, Bill Welliver <hww3@riverweb.com>. Now allows setting of the "Job Name". Rev: lib/modules/Protocols.pmod/LPD.pmod:1.3 --- .gitattributes | 1 + lib/modules/Protocols.pmod/LPD.pmod | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 4c83f36c12..9f2774d14f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -38,6 +38,7 @@ testfont binary /lib/modules/LR.pmod/scanner.pike foreign_ident /lib/modules/MIME.pmod foreign_ident /lib/modules/Protocols.pmod/Ident.pmod foreign_ident +/lib/modules/Protocols.pmod/LPD.pmod foreign_ident /lib/modules/Protocols.pmod/Line.pmod foreign_ident /lib/modules/Protocols.pmod/Ports.pmod foreign_ident /lib/modules/Protocols.pmod/TELNET.pmod foreign_ident diff --git a/lib/modules/Protocols.pmod/LPD.pmod b/lib/modules/Protocols.pmod/LPD.pmod index a1ec77aaec..52e57f44e0 100644 --- a/lib/modules/Protocols.pmod/LPD.pmod +++ b/lib/modules/Protocols.pmod/LPD.pmod @@ -1,7 +1,9 @@ // -// LPD.pmod: an implimentation of the BSD lpd protocol +// LPD.pmod: an implementation of the BSD lpd protocol (RFC 1179). // This is a module for pike. -// 3 April 1998 <hww3@riverweb.com> Bill Welliver +// 3 July 1998 <hww3@riverweb.com> Bill Welliver +// +// $Id: LPD.pmod,v 1.3 1998/07/03 20:30:19 grubba Exp $ // class client { @@ -10,6 +12,7 @@ class client { object conn; int jobnum; string jobtype; + string jobname; int set_job_type(string type) { @@ -36,6 +39,12 @@ class client { return 1; } + int set_job_name(string name) + { + jobname=name; + return 1; + } + string|int start_queue(string queue) { if(!queue) return 0; @@ -66,7 +75,8 @@ class client { control+="H"+gethostname()+"\n"; control+="P"+(getpwuid(getuid())[0]||"nobody"); control+=(jobtype||"l")+"dfA"+ sprintf("%3d%s", jobnum, gethostname())+"\n"; - + if(jobname) + control+="J" + jobname + "\n"; jobnum++; conn->write(sprintf("%c%s cfA%3d%s\n", 02, (string)sizeof(control), jobnum,gethostname())); -- GitLab