home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8707 / 67 / arcvax.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-13  |  850 b   |  50 lines

  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include "arc.h"
  4.  
  5. /*
  6.  * Misc routines to emulate IBM MSDOS functions under BSD
  7.  *
  8.  * Hack-attack 1.3  86/12/20  01:23:45  wilhite@usceast.uucp
  9.  *     Bludgeoned into submission for VAX 11/780 BSD4.2
  10.  *    (ugly code, but fewer core dumps)
  11.  */
  12. INT upper(string)
  13. char *string;
  14. {
  15.     char *p;
  16.  
  17.     for(p = string; *p != NULL; p++)
  18.     if(islower(*p))
  19.         *p = toupper(*p);
  20. }
  21. char *setmem(dest,size,c)
  22. char *dest,c;
  23. INT size;
  24. {
  25.  INT i;
  26.  
  27.     for(i = 0; i < size; dest[i] = c, i++);
  28.     return(&dest[0]);
  29. }
  30. char *gcdir(dirname)
  31. char *dirname;
  32.  
  33. {
  34.     if(dirname == NULL || strlen(dirname) == 0)
  35.         dirname = (char *)malloc(1024);
  36.  
  37.     getwd(dirname);
  38. }
  39. INT abort(s,arg1,arg2,arg3)
  40. char *s;
  41. {
  42.     fprintf(stderr,"ARC: ");
  43.     fprintf(stderr,s,arg1,arg2,arg3);
  44.     fprintf(stderr,"\n");
  45. #if BSD
  46.     perror("BSD");
  47. #endif
  48.     exit(1);
  49. }
  50.