home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / DIR / FINDFIL2.ZIP / FINDFIL2.MSG next >
Encoding:
Internet Message Format  |  1990-12-16  |  1.6 KB

  1. Date: 17 Dec 90 04:11:51 GMT
  2. From: Forrest Gehrke <feg@dodger.att.com>
  3. Newsgroups: comp.binaries.ibm.pc
  4. Subject: find, locate files on disk
  5. Summary: An enhanced version of an earlier posting
  6. Keywords: util
  7.  
  8. The recent file finder program FIND which was distributed in c.b.i.p
  9. just would not work for me on my ATT 6300+.  All I would get is the
  10. useage message.
  11.  
  12. There seemed to be something wrong with the switchar  but  printf
  13. statements I tried in the source that was provided seemingly did not
  14. verify that suspicion.
  15.  
  16. But notice this code fragment in main:
  17. ----------------------------------------------------
  18. main(int argc, char *argv[])
  19. {
  20.     int i, j, k;
  21.     int done=0;
  22.     int enable;
  23.     char *option;
  24.  
  25.     /*
  26.      * FInd out what the switch character is and set the switch and
  27.      * directory seperator for use in this program accordingly
  28.      */
  29.     _AH=0x37;
  30.     _AL=0;
  31.     __int__(0x21);
  32.     switchar=_DX;
  33.     if (switchar == '/')
  34.     dirsep = '\\';
  35.     else
  36.     dirsep='/';
  37. -----------------------------------------------------
  38. _DX is 16 bits.  The expression immediately following IF  was not being
  39. executed and a printf statement using %x  verified that the switchar
  40. was being set equal to f02f.   Since the leading f0 will not print
  41. unless %x is used in  a printf statement instead of %c, it seemingly
  42. reported  the switchar equal to '/' which it was not.
  43.  
  44. Changing the code to _DL, the desired byte size, corrected the program
  45. and it now ran as the useage message said it should.
  46.  
  47. Perhaps some machines may not have trouble with this, else how did it
  48. ever pass muster?
  49.  
  50. Forrest Gehrke feg@dodger.att.com
  51.