home *** CD-ROM | disk | FTP | other *** search
/ Kyūkyoku!! X68000 Emulator / X68000Book.dat / mac / OLS / X68000 / Ko-Window / kow142s.lzh / corlib / PathGetFullName.c < prev    next >
C/C++ Source or Header  |  1995-09-08  |  457b  |  22 lines

  1. /* fullname lib    1991 H.OGASAWARA */
  2.  
  3. #include    <stdio.h>
  4. #include    <sys_doslib.h>
  5.  
  6. asm( " .xdef _fullname" );
  7. asm( "_fullname    equ    _PathGetFullName" );
  8.  
  9. unsigned char*
  10. PathGetFullName( name )
  11. unsigned char    *name;
  12. {
  13.     static struct NAMECKBUF    nl;
  14.     unsigned char    *s, *p;
  15.     NAMECK( (char*)name, &nl );
  16.     for( s= nl.path ; *s++ ;);
  17.     for( p= nl.name, s-- ; *s++= *p++ ;);
  18.     for( p= nl.ext , s-- ; *s++= *p++ ;);
  19.     return    (unsigned char*)nl.drive;
  20. }
  21.  
  22.