home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / Sources / src / lib / rcwrite.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-27  |  434 b   |  28 lines

  1. /*{{{}}}*/
  2. /*{{{  includes*/
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. #include <h/keys.h>
  7. #include <h/token.h>
  8. #include <h/rcformat.h>
  9. #include <lib/ori_rc_lib.h>
  10. /*}}}  */
  11.  
  12. /*{{{  rc_put_w*/
  13. void rc_put_w(int w,FILE *f)
  14. { int neg;
  15.  
  16.   if (w<0)
  17.    { neg=0x80;w = -w; }
  18.   else
  19.    { neg=0; }
  20.   if (w & ~0x7fff)
  21.    { fputs("CRASH - OCL-number overflow!\n",stderr);
  22.      exit(1);
  23.    }
  24.   rc_put_c(neg|(w>>8),f);
  25.   rc_put_c(w,f);
  26. }
  27. /*}}}  */
  28.