File: CHANGES.OLD

package info (click to toggle)
ifhp 3.5.7-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,220 kB
  • ctags: 1,647
  • sloc: ansic: 14,617; sh: 8,969; makefile: 613; perl: 311
file content (1387 lines) | stat: -rw-r--r-- 54,944 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
Version ifhp-3.5.6 - Sat Feb 23 07:36:20 PST 2002

  display@ option disables/enables display of console message
  display_size=nnn   sets size of display
    - lp:ifhp=display@   or ifhp -Tdisplay@
    - lp:ifhp=display_size=20 of ifhp -Tdisplay_size=20
   (Suggested by: Nick Bruton <Nick.Bruton@bristol.ac.uk)

  HOWTO correction: 'sduplex' is alias for 'duplexshort'
  (Correction by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>)

Version ifhp-3.5.5 - Fri Feb 22 16:47:59 PST 2002

  Lexmark 4039 should be:
    ps_sync=
      serverdict begin 0 exitserver
      statusdict begin true setenginesync end
    ps_async=
      serverdict begin 0 exitserver
      statusdict begin false setenginesync end
  (Reported by: Johan Bengtsson <elijah@dd.chalmers.se>)

  On the alpha, cc insists that (the line of the beast):
    > cc: Error: ../../src/perlobj.c, line 666:
         In this statement, "p->info.array.value" and "len" cannot be added. (noadd)
    > memmove(p->info.array.value+len, p->info.array.value, olen+1 );
    > --------^
    > As far as I can tell, p->info.array.value is a void*, so adding an int to
    > it is not allowed.  I suggest you explicitly cast it to (char *), like in the
    > previous line, *((char *)(p->info.array.value)+olen) = 0;
    > This is also the case in lines 615, 713, 813, and 837.
  Fixed.  I wonder why GCC -warn did not catch this?
  (Reported by: Hans Peter Verne <h.p.verne@usit.uio.no>)

  HP8100 'ps_tabloid' selection should really be
   ps_ledger.
  (Patch from: Steven J. Birt <sbirt@sedona.ch.intel.com>)

  Replaced PDF2PS with the GhostScript conversion stuff.
   (Idea from:  Thies Meincke <rz4a016@uni-hamburg.de>)


Version ifhp-3.5.4 - Fri Feb  8 19:23:05 PST 2002

  Use the new OBJ library and debug options:
  debug=
    0-6  - displays details about job handling.
           bigger the number, more detail
    database, database+1 - database+4 - ifhp.conf parsing
         REALLY verbose
    utils, utils+1 - utils+4 - OBJ library, REALLY verbose
                
  Fixed up PostScript printer messages when the printer
  detects an error.  This problem appears when a bad PostScript
  job is sent to the printer and the printer returns status
  information.  Some of the fields are 'unusual' for some
  vendors.  Rather than just display the 'error' information,
  I now put out the whole PostScript status message.

  The 'gs_converter' values needed '|cat >&3'.
  (From the mystery poster: imacat@mail.imacat.idv.tw)

  GhostScript developers have added a -dPARANOIDSAFER flag
  to solve some security issues.  Added this to the gs_converter
  definitions.

  The 'pagesize' option has been merged into the papersize
  facility.  Now you can select the papersize from PCL and
  PostScript using the same facility.  This is, as they say,
  a one-size-fits-all approach.  You must modify the ifhp.conf
  file now if you want to add more paper sizes/changes.
  This is kinda reasonable...

    The method used was to add a translation table
    (pcl_papersize_index for PCL), and to use the
    %d{key,lookuptable} facility.  This does a lookup on the
    value for 'key' and then translates it using it as a key
    into the lookuptable.  The lookuptable has to be a value
    which hash the format:  k=value k=value and this is then
    split into a hash and used for the lookup.


Version ifhp-3.5.3 - Tue Jan 22 16:17:59 PST 2002

  changed a lot of strxxx to safestrxxx to avoid problems with
  strxxx coredumps when passed NULL strings.

  Missing check to see if output is to a file - if so,  then
  we set status@
    (Courtesy: Jim Trocki <trockij@transmeta.com>)

Version ifhp-3.5.2 - Fri Dec 21 11:08:36 PST 2001

  New parallel port birectional IO support.
  This has been tested on RedHat 7.2 linux (Kernel 2.4.7-10),
  FreeBSD 4.4-Release.  It is REALLY stupid,  but it seems to
  work.  If you turn the printer on and offline then you might
  get an IO error.  Note that the printer must be connected and
  detected by the kernel for bidirectional IO to work,  otherwise
  the IEEE nibble mode will not be enabled.  I wish there was a
  way to force this to be rescanned at open(),  but it does not
  appear to be easily done.  Of course,  if you turn your printer
  on,  then it may or may not work...

  New USB port birectional IO support.
  This has been tested on RedHat 7.2 linux (Kernel 2.4.7-10),
  FreeBSD 4.4-Release.  The parallel port code seems to also
  handle USB ports as well.  Amazing...

  I have also put in some friendly 'hints' why you may not be
  getting status.  This will help the folks who have problems.
  I have also update the ifhp man page to reflect this.

  Added @PJL RESET to the PJL setup commands.

  Note: Should I also add a PJL INITIALIZE as well?  This will
  control the sticky fingers on the control panel.  But 
  if this is the case then I suggest that the admins use
  a special job and lock the control panel.  See the PJL refence
  manual for Password and DEFAULT stuff.

  Job cancellation now handle gracefully... but you still have
  to send the entire job to the printer...  This is a bit of a
  pain,  but it seems to be the right thing to do.

  Update gs invocation,  using clever trick from the foomatic folks:
    Grant Taylor (www.linuxprinting.org).
   gs ... -sOutputFile=|cat >&3 3>&1 1>&2
  This causes the error messages and other things to be sent to STDERR.
  Ummm... This may fail,  so make sure that /bin/cat is fixed up.

Version ifhp-3.5.1 - Mon Dec 17 20:17:53 PST 2001

  The ifhp=option,option...  was being ignored.  It is
  now not ignored.  The processing is:
    printcap ifhp=option1,option2
    command line -Toption3,option4 -Zoption5,option6

    As the options are processed, they are put into a list:

    option order: option1,option2,option3,option4,option5,option6

    If they have form:  option=value,  the values are set as
    the list is constructed.  Next, they are scanned for effect,
    i.e. - simplex, duplex, etc.  and those which cause output
    have output generated.

  (Pointed out by: Akop Pogosian <akopps@CSUA.Berkeley.EDU>)


Version ifhp-3.5.0 - Tue Dec 11 17:19:24 PST 2001

  Fixed up configure, make files, DISTRIBUTIONS, stuff.
  
  sh STANDARD_configuration now install man pages in /usr/share/man
     if it is available.

  Updated man pages,  clarified default set of options.

  gs_hplj4 printer entry now accepts PJL as all of the associated
  printers accept PJL.

