16 #include <sys/types.h>
32 #define DDEVENTITERATOR 1
33 #define FILEEVENTITERATOR 2
34 #define TESTEVENTITERATOR 3
53 int change_hf(
const unsigned int oldhf,
const unsigned int newhf);
96 #if defined(SunOS) || defined(Linux) || defined(OSF1)
105 COUT <<
"** usage: changehitformat infile outfile old new [old new...] " << std::endl;
134 int buffer_size = 2000000;
139 while ((c = getopt(argc, argv,
"s:d:n:w:vhi")) != EOF)
169 COUT <<
"Could not open input stream" << std::endl;
173 unlink ( argv[optind+1] );
174 fd =
open(argv[optind+1], O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE ,
175 S_IRWXU | S_IROTH | S_IRGRP );
178 COUT <<
"Could not open file: " << argv[optind+1] << std::endl;
182 buffer =
new PHDWORD [buffer_size];
184 ob =
new ophBuffer (fd, buffer, buffer_size);
188 unsigned int idold[1000];
189 unsigned int idnew[1000];
192 while ( optind +2 + argind +1 < argc)
194 sscanf(argv[optind +2 + argind] ,
"%ud", &idold[paircount]);
195 sscanf(argv[optind +2 + argind + 1],
"%ud", &idnew[paircount]);
196 COUT <<
"changing " << idold[paircount] <<
" -> " << idnew[paircount] << std::endl;
218 for (j=0; j<paircount; j++)
241 #if defined(SunOS) || defined(Linux) || defined(OSF1)
247 COUT <<
"sig_handler: signal seen " << std::endl;