home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / docs / mailinglist-archive / 1993-10 / text0081.txt < prev    next >
Encoding:
Text File  |  1993-06-25  |  2.4 KB  |  81 lines

  1. > Hi,
  2. > [...]
  3. > I think you mean lf and lf+cr. Did you get my reply to your last posting?
  4. > I think you simply have to putc(10,outfile), putc(13,outfile) when
  5. > lf (10) occurs in the input stream, not (12).
  6. that is it, now i understand.:)             
  7. > > There is no /dev/lp in my /dev direc. Is it your par device?
  8. > > Or your filter? I have sent the source of the program (the crippled source:))
  9. > > that writes to /dev/par. I did the test with |od -b with the programm
  10. > od is short for octal display, which means that the output is in octal
  11. > bytes (-b). So don't get confused by the octal number 12, which is actually
  12. > decimal 10.
  13. is there a way to get bytes as decimal numbers? should hexdumb -e "_u" work?
  14. > If you got my last posting, then I can't understand, what your problems
  15. > are. Sorry, maybe I just didn't get your point.
  16. *I* am sorry. *I* did not get the point. You are right with your 
  17. statement that there occure only 10s in the input stream, i did not
  18. understand this....
  19. >   Guenther
  20. > s_grau@ira.uka.de, maeuschen@irc (will be back next week)
  21. >
  22. but there was another problem in my configuration:
  23. i did not set the \ at the end of the second line of my printcap.
  24. So my filter was never called. 
  25. It works now more or less with the following program in /usr/bin:
  26. filter.c:
  27. #include <stdio.h>
  28. main()
  29. {
  30. int a;
  31. while((a=getchar())!=EOF)
  32.     {
  33.     if(a==10){putchar(10);a=13;};
  34.     putchar(a);
  35.     };
  36. }
  37.  
  38. my printcap:
  39.  
  40. lp|local line printer:\
  41.     :lp=/dev/par:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\
  42.     pw#80:sb:if=/usr/bin/filter:
  43.  
  44. of course, there are no parameters managed..
  45.  
  46. with this configuration there is a problem when executing e.g.
  47. lpr -h filter.c   
  48. i get
  49. lpd[90]: lp: Daemon filter 'f' exited (255)
  50.  
  51. is this due to the uncomplete printer filter or is there another thing
  52. wrong?
  53. The printing seems to work...
  54. Does bsd send the banner through the filter, too?
  55.  
  56. Another problem i want to manage is to set up the manpages with
  57. the original bsd-man. I dont have a proper bash-man and so
  58. wonder how i can write a script for doing the converting.
  59. Here on our HP9000/735 with the Korn-shell the following works:
  60.  
  61. #!/bin/sh
  62. for file in *.1
  63. do
  64.  new=`echo $file | sed -e 's/.1/.0/'` 
  65.  man $file >$new
  66.  echo $file
  67. done
  68.  
  69. i did not get something similar to work...
  70. ciao
  71. Carsten
  72. ps: my english is very bad, my german is sometimes better:) so
  73. all german people, please write answers in german 
  74.  
  75.