Version ifhp-3.4.9 - Wed Nov 28 10:10:25 PST 2001

  Added 'pjl_done_msg' to ifhp.conf:
  ## Set console message when job is done
  ##  Set this to empty string if you do not want a ready message
  ##  at end of job
  pjl_done_msg = Done: \%s{n} \%s{J}:\%s{P}

  Freeing memory already freed.
   (Reported by: imacat@mail.imacat.idv.tw)

Version ifhp-3.4.8 - Thu Oct 18 14:07:52 PDT 2001

  Modified configure messages for clarity.

  The PJL JOB START stuff was really messed up - missing buffer[0] = 0
  caused junk message to be sent to the printer (sometimes).
  (Found, reported with a gleeful cackle, and patch sent by:
      Jason Keltz <jas@cs.yorku.ca>)

  The PJL 'STARTPAGE' and 'ENDPAGE'  options need quotes around them.
  Now you can do 'lpr -Zstartpage=1,endpage=2' and it will work.

Version 3.4.7 Tue Oct 16 13:37:17 PDT 2001

  Added pdf2ps conversion support in ifhp.conf

Version 3.4.6 Fri Sep 14 12:45:11 PDT 2001

  Corrections and format errors in IFHP-HOWTO corrected.
  Thanks to Rick Cochran <rcc2@cornell.edu>
   (Patch by: Rick Cochran <rcc2@cornell.edu>)

  ifhp support for 'inet_ntop' used mystrncpy()
  (Patch supplied by: Dejan Ilic <svedja@lysator.liu.se>)

  Updates to the ifhp.conf file for HP 4050, LN15, LN16, LN17 printers.
  (Update by: Helmut Kreiser, <H.Kreiser@gsi.de>)

  Added SCO 5.5 patches:
    From: Paul Freeman <prf@eml.com.au>
    SCO doesn't define MAXPATHLEN in the 'normal' include files
    (it is in arpa/ftp.h). Instead they use PATHSIZE (in sys/param.h).
    SCO doesn't define the S_ISSOCK POSIX macro.
    My investigations reveal the mode of a socket is 0020000
    (same as a character special).  I have defined the S_ISSOCK macro
    This results in a duplicate test in lpd_jobs.c at lines
    2407-2409 but this is harmless.

  Added SCO 5.5 patches:
	From: Paul Freeman <prf@eml.com.au>
    SCO doesn't define MAXPATHLEN in the 'normal' include files
    (it is in arpa/ftp.h). Instead they use PATHSIZE (in sys/param.h).
    SCO doesn't define the S_ISSOCK POSIX macro.
    My investigations reveal the mode of a socket is 0020000
    (same as a character special).  I have defined the S_ISSOCK macro
    This results in a duplicate test in lpd_jobs.c at lines
    2407-2409 but this is harmless.

Version 3.4.5 Mon Aug  6 12:59:27 PDT 2001
  The pjl_ready_msg string was not being used for PJL JOB
  commands.  Thus,  the console message was not correct.
  (Noticed by: Jason L Tibbitts III <tibbs@math.uh.edu>)

  Much nicer console message support by:
      Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>

  The following change/update/modification was inspired by
  a set of patches from
       "Daniel E. Singer" <des@cs.duke.edu> 
  who had some REALLY nice ideas.

  Added a 'no converter' and 'conversion error' to the
  file_output_match:
    file_output_match = [
       ...
       *       msg   no_converter
    ]
  The '* msg no_converter' is appended to the
  end of all of the 'non-empty' file_output_match
  entries.

  The 'no_converter' is used to lookup the message; if
  postscript enabled then ps_no_converter value, else if
  pcl enabled then pcl_no_converter value, else
  no_converter

  Here are the default values:

  ps_no_converter = %!PS-Adobe-3.0
    /Courier
    findfont 10 scalefont setfont
    72 500 moveto
    (No conversion available for type '\%s{file_output}') show
    showpage
  
  no_converter = No conversion available for type '\%s{file_output}'
  
  Similarly, if the conversion fails,  we use 'conversion_error'
  (we also define some some handy strings as well):
  ps_conversion_error = %!PS-Adobe-3.0
    /Courier
    findfont 10 scalefont setfont
    72 500 moveto
    (Conversion failed for type '\%s{file_output}') show
    72 480 moveto
    (Using '\%s{pgm}') show
    72 460 moveto
    (Error: '\%s{msg}') show
    showpage
  
  conversion_error =  Conversion failed for type '\%s{file_output}'
    Using '\%s{pgm}'
    Error: '\%s{msg}'

Version 3.4.4 Sun Dec 24 17:52:16 PST 2000

  Added ALL the user options to the ifhp.conf.in file so that
  you can use them.  You now have all the PostScript, PCL, and
  PJL options available for use.   Of course if your printer does
  not support this facility,  nothing will happen.

  Pagecounter polling now works as advertised, sort of,  most of the
  time,  (I hope).  You can specify a 'pagecount_poll' value and
  it will poll the printer for a 'non-changing' pagecounter value
  the specified number of times (default=1).

  Fixed up the ifhp.conf entries for HP Laserjet III aka LJ4
  # PRINTER % - HP LaserJet III (PCL and PostScript Interpreter)
  [ hpiiisi hp3si ljet3 lj3 ]
     This now assumes a PostScript interpreter on the printer
  # PRINTER % - HP LaserJet III (PCL, PostScript via GhostScript)
  [ hpiiisi.gs hp3si.gs ljet3.gs lj3.gs ]
     This now assumes you use GhostScript

  Added a section in the README for Solaris compilation.

  The dreaded GCC 2.95 check for character values as indexes
   got me again.
  (Reported by: Lots and lots of people,  including
    Jonas Olsson <lexicon@lysator.liu.se>)

  Added a 'pcl_term' and 'ps_term' option to allow PCL and PostScript
   strings to be send immediately after the job file and BEFORE the
   PCL EOJ or PostScript EOJ.
    (Inspired by: David E. Cross <crossd@cs.rpi.edu>)

  HPUX compilation without GCC had a gratuitious CFLAGS=-Aa.  I removed the flags.
   (Reported by: Ryan Novosielski <novosirj@umdnj.edu>)

Version 3.4.3 Thu Nov 30 09:28:33 PST 2000

 There is a total bizzarity of operation that seems happen
  with various printers.  If the printer goes 'offline' or
  fails to respond for a long time,  then the code tries to
  send command sequences that will force the printer
  to respond or retry the last operation.  These happen during:
	 SYNC sync_interval = 20 seconds default
	 PAGECOUNT pagecount_interval = 20 seconds default
	 WAITEND waitend_interval = 300 seconds default
  I have 'robustified' the code beyond all sensible levels...
  lets see if this works.

 Device Information for the 'appsocket' protocol is now obtained
   from the PRINTCAP_ENTRY environment variable.  This allows you
   to have a simple standard printer configuration.  IFHP-HOWTO
   updated as well.

 I have added a VERY odd formatting capability for options:
   value=ThisString
   %s{value}   -> ThisString
   %U{value}   -> THISSTRING
   %M{value}   -> Thisstring
   %L{value}   -> thisstring

   Ah,  the joys of various programs that want 'UPPERCASE'
   'Leading case' or 'lowercase' for option values.
   This now allows you to have
      lpr -Zpaper=legal
      -> Zlegal
      -> a2ps -M %M{paper}
      -> a2ps -M Legal
   which is truly a hack of the worst kind.  However,  the
   alternative is to support a modified version of GhostScript
   (yes... it is fussy as well),  mpage, a2ps, etc etc etc


 GhostScript now gets paper sizes passed to it if you use
 the standard 'letter legal ...' OR paper=letter OR
 papersize=XXX

 This is managed by a new configuration entry:
 papersize= a1 a2 ... letter legal
   - all the sizes that GhostScript can handle
 papersize_default= letter    - default value.

 The '\%s{papersize}' is a BUILT IN that handles this
 by searching the -Z and -T options for the last entry
 in the papersize list and using this as the size value.

 And of course, GhostScript conversion now has a
 -PAPERSIZE=\%M{papersize} entry.
   

