home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 110_01 / blook.c < prev    next >
Encoding:
Text File  |  1984-03-02  |  2.1 KB  |  98 lines

  1. #include "BDSCIO.H"
  2.  
  3. #define SECTORS 26
  4. #define FIRST_TRACK 00
  5. #define TRACKS 77
  6.  
  7. #define DMA 128
  8. #define DMALEN 128
  9.  
  10. int sector,track,drive,c;
  11. char *p;
  12.  
  13. main()
  14. {
  15.     for (track=FIRST_TRACK; track<TRACKS; track++) {
  16.         printf("\n****** TRACK %d ******\n", track);
  17.         for(sector=0; sector<SECTORS; sector++) {
  18.             getcpm(1, track, sector);
  19.             for(p=DMA; p<(DMA+DMALEN);p++) {
  20.                 if((c= *p)>0177)
  21.                     continue;
  22.                 if( c<040
  23.                   && c != 012 && c !=011)
  24.                     continue;
  25.                 putchar(c);
  26.                 if(c == 012)
  27.                     putchar(015);
  28.             }
  29.         }
  30.     }
  31. }
  32. æ
  33. ╞C    ╞D    ïà
  34. ëâ
  35. áE    AóR óû ΦΦ3s║VΦ₧δ╗Φ r≤=uΘ┘;D}║ïΦâδ▌ú¥
  36. Ç>D    u    ■D    SΦ[≈â
  37. t6Ç>C    u■C    Φ#3╥íÅ
  38. ≈6ì
  39. Dú¢
  40. ;¢
  41. ║iΦ<ü&â
  42. ■ ╟Å
  43. í¥
  44. 3╥≈6ï
  45. ╥t@ï╚íï
  46. ≈&ì
  47. ïΦí¥
  48. ╪+Dô3╥≈6ï
  49. ╥t@ô║≈Φ;╫t
  50. .ù
  51. s Ö
  52. KΓΘΘK SQRï≤╤δN▐╤εï7ï■s ▒╙Γ╙∩üµδüµ≡üτ  ≥ë7ZY[├Ç>D    uΦRΦtΦ s    ║ïΦ₧Θ≈■≈â
  53. tK╟╥    Ç╟
  54. ║₧ΦXδK╛╡üε₧¼
  55. └tⁿ┤╗═δ≥Non-System disk or disk err/*
  56.     from STDLIB2.C for BDS C 1.41
  57.  
  58.  
  59.     This version of _spr adds the '0' padding option (see K&R, section
  60.     7.3) to the printf, etc. functions.
  61.     If a leading 0 is given in the field length for numeric conversions
  62.     the leading spaces are changed to leading 0s. Useful when two
  63.     numbers are to be concatenated for printing, e.g., split octal
  64.     notation: "017.002".
  65.     One side effect of this is that a right justified character or
  66.     string is also allowed to have leading 0s, but K&R's description
  67.     doesn't appear to disallow it, so...
  68. */
  69.  
  70. _spr(line,fmt)
  71. char *line, **fmt;
  72. {
  73.     char _uspr(), c, base, *sptr, *format;
  74.     char wbuf[MAXLINE], *wptr, pf, ljflag;
  75.  
  76. /*
  77.     the first modification: define a variable to hold the
  78.     padding character.
  79. */
  80.     char padchr;
  81.  
  82.     int width, precision,  *args;
  83.  
  84.     format = *fmt++;    /* fmt first points to the format string    */
  85.     args = fmt;        /* now fmt points to the first arg value    */
  86.  
  87.     while (c = *format++)
  88.       if (c == '%') {
  89.         wptr = wbuf;
  90.         precision = 6;
  91.         ljflag = pf = 0;
  92.  
  93.         if (*format == '-') {
  94.             format++;
  95.             ljflag++;
  96.          }
  97. /*
  98.     here's the additional logic: sim