home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / REC.ZIP / PRDO.CNV < prev    next >
Encoding:
Text File  |  1986-12-01  |  1.8 KB  |  72 lines

  1. [PRDO.CNV]
  2. [G. Cisneros, 4.11.85]
  3. [[Print files using both sides of the paper]]
  4.  
  5. [process the odd-numbered pages, then the even-numbered ones]
  6. (()()()(
  7.     (,(WHILE,(8 9 1),<=>,(and,<[14]>,<8>,<-->:<9>)<1>,<<
  8.         >>(%Or,CTR:pg)(%W,CTR:pg,1,2)<<
  9.         >>(%p,(B)File: <9>(B)(B)<<
  10.             >>(B)(B)(B)Page (%R,CTR:pg)(^MJJJ))<<
  11.         >>(%Or,(%T,<8>))(i,0:(R))(%C,<8>),<1>)<<
  12.     >>(%t,Turn paper over and press return)(,(%R,TTY:))<<
  13.     >>(WHILE,(8 9 1),<=>,(and,<[14]>,<8>,<-->:<9>)<1>,<<
  14.         >>(%Or,CTR:pg)(%W,CTR:pg,2,2)<<
  15.         >>(%Or,(%T,<8>))(i,(s,0:(R)))(%C,<8>),<1>));
  16. )) a
  17.  
  18. [skip up to 58 lines]
  19. (()()(0)(
  20.     (<0>:(^Z),(if,(#%,(%R,CTR:pg)%2),0,(%p,(^JJJ))0,63):(^Z));
  21.     (58:<0>,(%p,(B)File: <9>(B)(B)<<
  22.         >>(B)(B)(B)Page (%R,CTR:pg)(^MJJJ))0:<0>);
  23.     (<0>:,(#p,<0>):(R)):
  24. )) s
  25.  
  26. [print up to 58 lines]
  27. (()()(0 1)(
  28.     (<0>:(^Z),(until,<0>,63,(%p,(^J)),(#p,<=>),));
  29.     (58:,(%p,(^JJJJJ))(s,0:)):
  30.     (<0>:<1>,(%p,        (z,(y,<1>))(^MJ))(#p,<0>):(R)):
  31. )) i
  32.  
  33. [trim to 80 characters]
  34. (()()(0)(
  35.     ((and,<[80]>,<0>)<[1]>,<0> [);
  36. )) z
  37.  
  38. [expand tabs]
  39. (()()(0 1 2)(
  40.     ((and,<[8]>,<0>(^I)<1>)<2>,(u,<0>)(y,<1><2>));
  41.     ((and,<[8]>,<0>)<1>,<0>(y,<1>));
  42.     (<0>(^I)<1>,(u,<0>)(y,<1>));
  43. )) y
  44.  
  45. [ensure eight columns]
  46. (()()(0)(
  47.     ((and,<[8]>,<0>),<0>);
  48.     (,<=>        ):
  49. )) u
  50.  
  51. [add disk id]
  52. (()()(0 1)(
  53.     (<0> (ITR, )<1>,<0><1>):
  54.     (<0><,><,>(ITR,<,>)<1>,<0><,><1>):
  55.     (<>,);
  56.     (<0>(or,<,>,<>)<1>,(nf,<0>,<-->:,(%Lr):<0>)<,>(p,<1>));
  57. )) p
  58.  
  59. [main - gather directory entries for the given list]
  60. (()(
  61.     (          ) B
  62.     ((%R,<8>)) R
  63. )()(
  64.     (,(a,(WHILE,(0 1 2),(p,(&u,<=>)<,>),<0>:<1><,><2>,<<
  65.         >>(until,(%S,<0>:<1>),Not Found,<<
  66.             >>(IF,(1 2),<=>,<[1]>(and,<[8]>,<1>)<<
  67.                 >>(and,<[3]>,<2>),<0>:<1>.<2>),<<
  68.             >>(%A,<0>:<1>),),<2>)));
  69. ))
  70.  
  71. [end]
  72.