Branch: Tag:

1998-07-03

1998-07-03 20:30:19 by H. William Welliver III <bill@welliver.org>

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

1:   // - // 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 {    string host;
10:    object conn;    int jobnum;    string jobtype; +  string jobname;       int set_job_type(string type)    {
36:    return 1;    }    +  int set_job_name(string name) +  { +  jobname=name; +  return 1; +  } +     string|int start_queue(string queue)    {    if(!queue) return 0;
66:    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()));