Version 3.4.2 Mon Oct 16 09:29:53 PDT 2000

 unsetenv does not exist on some systems,  and I better
  check all the executables.
  (Spotted by: Christian Haul <haul@dvs1.informatik.tu-darmstadt.de>)
 The 'shutdown_app_socket' option is now made the default.  This will
  cause ifhp to do shutdown(1,1) and then read from the printer
  until EOF.  This solves the mysterious 'RST' packets that have
  terminated connections and caused the printer to abort printing.
  (Astute observeration by: Gerald Damian <gdamian@ford.com>)
 ifhp was exiting when it got an 'out of paper' message.  A bit
  too extreme, this one.
  (Reported by: Scott Schwartz <schwartz@bio.cse.psu.edu>)

Version 3.4.1 Sat Oct 14 13:37:40 PDT 2000

 Updated Internationalization

 Fixed up some errors in the ifhp.conf comments.
 (Spotted by the eagle eyes of: Pekka Savola <pekkas@netcore.fi>)

 Added a 'forceprocessing' flag as suggested by Brendon Hack.
  (Patch and suggestion by: Brendan Hack <bendy@bendys.com>)

 PostScript, CTRL-D and CTRL-T support
  There are many printers which do not like/allow the CTRL-D
  (Serial port 'end of job' indication) and/or the CTRL-T
  (Serial port 'request status' indication) over network or
  parallel port connections.  This is yet another attempt to
  handle this in a simple manner:

  ps_eoj           (default TRUE) - use ^D
  ps_eoj_at_start  (default TRUE) - use ^D at start of job
  ps_eoj_at_end    (default TRUE) - use ^D at end of job

  ps_ctrl_t        (default TRUE) - use ^T to solicit status
  end_status=busy:idle     use these keywords in the status
    indication solicited by CTRL-T or when there is an error
    to determine that the job is done.

  If your printer cannot handle ^D at all, set: ps_eoj@
  If your printer cannot handle ^D at job start,
    but requires it at job end, set: ps_eoj_at_start@
  If your printer cannot handle ^D at job end,
    but requires it at job start, set: ps_eoj_at_end@
    (I don't think this is possible, but it is included
    for completeness).

  If your printer cannot handle CTRL-T in the input stream
    or cannot return status when solicited, set: ps_ctrl_t@

Version 3.3.22 - Sun Aug 20 11:24:02 PDT 2000
 The 'read from parallel port' code caused status@
  to be ignored.  Just a tad aggressive on this,  I was.
 (Reported by: Godfrey <godfrey@hattaway-associates.com>)

