diff --git a/security/Makefile b/security/Makefile index 55a56ec7c91f..1535c51d0551 100644 --- a/security/Makefile +++ b/security/Makefile @@ -313,6 +313,7 @@ SUBDIR += pear-Crypt_CBC SUBDIR += pear-Text_Password SUBDIR += pf + SUBDIR += pft SUBDIR += pgp SUBDIR += pgp6 SUBDIR += pgpdump diff --git a/security/pft/Makefile b/security/pft/Makefile new file mode 100644 index 000000000000..d8c46db125b2 --- /dev/null +++ b/security/pft/Makefile @@ -0,0 +1,29 @@ +# Ports collection makefile for: pft +# Date created: 21 July 2004 +# Whom: Yonatan +# +# $FreeBSD$ +# + +PORTNAME= pft +PORTVERSION= 1.2 +CATEGORIES= security +MASTER_SITES= http://www.phenoelit.de/hp/ +DISTNAME= libPJL-${PORTVERSION}-src +EXTRACT_SUFX= .tgz + +MAINTAINER= Yonatan@xpert.com +COMMENT= Printer Job Language library and tool + +NO_WRKSUBDIR= yes +ALL_TARGET= libPJL.a +USE_GMAKE= yes + +post-build: + @cd ${WRKSRC}/pft; ${GMAKE} pft + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/pft/pft ${PREFIX}/bin/ + ${INSTALL_DATA} ${WRKSRC}/libPJL.a ${PREFIX}/lib/ + +.include diff --git a/security/pft/distinfo b/security/pft/distinfo new file mode 100644 index 000000000000..57dc49de074f --- /dev/null +++ b/security/pft/distinfo @@ -0,0 +1,2 @@ +MD5 (libPJL-1.2-src.tgz) = 51aba61d1cbfde5c31278bfb41bafdbb +SIZE (libPJL-1.2-src.tgz) = 73194 diff --git a/security/pft/files/patch-Makefile b/security/pft/files/patch-Makefile new file mode 100644 index 000000000000..bc7738925407 --- /dev/null +++ b/security/pft/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig Wed Jan 30 14:47:32 2002 ++++ Makefile Thu Aug 5 19:29:52 2004 +@@ -3,7 +3,7 @@ + # + # + +-CPPFLAGS= -Wall -g -DUNIX -D_DEBUG ++CPPFLAGS= -Wall -g -DUNIX -D_DEBUG ${CXXFLAGS} + AR=ar rcs + RM=rm -f + diff --git a/security/pft/files/patch-commands.h b/security/pft/files/patch-commands.h new file mode 100644 index 000000000000..ba262898bb6d --- /dev/null +++ b/security/pft/files/patch-commands.h @@ -0,0 +1,8 @@ +--- commands.h.orig Thu Aug 5 13:31:46 2004 ++++ commands.h Thu Aug 5 13:31:54 2004 +@@ -31,4 +31,4 @@ + #define PJLFS_FILE 1 + + +-#endif __COMMANDS_H__ ++#endif // __COMMANDS_H__ diff --git a/security/pft/files/patch-exceptions.h b/security/pft/files/patch-exceptions.h new file mode 100644 index 000000000000..06284267f2b1 --- /dev/null +++ b/security/pft/files/patch-exceptions.h @@ -0,0 +1,8 @@ +--- exceptions.h.orig Thu Aug 5 13:32:19 2004 ++++ exceptions.h Thu Aug 5 13:32:30 2004 +@@ -16,4 +16,4 @@ + class ExInvalid{}; + }; + +-#endif __EXCPETIONS_H__ ++#endif // __EXCPETIONS_H__ diff --git a/security/pft/files/patch-fxstrings.cpp b/security/pft/files/patch-fxstrings.cpp new file mode 100644 index 000000000000..3eb6b4b51133 --- /dev/null +++ b/security/pft/files/patch-fxstrings.cpp @@ -0,0 +1,45 @@ +--- fxstrings.cpp.orig Sat Jul 6 18:36:20 2002 ++++ fxstrings.cpp Thu Aug 5 15:17:58 2004 +@@ -3,12 +3,14 @@ + * $Id: fxstrings.cpp,v 1.3 2002/01/19 19:23:50 fx Exp $ + */ + +-#include ++#include + #include + #include + + #include "fxstrings.h" + ++using namespace std; ++ + /* Initializes the protected variables */ + String::String(void) { + str=NULL; +@@ -58,7 +60,7 @@ + if ((str=(char*)malloc(strlen(s)+1))==NULL) { + #ifdef _DEBUG + cerr << "String::set(): malloc failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExMalloc(); + } + memset(str,0,strlen(s)+1); +@@ -79,7 +81,7 @@ + if ((p=(char *)malloc(length+1))==NULL) { + #ifdef _DEBUG + cerr << "String::set(char,len): malloc failed\n" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExMalloc(); + } + +@@ -93,7 +95,7 @@ + if ((str=(char*)malloc(strlen(p)+1))==NULL) { + #ifdef _DEBUG + cerr << "String::set(char,len): malloc failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExMalloc(); + } + memset(str,0,strlen(p)+1); diff --git a/security/pft/files/patch-fxstrings.h b/security/pft/files/patch-fxstrings.h new file mode 100644 index 000000000000..2ccdcd17a05c --- /dev/null +++ b/security/pft/files/patch-fxstrings.h @@ -0,0 +1,8 @@ +--- fxstrings.h.orig Thu Aug 5 13:34:15 2004 ++++ fxstrings.h Thu Aug 5 13:34:26 2004 +@@ -64,4 +64,4 @@ + }; + + +-#endif __FXSTRINGS_H__ ++#endif // __FXSTRINGS_H__ diff --git a/security/pft/files/patch-llist.cpp b/security/pft/files/patch-llist.cpp new file mode 100644 index 000000000000..57f03c369343 --- /dev/null +++ b/security/pft/files/patch-llist.cpp @@ -0,0 +1,17 @@ +--- llist.cpp.orig Sat Jul 6 18:36:20 2002 ++++ llist.cpp Thu Aug 5 15:22:51 2004 +@@ -4,11 +4,13 @@ + * $Id: llist.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ + */ + +-#include ++#include + #include + #include + + #include "llist.h" ++ ++using namespace std; + + LinkList::LinkList() { + anchor=current=NULL; diff --git a/security/pft/files/patch-llist.h b/security/pft/files/patch-llist.h new file mode 100644 index 000000000000..cedbd571457c --- /dev/null +++ b/security/pft/files/patch-llist.h @@ -0,0 +1,8 @@ +--- llist.h.orig Thu Aug 5 13:37:24 2004 ++++ llist.h Thu Aug 5 13:37:32 2004 +@@ -88,4 +88,4 @@ + }; + + +-#endif __LLIST_H__ ++#endif // __LLIST_H__ diff --git a/security/pft/files/patch-pft:Makefile b/security/pft/files/patch-pft:Makefile new file mode 100644 index 000000000000..465a66368c4b --- /dev/null +++ b/security/pft/files/patch-pft:Makefile @@ -0,0 +1,9 @@ +--- pft/Makefile.orig Mon Jan 7 17:15:36 2002 ++++ pft/Makefile Thu Aug 5 19:31:12 2004 +@@ -1,5 +1,5 @@ + CPP=g++ +-CPPFLAGS= -Wall -g -DUNIX -L../ -I../ ++CPPFLAGS= -Wall -g -DUNIX -L../ -I../ ${CXXFLAGS} + DEBUGGING= -D_DEBUG + AR=ar rcs + RM=rm -f diff --git a/security/pft/files/patch-pft:main.cpp b/security/pft/files/patch-pft:main.cpp new file mode 100644 index 000000000000..fe0708c6ece2 --- /dev/null +++ b/security/pft/files/patch-pft:main.cpp @@ -0,0 +1,127 @@ +--- pft/main.cpp.orig Sat Jul 6 18:36:30 2002 ++++ pft/main.cpp Thu Aug 5 19:33:12 2004 +@@ -8,7 +8,7 @@ + * + * $Id: main.cpp,v 1.8 2002/07/06 15:36:29 fx Exp fx $ + */ +-#include ++#include + #include // cant live without printf() ;) + + #ifndef UNIX +@@ -27,12 +27,15 @@ + #include // open(), close(), write() + #include + #include +-#endif UNIX ++#include // memset() ++#endif // UNIX + + #include "fxstrings.h" + #include "pjlsession.h" + #include "commands.h" + ++using namespace std; ++ + #define SPLASH "PFT - PJL file transfer\n" \ + "\tFX of Phenoelit \n"\ + "\tVersion 0.7 ($Revision: 1.8 $)\n" +@@ -89,7 +92,7 @@ + void commandline_ident(void); + #ifdef UNIX + void sighandl(int s); +-#endif UNIX ++#endif // UNIX + + + class Program_config { +@@ -102,7 +105,7 @@ + bool pause; + #ifdef UNIX + bool ctrlc; +-#endif UNIX ++#endif // UNIX + }; + + Program_config cfg; +@@ -122,7 +125,7 @@ + } + #else + cfg.lpwd=_getcwd(NULL,0); +-#endif UNIX ++#endif // UNIX + + if (argc>3) { + usage(argv[0]); +@@ -148,7 +151,7 @@ + void sighandl(int s) { + cfg.ctrlc=true; + } +-#endif UNIX ++#endif // UNIX + + void cmdloop(void) { + String cmd; +@@ -209,7 +212,7 @@ + #ifdef UNIX + // endable default handler for ctrl-c during connect() call + signal(SIGINT,SIG_DFL); +-#endif UNIX ++#endif // UNIX + + + if (sess.connected()) { +@@ -238,7 +241,7 @@ + } + #ifdef UNIX + signal(SIGINT,&sighandl); +-#endif UNIX ++#endif // UNIX + } + + // close connection +@@ -486,7 +489,7 @@ + if (_kbhit()) break; + #else + if (cfg.ctrlc) break; +-#endif UNIX ++#endif // UNIX + + if (++di==dx) { + cout << "try " << p << endl; +@@ -523,7 +526,7 @@ + if (_kbhit()) break; + #else + if (cfg.ctrlc) break; +-#endif UNIX ++#endif // UNIX + } + + // env invalid +@@ -826,7 +829,7 @@ + } else { + cerr << "lcd failed" << endl; + } +-#endif UNIX ++#endif // UNIX + } + // get command + else if (basecmd==CMD_GET) { +@@ -949,7 +952,7 @@ + cout << sess.filebuffer.length() + << " bytes read from local file " << cmd.token(' ',1)<< endl; + } +-#endif UNIX ++#endif // UNIX + + try { + sess.append_file(targ.get()); +@@ -1193,7 +1196,7 @@ + #ifdef UNIX + // endable default handler for ctrl-c during connect() call + signal(SIGINT,SIG_DFL); +-#endif UNIX ++#endif // UNIX + + try { + sess.initiate(cfg.server.get(),cfg.port); diff --git a/security/pft/files/patch-pjllists.cpp b/security/pft/files/patch-pjllists.cpp new file mode 100644 index 000000000000..9f0bb171a598 --- /dev/null +++ b/security/pft/files/patch-pjllists.cpp @@ -0,0 +1,15 @@ +--- pjllists.cpp.orig Thu Aug 5 15:21:00 2004 ++++ pjllists.cpp Thu Aug 5 15:21:15 2004 +@@ -2,9 +2,11 @@ + * + * $Id: pjllists.cpp,v 1.3 2002/07/05 16:41:26 fx Exp $ + */ +-#include ++#include + + #include "pjllists.h" ++ ++using namespace std; + + /* ************************** + * PJLenv diff --git a/security/pft/files/patch-pjllists.h b/security/pft/files/patch-pjllists.h new file mode 100644 index 000000000000..103f91131732 --- /dev/null +++ b/security/pft/files/patch-pjllists.h @@ -0,0 +1,8 @@ +--- pjllists.h.orig Thu Aug 5 13:38:09 2004 ++++ pjllists.h Thu Aug 5 13:38:19 2004 +@@ -152,4 +152,4 @@ + }; + + +-#endif __PJLLISTS_H__ ++#endif // __PJLLISTS_H__ diff --git a/security/pft/files/patch-pjlsession.cpp b/security/pft/files/patch-pjlsession.cpp new file mode 100644 index 000000000000..9aab242e0e0d --- /dev/null +++ b/security/pft/files/patch-pjlsession.cpp @@ -0,0 +1,412 @@ +--- pjlsession.cpp.orig Sat Jul 6 18:36:21 2002 ++++ pjlsession.cpp Mon Aug 9 11:39:10 2004 +@@ -3,7 +3,7 @@ + * + * $Id: pjlsession.cpp,v 1.7 2002/07/05 16:41:26 fx Exp $ + */ +-#include ++#include + #include + #include + +@@ -21,13 +21,14 @@ + #include // open(), close(), write() + #include + #include +-#endif UNIX ++#endif // UNIX + + + #include "pjlsession.h" + #include "pjllists.h" + #include "commands.h" + ++using namespace std; + + PJLsession::PJLsession() { + // nothing so far +@@ -69,7 +70,7 @@ + if (ts.stoken("@PJL INFO VARIABLES",0)==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_env(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -167,7 +168,7 @@ + if (ts.stoken("@PJL INFO ID",0)==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_devive_id(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -186,7 +187,7 @@ + _snprintf(numb,49,"%u",pass); + #else + snprintf(numb,49,"%u",pass); +-#endif UNIX ++#endif // UNIX + + connection.clear(); + connection.sendbuf.set(PJL_START); +@@ -206,7 +207,7 @@ + if (ts.findstr("@PJL DINQUIRE PASSWORD")==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::disable_pjl_password(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -219,7 +220,7 @@ + + #ifdef _DEBUG + cerr << "PJLsession::disable_pjl_password(): DINQUIRE didn't return result" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + + } +@@ -234,7 +235,7 @@ + _snprintf(numb,49,"%u",pass); + #else + snprintf(numb,49,"%u",pass); +-#endif UNIX ++#endif // UNIX + + connection.clear(); + connection.sendbuf.set(PJL_START); +@@ -277,7 +278,7 @@ + if (ts.findstr("@PJL DINQUIRE PASSWORD")==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::chk_pjl_password(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -290,7 +291,7 @@ + + #ifdef _DEBUG + cerr << "PJLsession::chk_pjl_password(): DINQUIRE didn't return result" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + + } +@@ -353,7 +354,7 @@ + if (ts.stoken("@PJL INFO FILESYS",0)==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_volumes(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -404,14 +405,14 @@ + if (ts.stoken("@PJL FSDIRLIST",0)==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_dir(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + + if (ts.stoken("\r\n",1)==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_dir(): strange! got echo but no more lines" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } else { + String err=ts.stoken("\r\n",1); +@@ -419,7 +420,7 @@ + if (err.findstr("FILEERROR")!=NULL) { + #ifdef _DEBUG + cerr << "PJLsession::read_dir(): Filesystem error " << err.token('=',1) << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + } +@@ -495,7 +496,7 @@ + if (ts.findstr("@PJL FSQUERY")==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::stat(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + +@@ -514,7 +515,7 @@ + #ifdef _DEBUG + cerr << "PJLsession::stat(): strange answer: '" + << ts.get() << "'" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + // failure ... +@@ -524,13 +525,13 @@ + if (err.findstr("FILEERROR")!=NULL) { + #ifdef _DEBUG + cerr << "PJLsession::stat(): Filesystem error " << err.token('=',1) << endl; +-#endif _DEBUG ++#endif // _DEBUG + return (-1); + } else { + #ifdef _DEBUG + cerr << "PJLsession::does_exist(): strange answer: '" + << ts.get() << "'" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + } +@@ -578,7 +579,7 @@ + _snprintf(numb,49,"%u",expsize); + #else + snprintf(numb,49,"%u",expsize); +-#endif UNIX ++#endif // UNIX + + filebuffer.clear(); + connection.clear(); +@@ -602,7 +603,7 @@ + if (ts.findstr("@PJL FSUPLOAD")==NULL) { + #ifdef _DEBUG + cerr << "PJLsession::recv_file(): did not receive command echo" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + if (ts.findstr("SIZE=")==NULL) { +@@ -614,13 +615,13 @@ + if (ts.findstr("FILEERROR")!=NULL) { + #ifdef _DEBUG + cerr << "PJLsession::recv_file(): Filesystem error " << ts.token('=',1) << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } else { + #ifdef _DEBUG + cerr << "PJLsession::recv_file(): strange answer: '" + << ts.get() << "'" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExPJLerror(); + } + } else { +@@ -633,7 +634,7 @@ + fsi=fsi.token('=',1); + #ifdef _DEBUG + //cout << "DEBUG: expected size: " << expsize << ", reported: " << atoi(fsi.get()) << endl; +-#endif _DEBUG ++#endif // _DEBUG + + // timeout depends on size (of course) ;) + connection.recvatleast((unsigned int)atoi(fsi.get()), +@@ -658,7 +659,7 @@ + if ((fd=open(filename,_O_WRONLY | _O_CREAT | _O_TRUNC | _O_BINARY))<0) { + #ifdef _DEBUG + cerr << "PJLsession::recv_file(): Could not open local file "< (\x0c) from device and discard it +@@ -771,7 +772,7 @@ + _snprintf(numb,49,"%u",filebuffer.length()); + #else + snprintf(numb,49,"%u",filebuffer.length()); +-#endif UNIX ++#endif // UNIX + + connection.clear(); + connection.sendbuf.set(PJL_START); +@@ -808,7 +809,7 @@ + #ifdef _DEBUG + cerr << "PJLsession::send_file(2): could not stat file " + << filename << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExInvalid(); + } + +@@ -817,7 +818,7 @@ + #ifdef _DEBUG + cerr << "PJLsession::send_file(2) Could not open local file " + << filename <0) { +@@ -960,7 +961,7 @@ + #ifdef _DEBUG + cerr << "PJLsession::upload_RFU_firmware() Could not open local file " + << rfu_file <0) { +@@ -968,10 +969,10 @@ + connection.sendbuf.set(rb,br); + connection.senddata(); + } +- std::close(fd); ++ ::close(fd); + } + +-#endif UNIX ++#endif // UNIX + + connection.clear(); + } +@@ -1016,7 +1017,7 @@ + if ((sttype==0)||(sttype>7)) { + #ifdef _DEBUG + cerr << "PJLsession::print_selftest(): out of range" << endl; +-#endif _DEBUG ++#endif // _DEBUG + throw ExInvalid(); + } + diff --git a/security/pft/files/patch-pjlsession.h b/security/pft/files/patch-pjlsession.h new file mode 100644 index 000000000000..71f886634cf7 --- /dev/null +++ b/security/pft/files/patch-pjlsession.h @@ -0,0 +1,21 @@ +--- pjlsession.h.orig Sat Jul 6 18:36:21 2002 ++++ pjlsession.h Thu Aug 5 15:25:00 2004 +@@ -70,10 +70,10 @@ + + // reads the volume information from device + void read_volumes(void); +- // reads an directory into the dir list ++ /* reads an directory into the dir list + // this method expects an absolute directory + // path like 0:\webserver\ +- // it also updates pwd (which can be see by get_pwd() ++ // it also updates pwd (which can be see by get_pwd() */ + void read_dir(char *str); + // returns the existence of a file or directory (return + // type is one of PJLFS_* or -1 for not found +@@ -133,4 +133,4 @@ + }; + + +-#endif __PJLSESSION_H__ ++#endif // __PJLSESSION_H__ diff --git a/security/pft/files/patch-rawmem.cpp b/security/pft/files/patch-rawmem.cpp new file mode 100644 index 000000000000..0279e9a8d7ff --- /dev/null +++ b/security/pft/files/patch-rawmem.cpp @@ -0,0 +1,27 @@ +--- rawmem.cpp.orig Sat Jul 6 18:36:21 2002 ++++ rawmem.cpp Thu Aug 5 18:53:38 2004 +@@ -2,7 +2,7 @@ + * + * $Id: rawmem.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ + */ +-#include ++#include + #include + #include + #include +@@ -10,10 +10,14 @@ + #ifndef UNIX + #include + #else ++#include ++#include + #include +-#endif UNIX ++#endif // UNIX + + #include "rawmem.h" ++ ++using namespace std; + + Rawmem::Rawmem() { + mem=NULL; diff --git a/security/pft/files/patch-rawmem.h b/security/pft/files/patch-rawmem.h new file mode 100644 index 000000000000..37448ca690f1 --- /dev/null +++ b/security/pft/files/patch-rawmem.h @@ -0,0 +1,8 @@ +--- rawmem.h.orig Thu Aug 5 13:40:01 2004 ++++ rawmem.h Thu Aug 5 13:40:10 2004 +@@ -52,4 +52,4 @@ + + }; + +-#endif __RAWMEM_H__ ++#endif // __RAWMEM_H__ diff --git a/security/pft/files/patch-tcpcon.cpp b/security/pft/files/patch-tcpcon.cpp new file mode 100644 index 000000000000..cb564223d886 --- /dev/null +++ b/security/pft/files/patch-tcpcon.cpp @@ -0,0 +1,158 @@ +--- tcpcon.cpp.orig Sat Jul 6 18:36:21 2002 ++++ tcpcon.cpp Thu Aug 5 18:54:27 2004 +@@ -2,7 +2,7 @@ + * + * $Id: tcpcon.cpp,v 1.2 2002/01/07 17:18:49 fx Exp $ + */ +-#include ++#include + #include + #include + +@@ -17,15 +17,17 @@ + // defined on Windows but not on UNIX + #define INVALID_SOCKET (-1) + #define SOCKET_ERROR (-1) +-#endif UNIX ++#endif // UNIX + + #include "tcpcon.h" + ++using namespace std; ++ + TCPcon::TCPcon() { + #ifndef UNIX + WORD wVersionRequested; + WSADATA wsaData; +-#endif UNIX ++#endif // UNIX + + // initialize values + memset(&dest,0,sizeof(dest)); +@@ -40,10 +42,10 @@ + if (WSAStartup(wVersionRequested, &wsaData)!=0) { + #ifdef _DEBUG + cerr << "TCPcon::TCPcon() starting WSA failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExWinSock(); + } +-#endif UNIX ++#endif // UNIX + } + + +@@ -51,7 +53,7 @@ + if (connected) closeconnection(); + #ifndef UNIX + WSACleanup(); +-#endif UNIX ++#endif // UNIX + } + + +@@ -61,7 +63,7 @@ + if ((he=gethostbyname(host))==NULL) { + #ifdef _DEBUG + cerr << "TCPcon::set_host(): gethostbyname() failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExResolver(); + } + +@@ -75,7 +77,7 @@ + if ((port<=0)||(port>65535)) { + #ifdef _DEBUG + cerr << "TCPcon::set_port(): port out of range\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExInvalid(); + } + dest.sin_port=htons(port); +@@ -92,21 +94,21 @@ + if ( ntohs(*((unsigned short *)(&(dest.sin_port))))==0 ) { + #ifdef _DEBUG + cerr << "TCPcon::startconnection(): port not set\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExInvalid(); + } + + if ((sfd=socket(AF_INET,SOCK_STREAM,0))==INVALID_SOCKET) { + #ifdef _DEBUG + cerr << "TCPcon::startconnection(): socket() failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExSocket(); + } + + if (connect(sfd,(struct sockaddr *)&dest,sizeof(dest))!=0) { + #ifdef _DEBUG + cerr << "TCPcon::startconnection(): connect() failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExSocket(); + } + +@@ -120,7 +122,7 @@ + closesocket(sfd); + #else + close(sfd); +-#endif UNIX ++#endif // UNIX + } + connected=false; + } +@@ -152,14 +154,14 @@ + if (sendbuf.length()==0) { + #ifdef _DEBUG + cerr << "TCPcon::send(): send buffer empty\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExInvalid(); + } + + if (send(sfd,(char *)sendbuf.get(),sendbuf.length(),0)==SOCKET_ERROR) { + #ifdef _DEBUG + cerr << "TCPcon::send(): send() failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExSocket(); + } + } +@@ -173,7 +175,7 @@ + if ((tp=(char *)malloc(TPSIZE))==NULL) { + #ifdef _DEBUG + cerr << "TCPcon::recvdata(): malloc() failed\n"; +-#endif _DEBUG ++#endif // _DEBUG + throw ExMalloc(); + } + +@@ -240,7 +242,7 @@ + throw ExTimeout(); + #ifdef _DEBUG + cerr << "TCPcon::recvuntilchr(): timed out\n"; +-#endif _DEBUG ++#endif // _DEBUG + } + } + +@@ -263,7 +265,7 @@ + throw ExTimeout(); + #ifdef _DEBUG + cerr << "TCPcon::recvuntilstr(): timed out\n"; +-#endif _DEBUG ++#endif // _DEBUG + } + } + +@@ -286,7 +288,7 @@ + throw ExTimeout(); + #ifdef _DEBUG + cerr << "TCPcon::recvatleast(): timed out\n"; +-#endif _DEBUG ++#endif // _DEBUG + } + } + diff --git a/security/pft/files/patch-tcpcon.h b/security/pft/files/patch-tcpcon.h new file mode 100644 index 000000000000..6031e5a188f8 --- /dev/null +++ b/security/pft/files/patch-tcpcon.h @@ -0,0 +1,17 @@ +--- tcpcon.h.orig Thu Aug 5 13:40:47 2004 ++++ tcpcon.h Thu Aug 5 13:40:58 2004 +@@ -9,7 +9,7 @@ + #else + #include + #include +-#endif UNIX ++#endif // UNIX + + #include "rawmem.h" + #include "exceptions.h" +@@ -101,4 +101,4 @@ + bool connected; + }; + +-#endif __TCPCON_H__ ++#endif // __TCPCON_H__ diff --git a/security/pft/pkg-descr b/security/pft/pkg-descr new file mode 100644 index 000000000000..9450670fa107 --- /dev/null +++ b/security/pft/pkg-descr @@ -0,0 +1,6 @@ +libPJL- Printer Job Language library +A library and a command-line tool to use PJL- HP Printer Job Language + +Author: FX + +WWW: http://www.phenoelit.de/hp/ diff --git a/security/pft/pkg-plist b/security/pft/pkg-plist new file mode 100644 index 000000000000..e27a4458e8c4 --- /dev/null +++ b/security/pft/pkg-plist @@ -0,0 +1,2 @@ +bin/pft +lib/libPJL.a