home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / macify13.shr / convert.c < prev    next >
C/C++ Source or Header  |  1991-05-20  |  1KB  |  30 lines

  1. /*************************************************************************
  2.  **                                                                     **
  3.  **                  Char conversion routine for MACIFY                 **
  4.  **                                                                     **
  5.  *************************************************************************/
  6.  
  7. #include <stdio.h>            /* standard I/O functions */
  8. #include <string.h>            /* BSD uses strings.h */
  9. #include "macify.h"            /* Program-specific defines */
  10.  
  11. char do_the_conversion(inchar, thing_to_do)
  12. char    inchar;
  13. int    thing_to_do;
  14. {
  15.     if (thing_to_do == 1)        /* Doing UNIX -> Mac? */
  16.     {
  17.         if (inchar == UNIX_EOL)    /* is it the Unix end? */
  18.             return(MAC_EOL);    /* pass back Mac equiv. */
  19.         else
  20.             return(inchar);    /* echo back the char */
  21.     }
  22.     else if (thing_to_do == 2)    /* Doing Mac -> UNIX? */
  23.     {
  24.         if (inchar == MAC_EOL)    /* is it the Mac end? */
  25.             return(UNIX_EOL);    /* pass back UNIX equiv. */
  26.         else
  27.             return(inchar);    /* echo back the char */
  28.     }
  29. }
  30.