pike.git / lib / modules / Protocols.pmod / LPD.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LPD.pmod:1:   //   // LPD.pmod: an implementation of the BSD lpd protocol (RFC 1179).   // This is a module for pike.   // 3 July 1998 <hww3@riverweb.com> Bill Welliver   // - // $Id: LPD.pmod,v 1.9 2002/06/17 11:46:58 grubba Exp $ + // $Id: LPD.pmod,v 1.10 2008/01/13 17:02:43 nilsson Exp $   //      #pike __REAL_VERSION__      //! A client for communicating with printers and print spoolers that   //! support the BSD lpd protocol (RFC 1179).   class client {    string host;    int port;    private object conn;
pike.git/lib/modules/Protocols.pmod/LPD.pmod:82:    conn->close();    return 1;    }      //! @decl string|int send_job(string queue, string job)   //! Send print job consisting of data @i{job@} to printer @i{queue@}.   //! @returns   //! Returns 1 if success, 0 otherwise.    int send_job(string queue, string job)    { -  int r; +     string resp;       if(!queue) return 0;       if(!connect(host, port))    return 0;    // werror("connected to " + host + "\n");       string control="";    control+="H"+gethostname()+"\n";