home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
util
/
dir
/
browserii
/
sources
/
volname.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-16
|
843b
|
42 lines
/*
* VolName.c - Copyright © 1993 by Devil's child.
*
* Created: 16 Mar 1993 22:50:03
* Modified: 16 Mar 1993 23:04:05
*
* Make>> sc <file>.c
* Make>> slink <file>.o SC SD ND BATCH NOICONS TO <file> LIB LIB:String.lib
*/
long VolName(void)
{
struct ExecBase *SysBase = *((struct ExecBase **)4L);
struct DosLibrary *DOSBase;
// APTR UtilityBase;
struct RDArgs *RA;
char *Argv[] = { NULL, NULL };
UBYTE *s;
long rc=20;
if (DOSBase = (struct DosLibrary *)OpenLibrary("dos.library", 37)) {
// UtilityBase = DOSBase->dl_UtilityBase;
if (RA = ReadArgs("Vol/A", (long *)Argv, NULL)) {
if (s = StrChr(Argv[0], ':')) {
*s = '\0';
Printf("%s\n", Argv[0]);
rc = 0;
}
else
rc = 10;
FreeArgs(RA);
}
else
PrintFault(IoErr(), "VolName");
CloseLibrary((struct Library *)DOSBase);
}
return rc;
}