10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>pdcfinfo -- Return PicoDOS file system size information (legacy support code)Description:Prototype:Inputs:Returns:Notes:Return PicoDOS file system information with a CF8/AT8 compatable function call.short pdcfinfo(char *drive, long *size, long *free)PICO_CALL(pdcfinfo);drive is a string pointer in the form of "A:", "B:", etc.size is a pointer to a long variable to hold the size of the media in bytesfree is a pointer to a long variable to hold the available free space in bytesReturns zero on success or 1 if the named drive is not available.New programs should use the PicoDOS DIR functions DIRFreeSpace and DIRTotalSpace.picodosver -- Return a string containing PicoDOS version information(legacy support code)Description:Prototype:Inputs:Returns:Notes:Return PicoDOS version information with a CF8/AT8 compatable function call.char * picodosver(void);NothingReturns a C string in the form "nnnnn-v.rs" where nnnnn is the serial number, v is the currentversion of PicoDOS, r is the release level, and s is the sub-release level.New programs should use the BIOS global variables for this information:BIOSGVT.<strong>CF2</strong>SerNumBIOSGVT.BIOSVersionBIOSGVT.BIOSReleaseBIOSGVT.PICOVersionBIOSGVT.PICOReleasesscandate -- scan date string into year, mon, and mday fields of struct tmDescription:This is a general purpose date string parser that accomodates a variety of date specificationstyles.Prototype: short sscandate(const char *str, struct tm *ptm, DateFieldOrder dfo );Inputs:Returns:Notes:str is a zero terminated C string containing date in the form:YEARMONTHDAY (specifying enum YYMMDD)MONTHDAYYEAR (specifying enum MMYYDD)DAYMONTHYEAR (specifying enum DDMMYY) may be any single comma, space, dash, period, or slash.YEAR may a full 4 digits or 2 digits assumed between 1970 and 2069MONTH may be 1-12, full text (January, February, ..., December) or three characterabbreviations.ptm is a standard C library tm structure from with fields tm_year, tm_mon, andtm_mday filled in from the scan.Returns the lenght of the scanned string or zero if the string is invalid.This routine is used by the PicoDOS QRdate and QRdatetime query/reply functions.typedef enum { YYMMDD // ISO, MMDDYY // US, DDMMYY // European} DateFieldOrder;PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.76 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!