Version 3.3.21 - Fri Aug 11 12:49:40 PDT 2000
 After a deep look into parallel port IO and bidirectionality,
  I have come to the conclusion that it is possible to handle
  this,  at the cost of a high polling rate at the process level.

  To this end,  the Read_write_timeout() code has been rewritten,
  and now does polling.  This actually works BETTER than the
  original version in my tests.

  First, the device must be opened read/write.  This is done
  by LPRng when you set the :rw flag -
   lp:
     :rw:lp=/dev/tty0

  Next, if the device is a character device (S_ISCHR(statb.st_mode)
  is true AND not a tty (isatty(fd) returns 0) then ifhp will perform
  IO by doing a write followed by a read().  On Linux systems
  the read is done in blocking mode;  on non-Linux systems it is
  done in nonblocking mode. It is expected that the read will
  either terminate with a 0 value (nothing to read), -1 and
  errno set to 'EWOULDBLOCK' or 'ENOAVAIL' or an appropriate
  error code indicating no status,  or  N where N is the number
  of bytes read.  If this code is run on a non-linux system
  which has implemented bidirectional IO and this does not work,
  I would be interested in hearing about this.  Note that on
  these systems the 'nonblocking' and 'blocking' calls might need
  to be removed.  Please try this and tell me the results and I
  will update the ifhp filter.

  I have added a small flag for the convenience of people who have
  some very strange accounting requirements.  The 'wait_for_banner'
  flag causes the OF filter mode to wait for banner printing
  to be completed before suspending.  This will allow the accounting
  facility to correctly assign pages to banners, jobs, and so
  forth.

Version 3.3.20 - Fri Aug 11 08:03:39 PDT 2000
 Fixed up error message for 'file_output_match' parsing so the
  original line is printed.
 You can now handle key += [ ] correctly.
 More tracing statements added to allow you to trace what option
  value is being used where.
 Expanded option values and interpolated escapes.  This allows
  things like:  ps_cardstock = [ media=Card\040Stock ]
  This will now expand correctly and be interpolated as 'Card Stock'.
  (Problem discovered by: Lars Kellogg-Stedman <lars@larsshack.org>)
 You can try to do job nesting using things like:
    :ifhp=model=hp,pjl_job@,of_options=pjl_job
  This requires that you also use 'PJL ECHO' for end of job detection.

Version 3.3.19 - Sat Jul 15 17:08:42 PDT 2000
 Fixed the configure error message about the file utility so that
  it referenced the ftp://ftp.astron.com/pub/file/ site.
  (Note by: Raymond Lam <R.Lam@qmw.ac.uk>)
 Do write with timeout if the output device
  is not readable.  Also if the device is readable,  then it
  must not be a file, block device, or character device and not
  a tty.  Forced blocking mode on file descriptors before
  calling select.  This appears to solve the problem with 'select' failing
  on various devices.
 Statistics were bogusly computed, progress_k did not work
  correctly.
  (Patch by: Tom Fitzgerald <tfitz@MIT.EDU>)
 Tried to speed up output when an OF filter is being used by
  not having the OF filter confirm that the banner was output, but
  simply proceed with no checks. This, of course, results in a
  bogus page count by the IF filter.  But it seems to speed things
  up quite a bit.  This also now behaves like the older versions
  of ifhp that did not check for end of job when stopping of
  filters.  C'est dommage!

Version 3.3.18 Sat Jul  8 12:35:16 PDT 2000
 gs_unidriver entry had \%s{gs_device}.upp instead of
  \%s{gs_device}
 Found by: Mark Steph <mark.steph@ericsson.com>
 Added ps_eoj_at_start@ to HP 8550 printer entry,
   which does not like ^D at start of PostScript jobs.
  (Discovered and reported by: Micheler Klaus <Klaus.Micheler@infineon.com>)
 Update ifhp.conf with phaser360, phaser740, phaser550
  Need different PostScript than the Phaser 350 and 550
  (Supplied by: Michael J. Carter <mcarter@lanl.gov>)
 Modified the Is_readable() to use fcntl() to get the RD,RW,WR
  status of the file descriptor.
 Added options:
     pjl_ready_msg = \%s{n} \%s{J}:\%s{P}
     pjl_display_size = 20
  The 'ready_msg' is expanded and displayed on the printer
  console display.  The display has at most pjl_display_size
  characters.
  (Patch supplied by: John R Lane <lanejohn@cse.msu.edu>)

Version 3.3.17 Thu Jun 22 07:49:35 PDT 2000
 The ifhp.conf file references the GhostScript uniprint driver
  configuration file 'stc1520.upp' or 'stc1520'.  This was taken
  from the GhostScript documentation.  In reality,  this is the
  'stc1520h.upp' configuration file.  Corrected in the ifhp.conf
  file and email sent to the GhostScript support group.
  (Reported by: Gerald Damian <gdamian@ford.com>)
 The accounting information written to the accounting file did
  not include user and printer name.  The 'accounting_info' option
  now allows you to specify the additional command line options you
  want added to the line written to the accounting file.
  (Reported by: Jonathan Knight <jonathan@cs.keele.ac.uk>)
 The accounting script did not have any options passed to it.
  You now get the same options as with the 'accounting_info' added
  above.
  (Patch supplied by: Ian MacPhedran <Ian_MacPhedran@young.usask.ca>)

Version 3.3.16 Mon Jun 19 09:38:40 PDT 2000
 If the status file is not open and an error message
  needs to be put out,  it is now put out on STDERR.
 All fatal messages are also put out on STDERR as well,  so
  you can see the information in the printer log file.
  This solves the problem of the 'silently vanishing filter'.
 The DISTRIBUTIONS/FreeBSD Makefile updated.

Version 3.3.15 Fri Jun  2 18:01:36 PDT 2000
  Updated configuration file entries so that they
   match reality a bit better.
  Fixed up problems with using GhostScript and options
  If the model information is not found then an error is
   reported.
  Updated status reporting so it was not as verbose.
   (Patch by: Ian MacPhedran <Ian_MacPhedran@young.usask.ca>)

Version 3.3.14 Fri Jun  2 18:01:36 PDT 2000
  configure now checks to see that the file utility handles the
   file - option correctly.
  The ifhp.conf file now lists the HP8000 as a 'laserjet'
   (Spotted by: David Kerr Livingstone <davidl@cn.ca>)
  The test for pagecounting did not handle 'no status' correctly.
  Update the IFHP-HOWTO to use DocBook format.

Version 3.3.13 Wed May 24 09:45:32 PDT 2000

  added of_options option,  which are a set of options
  that are used if the filter is in OF mode.  This allows:

  :ifhp=pagecount@,sync@,waitend@,of_options=pagecount sync waitend

  So you can fling jobs at the printer as fast as possible and have
  the of filter do the dirty work of getting pagecounter values.

  I have modified the behavior of ifhp when it is running in OF mode.
  Previously, when running as an OF filter it would operate in
  'passthrough' only mode and not detect the type of file it was
  printing.  This would cause problems as usually the banner was
  the file it was printing and various 'setups' needed to be done
  to print the banner correctly.  Now when it runs in OF mode it
  reads the input into a file,  carefully looking for the '\033\001'
  sequence,  and when it finds it,  prints the file using the normal
  printing functions,  and then suspends itself.  This greatly
  improves the robustness of banner printing,  etc.,  as the whole
  9 yards^H^H^H24 meters of the ifhp filter processing is applied
  to the file.

  As far as I can tell,  this appears to break no existing applications,
  programs,  processing, etc.,  and now allows 'whacko' banner
  pages to be printed.  Sigh...

  The console now displays the userid even when ifhp is getting
  the pagecount stuff.

  Edited the IFHP-HOWTO and update the section on pagecounts.

  Added an lseek() in a couple of critical places to rewind the
  input.
    (Noticed by: Niklas Edmundsson <nikke@ing.umu.se>)

Version 3.3.12 Mon May 22 15:14:11 PDT 2000

  The 3.3.12 distribution was screwed up - the old Makefile
  rather than the new one was used... oh the joys of RCS version
  control.

  Added a 'pagecount_start' and 'pagecount_end' flag to allow you
  to skip pagecounts at job start or end.

  Discovered the 'no_ps_eoj' and 'no_pcl_eoj' flags were conflicting
  with other stuff,  and changed them to 'pcl_eoj_at_start' and
  'ps_eoj_at_start'.  Names are now compatible with rest of options.
  By the way,  these flags look really strange...  I wonder what
  horribly strange printer inpired them?  Sigh... got to flag
  changes with printers but then some manufacturers would get a bit
  annoyed.  "Its not a defect, it's a feature!"  Sigh.

Version 3.3.11 Sat May 20 09:37:02 PDT 2000

  Fixed up a couple of missing 'ps_user_opts' entries

  Added a tc=entry1,entry2,... facility to allow you to include
  entries.  WARNING:  this is a literal include facility, so the
  placement of the tc=... is critical.

  Model configuration selection:
    The ifhp.conf information is first scanned for the 'default'
    model information,  and then for model specific information.
    This allows you to add new 'default' values to the end of
    the ifhp.conf file and have them override the supplied
    ifhp.conf file.
    For example:
       #ifhp.conf - default
       forceconvesion@
       ...  more default values
       [ hp3* ]
        ....  values specific to hp3*

       #--- end of the supplied stuff
       # user supplies this
       [ default ]
       # overrides default forceconversion
       forceconversion
       [ hp3* ]
       # overrides hp3* values

  Makefile:  install -s on some system does now work with
    with script files,  so Makefile changed to accomodate this.

  You can now use key += value to append to an option value.
  For example:
    key = [ this that ]
    key += [ the other ]
      ->  [ this that the other ]
    key = value
    key += newvalue
      -> value newvalue
    key +=
      on a line
      -> value newvalue
        on a line

    You want to you can now add stuff to an existing entry.
    This makes things like the following possible:
    [ xx* ]
    key = [ basic ]
    [ xx1 ]
    key += [ morefor1 ]
    [ xx2 ]
    key += [ morefor2 ]

  The 'a2ps', 'enscript', and similar programs may exit with bogus
    error codes if they need to wrap lines, change fonts, etc.
    The use of a 'wrapper' script is documented in the ifhp.conf
    file and the HOWTO.

  The -Zstartpage=xxx and -Zendpage=xxx options were not implemented
    and documented correctly.
    (Patch by: Ingo Jauer <ij@math.uni-bremen.de>)

  Makefile.in did not have $(SRC)/ifhp.conf.template
   (Noted by: Bill Kamp <wdkamps@srpnet.com>)
  Makefile did not remove some files created during configure
   (Patch by:  George Lindholm <George.Lindholm@ubc.ca>)
  Fixed a problem with SIGCHLD handler - now sets the SIG_DFL
  Modified the 'Do_waitend' code to better handle appsocket and
   other printers that return strange error status.
  Modified the 'End_ctrl_t' option so that end_ctrl_t@ suppresses
   the use of CTRL_T to obtain status information.
  The Process_OF code did not reset the nonblocking mode of the
   output descriptor after restarting.  This could be a problem
   for devices that do not return status on time.
  The amount and size of files printed is now a double, making
   the progress when printing 2GByte files correctly reported.
   Amazing,  the size of files that people print...
  There was a very strange behavior of list variables that caused
   a memory leak.  If you had:
     xx=testxx
     pjl_yy=testyy
     pjl_nn=[  v\%s{xx}=value v\%s{yy}=value ]
    then the variable would be set to: 
       v\%s{xx} -> vtestxx (look up xx first, then pjl_xx)
       v\%s{yy} -> vtestyy (look up yy first, then pjl_yy)
    so you get the effect of:
     pjl_nn=[  vtestxx=value vtestyy=value ]
   This behavior has been modified to restrict the expansion to
     keys appearing in a list ( [ ... ]).
   I don't have the faintest idea why this was in the code,  and
   it appears to be a development coprolite.
  Read_write_timeout() code has been Turkey Proofed.  Now
   will exit with nasty message when called with inconsistent
   parameters.
  The Process_OF code was modified in order to make it more readable.
  A more rigorous check for option appsocket and a missing dev=
   option was put in.  A malformed printcap file prompted this check.
  Bad coding with the 'banner' stuff once more revisted.  Arrgghh...
   history and compatiblity is ugly.  The problem here is trying
   to be compatible with older releases of LPRng.
    -- we should have LPRng generate banners
    -- need to generate banners based on printer type
    -- thus ifhp needs a 'banner generation' mode
          bp=/..../ifhp -Tbanner_only
          bp=/..../banner  -> symlink to ifhp
  Added a 'set nonblocking' calls at the appropriate places
   to make sure that write will be done correctly.
  Did not terminate argv[] array with 0, caused execve problems.  Also
   fixed up '/bin/sh -c' passing of converters
  The ARGV, ZOPTS, and TOPTS were not being passed to converters correctly.
   (Discovered by: Johan Claesson <Johan.Claesson@uab.ericsson.se>)
  When using a converter, ZOPTS and TOPTS have been replaced by
   \%s{Z} and \%{T}, and you need to use \%s{ARGV}.  Duh!


  The lookup code for parameters, etc., was using 'strcasecmp' rather than
    'strcmp'.  This had the effect of folding options with names such as
    A4 and a4 to the same entry.  The code has been modified so that
    we lowercase the -Z and -T stuff, and lowercase strings where they
    are used to initialize a lookup table.  I wonder where my mind was at
    when I decided to make name lookup case insensitive.  Never again!
    Bad BAD idea.  This is OK for user interface options,  but HORRIBLE
    for internal lookups.
   (Original discrepancy noted by:  Willi Burmeister <wib@cs.uni-kiel.de>)
  For some very odd reason I was adding the ARGV arguments to the
   accounting information.  This caused problems when a -T argument was
   passed as the first -T argument was the elapsed time.
  The \%s{name} lookup was not looking in the -Zopts for values.
  Moved the 'ps_sync' and 'ps_asynch' entries in the ifhp.conf.template
   to the defaults area so that other models can use them.
  The close_on_exec() code failed on systems where the number of
   file descriptors returned by getdtablesize(0 was bogus.  Used the
   Get_max_fd() code.  Oh, for a 'max open fd' call...

  Removed banner printing ENTIRELY.  Banner printing support is
   now done by LPRng.  Should have done this LONG ago.  Breaking
   point reached when 'ld' string was used and this broke banner
   printing.  Grrr... 

  Fix up the format conversion program specification so that you can use
   \%s{name} parameters in the program list:

     file_output_match = [
       *pcl*        pcl \%s{pcl_converter}
       *ps*         ps  \%s{ps_converter}
       *postscript* ps  \%s{ps_converter}
       *pjl*        pjl \%s{pjl_converter}
      ]

     device=epson
     resolution=-r240x72
	 ps_converter= [ /usr/contrib/bin/gs -dSAFER -dBATCH -q -sDEVICE=\%s{device}
		\%s{resolution} -sOutputFile=- -
	  ]

   Added a 'ghostscript' device as well:

	# PRINTER gs_support - Printer with GhostScript conversion
	[ ghostscript ]
	pcl@
	pjl@
	ps
	text

	# device=epsonc
    # resolution=-r240x72
	ps_converter= [ /usr/contrib/bin/gs -dSAFER -dBATCH -q -sDEVICE=\%s{device}
	   \%s{resolution} -sOutputFile=- -
	 ]
	text_converter= [ /usr/contrib/bin/a2ps -q -B -1 -M Letter --borders=no -o-
	  | \%s{ps_converter}
	 ]

	file_output_match = [
	  *postscript*  raw  \%s{ps_converter}
	#  if your printer has PCL, use:
	  *text*  raw  \%s{text_converter}
	  ]
   This allows you to use a printcap with:

    lp:
      :lp=xxxx
      :ifhp=model=ghostscript,device=epsonc,resolution=-r240x72
      :if=/usr/local/libexec/filters/ifhp

   Makefile.in did not have default for UPDATE, and used $(SRC) - should
    have been ${SRC}.
      (Fix by: Willi Burmeister <wib@cs.uni-kiel.de>)

   Removed the 'UPDATE'

   Added DISTRIBUTIONS directory with testscripts for installation
    and package generation for various systems.

   Added the ability to send 'alerts' to operators or whatever
   based on filter activity.

	## PJL USTATUS information will include a lot of
	## codes that are just not interesting,  such as 'printer on line',
	## or 'power up'.  You can suppress reporting status for these codes
	## by putting their code numbers in this list

	pjl_quiet_codes=[
		10001
		40000
	  ]

	## Special error messages
	##  One per line
	##  The idea is that you may get an error code,  but you
	## it is not 'standard'.  You can add additional codes here
	## or override the default strings in the ifhp source.
	##
	pjl_error_codes=[
		10006=Toner Low
	  ]

	## Inform operator if this error number occurs
	pjl_alert_codes=[
	  15* 40* 41* 42* 44*
	  ]

	# use this program to write error to operator
	# error will be read from STDIN.  You can play games with
	# mail or whatever you want here.
	#  for example:
	pjl_alert_handler=/usr/local/libexec/filter/alert_handler

    The pjl_alert_handler program will read the error message on
    STDIN and is responsible for forwarding to the appropriate
    destination.

   Fixed up program forking and handling and put it in one spot.
    This was just a programming/debugging change.

   Went through the Appsocket code and ripped it out.  Fixed up the
    logical flow of things so that if you set the appsocket code you
    can use pagecount with 'ps' and have it work.  There is a
    workaround for the 'end of job' detection - if we have status
    enabled then we do the full 'idle detection' thing.  This will
    now cause us to exit correctly when we have Appsocket and get
    an EOF on the read.

   You can now have a 'filter' in the  file_output_match table:
	file_output_match = [
	  *postscript*  ps  \%s{ps_converter}
	  *pcl*         pcl  \%s{pcl_converter}
	  *pjl*         pjl  \%s{pjl_converter}
	  *printer*job*language* pjl
	  *text*  pcl  \%s{text_converter}
	  *gzip_compressed*  filter  \%s{gzip_decompress}
	  ]
    This will cause the indicated program to be used to decompress
    or recompress or whatever the input file.  This can be done add
    nauseum...  The mind boggles on what you can do with this.
    Courtesy of the a2ps and psfilter folks, who did a neat job...

   When Kyocera-FS1750 wakes up, it sends NULL PostScript status.
    This screws up or used to screw up 'waitend' operations.
    (Information and patch from:  Sebastian Wahl <wahl@id-pro.de>)

Version 3.3.10 Sun Oct 24 16:05:55 PDT 1999

  Updated 3.3.9 Change information with missing stuff.

  When using appsocket protocol,  the of filter was not opening the
  status file correctly and was sending junk to the printer.
  (Spotted by: John McCash <johnmc@rsch.comm.mot.com>)

  HP5SiMx (hp5simx) and similar printers with paper tray selection
   You should be aware that some HP and other manufacturers
  have a 'paper size' selection which OVERRIDES the normal tray
  selection.  If you are printing PostScript,  then by default
  the paper size is 'letter' and you will get paper fed from the
  tray with 'letter' paper in it.  If you have a4 or some other
  size you may get interesting results.  You should experiment with
  the various selection commands to determine if you need to have
  upper/lower or letter/ledger (a4/ledger) selection.  Very nasty,
  this.
    (Experimental results by:  John McCash <johnmc@rsch.comm.mot.com>)
   
  The -c (binary) flag was not setting any values and
  the RAW file type was not being handled correctly.
  (Reported by: Pavel Lisy <pali@tmapy.cz>)

  The 'file_output_match' value may now have the form '<pathname';
  the specified pathname will be opened and the contents used
  as the value of the match information.

  If the conversion filter specification contains the '|', '<', or
  '>' meta characters separated by single spaces,  then the filter
  is invoked using '/bin/sh -c "filter" This change allows us to
  put a pipe or other item in the filter specification.   Needless
  to say,  it also opens gaping security holes as well,  so the
  system adminstrator is warned to be careful.

Example:  (Note: lines have been broken for convenience -
  all conversion filter specification must be on a single line):

file_output_match = [
 # invoked via execve
 *postscript*  raw \
    gs -sDEVICE=epson \
        -sOutputFile=- -sPAPERSIZE=letter -q -
 # invoked via /bin/sh -c
 *text*  raw \
    /usr/local/bin/a2ps -q -B -1 -M Letter --borders=no -o- | \
    gs -sDEVICE=epson \
 	   -sOutputFile=- -sPAPERSIZE=letter -q -
]

OR
file_output_match = </usr/local/etc/ifhp.match

and /usr/local/etc/ifhp.match contains:

 # invoked vi execve
 *postscript*  raw \
    gs -sDEVICE=epson \
        -sOutputFile=- -sPAPERSIZE=letter -q -
 # invoked via /bin/sh -c
 *text*  raw \
    /usr/local/bin/a2ps -q -B -1 -M Letter --borders=no -o- | \
    gs -sDEVICE=epson \
 	   -sOutputFile=- -sPAPERSIZE=letter -q -

  Set SO_KEEPALIVE on sockets in order to try to handle defective TCP/IP
  implementations that do not handle connection RST correctly.

Version 3.3.9 Tue Sep 14 11:59:14 PDT 1999

  ---- Missing information from the Change Log
  *** WARNING:  configure strikes again
  ***
  *** ifhp.conf default location now
  ***  /usr/local/etc/ifhp.conf
  *** ifhp default location now
  ***  /usr/local/libexec/filters/ifhp.conf
  ***

  Why?  Because when trying to port this to XxxxBSD, BSDI, Solaris,
  SunOS, HPUX, DGUX,  etc etc etc I have run into so many inconsistencies
  that I have just given up.

  You might as well assume that the following is true for a default install.

  Updated configuration to be a little more consistent with other packages
   default installation directories:
     ${prefix}  is usually /usr/local
     ${libexecdir} is usually ${prefix}/libexec (/usr/local/libexec)
     ${sysconfdir} is usually ${prefix}/etc (/usr/local/etc)
     ${mandir} is usually ${prefix}/man     (/usr/local/man)

   We install the executables in:
     ${libexecdir}/filters/ifhp
     ${sysconfdir}/ifhp.conf
     ${mandir}/ man pages

   Suppose you wanted to put them in /usr/libexec/filters, and /etc:
     configure --prefix=/usr --sysconfdir=/etc

  ---


  Updated 'banner printing checking'
  There was a strange OF mode interaction between banner printing,
  leaders,  and flushing buffers.  This is a pain,  but here it is:

  a) if you want to have LPRng or the print spooler generate the banner,
     then you MUST:

      1. in ifhp.conf set banner@
         DO NOT examine input string for a 'generate banner line'
         Note that banner@ is the default.
      2. You can now generate a leader line (ld=\f\n)
      3. You can now generate banners using the :bp=/banner/printing/program/path

     THIS IS THE ASSUMED DEFAULT CONFIGURATION FOR LPRng and IFHP

  b)  if you want to use ifhp for banner generation you MUST:
      1. in ifhp.conf set banner or banner=(ps|pcl|text) - i.e.-
         examine input string for a 'generate banner line'
         Note that banner@ is the default
      2. in printcap set :sh@:sb   - i.e. - turn 'suppress header OFF' and
         'short_banner' on.  Note that :sh@:sb is the default
      3. DO NOT GENERATE A LEADER STRING  :ld=    (default)
      4. DO NOT HAVE A BANNER PRINTER PROGRAM :bp=   (default)

  c)  You can use ifhp to act as a banner printing program by using:

      :bp=/.../ifhp -Tbanner_only                   (uses first available type)
      :bp=/.../ifhp -Tbanner_only=(ps|pcl|text)     (uses specified type)

      Also,  /..../banner is a symbolic link to /.../ifhp, so you can use
      :bp=/.../banner                               (uses first avaiable type)
      :bp=/.../banner -Tbanner_only=(ps|pcl|text)   (uses specified type)

      Note that the effect of invoking ifhp with the name 'banner'
      is effectively the same as invoking it with the 'banner_only' flag.
      In fact,  it IS the same :-)

  Added 'no_udp_monitor' for the Appsocket protcol.  This prevents
   ifhp from using the UDP status port to determine if the print
   job is done.  This solves a problem with some Appsocket interface
   printers which do not respond correctly to the '\n\r' query for
   status.  You need to specify 'sync=ps' for these printers.
    i.e.:   -Tappsocket,sync=ps,no_udp_monitor,dev=xx.xx.xx.xx%35

  File type (language) detection and file conversion
  Unified the file type detection and conversion,  at the apparent cost
  of a bit of complexity.

   forceconversion   - forces file(1) utility to be used
   forceconversion@  - ifhp detects only PJL, PCL, PostScript,
         text and unknown

   # set to the default if you want
   default_language=unknown
   file_output_match = [
     *postscript*  ps
     *pcl*         pcl 
     *pjl*         pjl
   # if you need to convert to PostScript
     *text* ps /usr/local/bin/a2ps -q -B -1 -M Letter --borders=no -o-
   # if you can handle text, then simply change the type to pcl
     *text* pcl
   # match for '* gif *'
     *%20gif%20*  pcl /usr/local/bin/gif2pcl --autosize -x2400 -y3300 -d300 -o-
   # give up if you can't tell
     *             unknown
   # pass through if you can't tell
     *             raw
   ]

   # if the file type is TEXT and no converter,  then use the
   # text_converter and set the output to the text_converter_output value.

   text_converter=/usr/local/bin/a2ps -q -B -1 -M Letter --borders=no -o-
   text_converter_output=ps


   Note 1:  you can have spaces in patterns by using %20 (URL escape)
   Note 2:  if you do not have a converter,  then this simply changes
     the type.
   Note 3: you can have ZOPTS, TOPTS, or ARGV as an option, which is
   replaced by -Zzopts, -Ttopts, or the entire argument list for the filter.
   You can also use \%{name} to get the name option value.

   Banner printer alias (./banner -Tbanner=xxx) now accepts banner type
   on command line.

   Removed 'pclbanner' from distribution - really should be in LPRng

