/* part of additions by Clarence Wilkerson to allow .ar format files from OS9 to be read on MSDOS machines */ /* these are some helper functions to port AR to MSDOS */ /* by using defines, these minimize the changes to the */ /* original source files */ /* One major change is the treatment of directories */ /* MSDOS does not allow direct access of directories */ /* However, TurboC does incorporate in DOS.H routines */ /* to get the directory contents one by one */ /* findfirst, and findnext */ /* need replacements for opndir() and nextdir() from dir.c */ /* also for mknod() */ #include /* the routine getw to read a word from a byte oriented file */ /* since AR was written for 6809-68K */ /* assume high order byte first */ int msgetw( FILE *infile) { int x,y ; x = (fgetc(infile) & 0xff) << 8 ; y = fgetc(infile) & 0xff; return((int)( y | x)) ; } /* msgetw */