home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / bootflag.rea < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.3 KB  |  26 lines

  1. Short: global script status flag utility for If's
  2.  
  3. BootFlag version 2.2 (FreeWare) by John Mosley
  4.  
  5. Allows you to check a 32 bit status register, which you can easily manipulate,
  6. and return a "Warn" if your check matched.  Docs and examples, source and
  7. executable included.
  8.  
  9. Unix version only:
  10.     The source I have used for the Unix version of BootFlag is available,
  11. also.  Just compile it with "gcc" and no options.  I call the executable "bf".
  12. There are a few differences between it and the Amiga version (the complete docs
  13. are in the standard lharc file).  For one, the "x" character is used in the
  14. place of "$" to sigify that a number you're giving it is hexadecimal (due to
  15. the way csh, etc. bitch about not finding an environment variable).  Also, the
  16. default BootFlag register file is defined by an environment variable called
  17. "BF_FILE", so make sure you set it.  I suggest you use something like
  18. "~/.BootFlags".  The last and final change for Unix is in the return codes.
  19. BootFlag doesn't really return anything using an exit() function; it just
  20. prints out a number to stdout that corresponds to the result.  These codes
  21. are as follows: 1 = flag pattern matched, 0 = didn't match, -1 = error.
  22. Here is an example usage for it in a script file (using csh):
  23. if ( `bf check %101` == 1 ) echo "pattern matched"
  24.  
  25. Email me, tell me what you think: jem3@engr.uark.edu
  26.