Version 3.3.8 Thu Aug 26 20:32:18 PDT 1999
  If there is a config file (ifhp.conf) missing or unreadable,
  we termiante with an error.  This will help with the problem
  of missing or unreadable configuration files.

  Note:  I considered also adding a test for the ps, pjl, flags
  actually present in the file,  but I thougth this was overkill.

Version 3.3.7 Thu Aug 26 20:32:18 PDT 1999
  Configure was not installing things in the right places.  We now have:
   --with-configfile=path     ifhp.conf explicit locations
   --with-admindir=DIR     directory to install ifhp.conf, default:
        \${prefix}/etc
   --with-filterdir=DIR    where to install ifhp executables, default:
       \${prefix}/lib/filters,

   a. if you specify configfile,  then admindir is not used 
   b. if you specify admindir, then you get .../etc/ifhp.conf,./ifhp.conf as files

   defaults: prefix = /usr/local
     configfile would be /usr/local/etc/ifhp.conf
     filter directory would be /usr/local/lib/filters

   If you set prefix=/usr, you get
     configfile would be /usr/etc/ifhp.conf, which is
      probably not what you want

   If you set prefix=/usr, admindir=/etc
     configfile would be /etc/ifhp.conf
     filter directory would be /usr/lib/filters

Version 3.3.6 Fri Aug 20 16:14:27 PDT 1999
  Again,  the Appsocket protocol causes problems.  The Do_waitend
    code had to be redone.
  Added some more printer configurations.
  The end of the ifhp.conf file now has the line #### XXX END XXX #####
  This allows you to append your local stuff to the end of the standard
  ifhp.conf file.

  The [default] entry is used to provide overrides for default values.
  This should appear as your FIRST user addition if you use it at all.
  For example:
    .....  distributed ifhp.conf file
    #### XXX END XXX ####
    [ default ]
    xx@
    [ myprinter]
    xx

