diff --git a/.gitattributes b/.gitattributes index 4c83f36c12731f9c5e18ee513b6ddc80ae7b97d7..9f2774d14f105d6373d9005f6d4b3219918d6f68 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 a1ec77aaec6c4040dd43f4d0e28eb24412782174..52e57f44e0078c4aae33a644b4fffc63a40d649a 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()));