17 #include <sys/types.h>
33 #define DDEVENTITERATOR 1
34 #define FILEEVENTITERATOR 2
35 #define TESTEVENTITERATOR 3
54 int change_id(
const int oldid,
const int newid);
92 #if defined(SunOS) || defined(Linux) || defined(OSF1)
101 COUT <<
"** usage: changeid infile outfile id1 id2 " << std::endl;
134 while ((c = getopt(argc, argv,
"s:d:n:w:vhi")) != EOF)
164 COUT <<
"Could not open input stream" << std::endl;
168 unlink ( argv[optind+1] );
169 fd =
open(argv[optind+1], O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE ,
170 S_IRWXU | S_IROTH | S_IRGRP );
173 COUT <<
"Could not open file: " << argv[optind+1] << std::endl;
179 ob =
new ophBuffer (fd, buffer, buffer_size);
187 while ( optind +2 + argind +1 < argc)
189 sscanf(argv[optind +2 + argind] ,
"%d", &idold[paircount]);
190 sscanf(argv[optind +2 + argind + 1],
"%d", &idnew[paircount]);
191 COUT <<
"changing " << idold[paircount] <<
" -> " << idnew[paircount] << std::endl;
213 for (j=0; j<paircount; j++)
236 #if defined(SunOS) || defined(Linux) || defined(OSF1)
242 COUT <<
"sig_handler: signal seen " << std::endl;