Version 3.3.5 Tue Aug  3 15:22:51 PDT 1999
  Re-arranged the file type detection code so that if you set
    forceconvert it will be handled more effectively.
  When you recognize a PostScript job,  will remove EXTRA ^D's at
    the beginning of a job.  This appears to be caused by some PostScript
    drivers gratuitously adding a ^D,  and then the spooling program
    adding another.  Up to 3 of these have been observed in practice.
  If you have a conversion of the type:
        pattern language      {i.e. - two entries}
    only the language is chosen.  This allows you to do:
        *postscript*  ps
        *pcl*         pcl
        *text*        ps   a2ps .....       

  Some HP5m's have a horrible problem with reporting True End of Job
    to get pagecount.  To fix this a bit,  the following method is used.
    1. you need to set waitend=ps,  i.e. - use PostScript to get the
       end of job.  
    2. Two additional options have been defined:  end_ctrl_t=busy:idle
       and waitend_ctrl_t_interval=2
       When the end_ctrl_t is defined,  then a CTRL-T is sent at the
       job end to force (ha ha ha... sigh... only if this was true)
       a ^T type of status message to be sent back from the printer.
       This status message has the form %%[ status: busy ]%% when then printer
       is not printing,  although %%[ status: idle ]%% has also been observed.
       If the status matches one of the values in the end_ctrl_t list,
       then we assume that the printer is done with the job and we can
       get the pagecount.  However (sigh),  we need to prod the printer
       periodically to send this status.  The waitend_ctrl_t_interval 
       sets how often we do this.  However (sigh sigh),  if we send the CTRL-T
       BEFORE the job ends,  then they actually get stacked up in the
       input buffer queue,  we can overflow the input buffer queue, and
       BAD THINGS happen.  So,  we also send a small PostScript job that
       will send a message of the form '%%[ echo: done ]%%',  and only
       when we get this message do we send the CTRL-T,  confident (or
       fairly confident) that the CTRL-T's will get processed.
    Testing this was truly an anal irritation experience.
  Sprinkled holy water on some places where a free() was being done but
    there was not test for a null value...


