home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / shex3fil.c < prev    next >
Text File  |  1989-02-08  |  520b  |  25 lines

  1. /*--------------------------------------*/
  2. /*                         */
  3. /*              SHEX3FILE(X,X)        */
  4. /*                    */
  5. /* Stores long integers in compact     */
  6. /* format. The first argument is the    */
  7. /* file descriptor and the second is the*/
  8. /* number to be stored.            */
  9. /*                    */
  10. /*--------------------------------------*/
  11. # include "stdio.h"
  12. void shex3file(fd,a)
  13. long a;
  14. FILE *fd;
  15. {
  16.     int d,e;
  17.     d=a/65536L;
  18.     putc(scram(d),fd);
  19.     a-=d*65536L;
  20.     d=a/256L;
  21.     e=a-(d*256);
  22.     putc(scram(d),fd);
  23.     putc(scram(e),fd);
  24. }
  25.