Version 3.3.4 Tue Aug  3 15:22:51 PDT 1999
  Added a funny little option to handle options such as staple=on and have
  some code produced based on the 'on' value.
    # the %s{key}  inserts the value of key
    ps_staple=[ staple_%s{staple} ]
    ps_staple_off=currentpagedevice /Staple known
       { << /Staple 0 /StapleDetails << /Type 6 /StapleMode 0 >>
        >> setpagedevice } if
    ps_staple_front=<< /Staple 1 /StapleDetails << /Type 6 /StapleMode 0 >>
        >> setpagedevice
    ps_staple_rear=<< /Staple 1 /StapleDetails << /Type 6 /StapleMode 1 >>
        >> setpagedevice
    ps_staple_both=<< /Staple 1 /StapleDetails << /Type 6 /StapleMode 2 >>
        >> setpagedevice
    (Patches and idea by: Garrett D'Amore <garrett@yavin.org>)

  Modified ifhp.conf reading code to be more robust and efficient.
  Added a 'reopen_on_job' option to force appsocket to reopen connection
    to printer if there is a long delay sending job to printer.
    (Inspired by comments from: Isaac Hollander <hollande@ms.com>)
  configure now takes
      --with-admindir=DIR     where to install ifhp.conf, default: /etc
      --with-filterdir=DIR    where to install ifhp and other executables 
  Added FreeBSD ports template to distribution for tracking purposes.

Version 3.3.3 Fri Jun 11 11:44:23 PDT 1999
  ifhp.conf -
    added lexmark4039 entry, to do synchronizcation.
  accounting information - quotes added around options

Version 3.3.2 Mon Jun  7 15:52:55 PDT 1999
  File descriptor 3 was closed when forking accounting
   program.
   (Reported and fix by: Jesper Dangaard Brouer <hawk@diku.dk>)
  Fixed up minor problems with PostScript banner generation.
   (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
  Added a 'forceconversion' flag to force the file utility and
   the conversion utilities to be used. 

Version 3.3.1
  BASELINE DISTRIBUTION

Version 3.2.10
 QMS printer support updated to try and handle appsocket a bit better.
 You now need a 'qms' flag to identify the printer as a qms printer.
   (Patches and suggestions by: Johan Claesson <Johan.Claesson@uab.ericsson.se>)

Version 3.2.9
  Removed '"' from ifhp.conf file that really messed things up.

Version 3.2.8
  Enabled PCL copies=nnn code
     (Missing operation reported by: Gerard Kok <kokg@geo.vu.nl>)
  Fixed pcl_linesperpage=...F instead of E
     (Reported by: Gerard Kok <kokg@geo.vu.nl>)
  When you are using the TEXT to XXX translation facility,
     the .... ZOPTS .... will get replaced with .... -Zzoptions ....
     and .... TOPTS .... will get replaced with .... -Ttoptions ....

  Updated ifhp.conf file,  added comments,  moved HP5SiMx PostScript
  to the HP5SiMx section.

  Modified the Pjl_console code to not be 'sticky'.  This was painful.
	(Suggested by: Olav Kolbu <olav.kolbu@usit.uio.no>)

  After extensive hand to hand combat with QMS printers,
  discovered that they apparently do NOT return status or PostScript
  output in a reliable manner.  Added/modified [qms1725] entry
  to reflect this.  Use appsocket protocol,  but WITHOUT status
  capability.  Also note that port 35 seems to be used by default,
  although this can be configured via the TCP/IP telnet interface.
  (Your milage may vary).

Version 3.2.7
  Rearranged code in Read_write_timeout() so that a read of status is
  attempted BEFORE exiting on a write error.

  added pclbanner to the distribution

  IFHP recognizes the PJL 'reset' sequence and treats it as a
  'raw' or unprocessed job.  This allows you to send PJL jobs to the printer
  and not have them interpreted as PCL.

Version 3.2.6
  Added a console message for Lexmark and HP Printers that
    will be 'sticky' and stay visible after the job has been
    printed.
  (Provided by: Jason L Tibbitts III <tibbs@uh.edu>)

  Fixed up 'progress' so that it prints Kbytes correctly... sigh.


Version 3.2.5
  changed the a2ps options in ifhp.conf:
   -q -B -1 -M Letter --borders=no -o-
  (Suggested by: Jeff Gostin <jgostin@best.com>)

Version 3.2.5
  Cleaned up documentation,  made sure the various
  configuration and installation defaults were consistent.
  Ummm... and also removed a core dump from the distribution.
   Sigh...

Version 3.2.4
  Cleaned up Makefile.in so that running configure in another directory
   will be possible.  That is,
		cd ifhp...
		where=`pwd`
		mkdir ...
		cd ...
		sh $where/configure
   will now work correctly, and you can do a make install in $where 

  Added README.utilities and updated ifhp.conf file so that it has URL
    and ftp sites for file, enscript and a2ps tools.

  The phaser support did not work with OF and IF filters.
    More 'shutdowns' and clean up added.

  Sync and waitend made separate operations.
    You can now skip 'syncing' at the start,  but you 
    can force 'waitend'.  This is side effect of phaser
    operation.  You need to read status back from the printer until it closes
    the reverse connnection.  If you have appsocket with waitend,
    you will read status back until the job finishes.  If you do
    appsocket with waitend@,  you will get no status information for job.
    This is not good,  but gives you very fast throughput.

Version 3.2.3
  Updated Makefile.in so that when you do $(path)/configure for
   building in a separate directory,  the right files are found.

Version 3.2.2
  Added support for Tektronixs Phaser Printers -  using the appsocket protocol

Version 3.2.1

  Most of the code seems pretty stable,  so we start a new major release.
  There are mostly minor changes in the code for this release.
  
  Added 'PseudoMagicFilter Support' and got text to PS conversion
  working correctly.

    #
    # text conversion control
    #
    # control text to whatever conversion
    #
    # if you cannot find type, then try this file utility
    #
    # if the type is text and not supported on your system, do a conversion
    #  Method 1 - set 'default_language' as text, and run
    #    the program through a text to known converter
    #
    default_language=text
    text_converter=/usr/local/bin/a2ps -q -B -o-
    # output of the converter is pcl, ps, or raw
    text_converter_output=ps

    #
    #  Method 2 -
    #    Use the file util and match the output
    # file reports format information
    #  glob text_output_format text_converter
    #  - you do a glob match against pattern and use the converter
    #
    default_language=unknown
    file_util_path=/usr/bin/file -
    file_output_match = [
     *text*  ps /usr/local/bin/a2ps -q -B -o-
     ]
    # you need a temp file location
    tempfile=/var/tmp/ifhp

  Added a horrible horrible kludge that allows multiple fonts to be
  loaded.  You need to use:
    ifhp -Zfont=this,font=that,...
  which gets translated into font=this,that and the font handling code
  then works OK.

  Added a QMS1725 entry that just might work.
  Fixed up a couple of minor PostScript quirks.
  Added PJL support for duplex.

Version 3.1.20
  Documentation.  More Documentation.  More ...
  Sigh...
  
Version 3.1.19
  Made status messages less verbose.
  'trace_on_stderr' is now just 'trace' ... Sigh...

Version 3.1.17
  Changed CRLF back to not effective... Sigh.

Version 3.1.16
  Fixed a problem with testing short files for file type.
  (Noted by: Mike Whitson <mwhitson@MIT.EDU>)

  Added ledger paper types.  HP printers are very odd...
    (John McCash thinks so too)

  Made CRLF the default in ifhp.conf

Version 3.1.15
   Not distributed

Version 3.1.14

 ifhp.conf:
  pcl_pagesize \033&l#A - set page size
    Thu Feb  4 16:52:58 PST 1999
  remove_control=xyz...
    if PostScript AND you have a ^x, ^y, ^z, etc., remove it.
    Suggested use:  remove_control=CT removes CTRL-C, CTRL-T
    (Suggested by Mike Whitson <mwhitson@MIT.EDU>)

Version 3.1.6 - 3.1.13
   Lots and lots and lots of changes in ifhp.conf, etc, etc.
   Stable version approaching.

Version 3.1.5
   Experiments with various printers showed that the ifhp.conf
   file needed modification.

   Added a 'banner_only' mode for banner printing only.
  

Version 3.1.4
   Sun Dec 27 18:22:44 PST 1998
   Total rewrite of the ifhp software using a clean room
   approach.
      Patrick Powell papowell@astart.com

$Id: CHANGES.OLD,v 1.8 2002/04/01 00:26:03 papowell Exp papowell $