home *** CD-ROM | disk | FTP | other *** search
- Copyright (C) 1992 MetaWare Incorporated; All Rights Reserved.
-
- High C/C++ Version 3.0
- Globally Optimizing Compiler
- for Extended DOS 80386/486 and Windows 3.0
- August 1992
-
- +------------------------------+
- | Notes on Library Functions |
- +------------------------------+
-
-
- About terminology:
-
- GOC (Globally Optimizing Compiler) refers to v2.x and v3.0 libraries.
- LOC (Locally Optimizing Compiler) refers to v1.7x and earlier libraries.
-
-
- Table of Contents
- -----------------
- 1. GOC Library Functions NOT Implemented in the LOC Library
- 2. Additions/Corrections to Printed Documentation
- 3. Undocumented Functions
-
-
- 1. GOC Library Functions NOT Implemented in the LOC Library
- -----------------------------------------------------------
-
- long double _atold(const char *__nptr);
- unsigned short int _clear87(void);
- unsigned short int _control87(unsigned short int __cw,
- unsigned short int __mask);
- int cscanf(char *, ...);
- int _dieeetomsbin(double *__x, double *__x1);
- int _dmsbintoieee(double *__x, double *__x1);
- char * ecvt(double, int, int *, int *);
- int fclosall(void);
- char * fcvt(double, int, int *, int *);
- int _fieeetomsbin(float *__x, float *__x1);
- int flushall(void);
- int _fmsbintoieee(float *__x, float *__x1);
- fstat(int __handle, struct stat * __buffer);
- char * gcvt(double, int, char *);
- short _getfontinfo( struct _fontinfo * );
- short _getpixel_w(double, double);
- short _gettextcursor(void);
- short _getgtextextent( const char * );
- struct xycoord _getgtextvector(void);
- struct _xycoord _getviewcoord_w(double,double);
- struct _xycoord _getviewcoord_wxy(struct _wxycoord * pwxy1);
- int getw(FILE *_stream);
- struct _wxycoord _getwindowcoord(short,short);
- int _isodigit(int __c);
- double j0(double __x);
- double j1(double __x);
- double jn(int __n, double __x);
- short _lineto_w(double, double);
- int matherr (struct exception *__s);
- int matherrx (struct exception *__s);
- void _outgtext( const unsigned char * );
- int putw(int _int1, FILE * _stream);
- short _rectangle_w(short, double, double, double, double);
- short _rectangl_wxy(short, struct _wxycoord *,
- struct _wxycoord *);
- short _registerfonts( const char *);
- short _setfont( const unsigned char * );
- struct xycoord _setgtextvector( short, short );
- short _setpixel_w(double x, double y);
- short _settextcursor(short attr);
- short _settextrows(short rows);
- short _setwindow(short,double,double,double,double);
- void _stkdmp(int __filehandle);
- char * tempnam(char *dir,char *prefix);
- int unlink(const char *__pathname);
- void _unregisterfonts( void );
- double yn(int __n, double __x);
- double y0(double __x);
- double y1(double __x);
-
-
- 2. Additions/Corrections to Printed Documentation
- --------------------------------------------------
-
- log(), log10()
-
- The log() and log10() functions are documented to return -HUGE_VAL if
- passed a value <= 0.0; in fact, the functions return 0.0. This behavior is
- outside ANSI specifications ("A domain error occurs if the argument is
- negative. A range error may occur if the argument is zero.") and should
- not be relied upon.
-
- _setlogorg()
-
- This function was incorrectly documented to take void as its argument.
- The proper usage is:
-
- struct xycoord{ short xcoord, short ycoord } _setlogorg(short x, short y);
-
- The return value is the previous logical coordinate of the origin.
-
- _setvideomode()
-
- The macro _ERESCOLOR was incorrectly documented to supply 64 colors and
- 640x480 resolution. The correct attributes are 16 colors and 640x350
- resolution.
-
-
- 3. Undocumented Functions
- -------------------------
-
- _bios_disk Configuration and status information for a floppy- or hard-
- disk drive. Real mode only.
- _bios_memsize Determines the amount of DOS-accessible memory installed.
- _fdopen Associate a stream with an open handle.
- _fgetchar Get a character from standard input.
- _getpvect Get the current protected-mode interrupt handler.
- _getrvect Get the real-mode vector.
- _setactivepage Current active screen page.
- _setpixel Color value of a single graphics pixel.
- _setrpvectp Set both the protected- and real-mode vectors to point
- to a protected-mode handler.
- _setpvect Set the protected mode vector.
- _setrvect Set the real-mode handler.
- _strdate Report the date as a string.
-
- ---------------------------------------------------------------------------
- _bios_disk Configuration and status information for a floppy- or hard-
- disk drive. Real mode only.
- ---------------------------------------------------------------------------
-
- DOS Only
- Reentrant
-
- SYNOPSIS
-
- #include <stdio.h>
- #include <bios.h> /* Required */
- unsigned _bios_disk(
- unsigned service, /* (See below for table.) */
- struct diskinfo_t{ /* Structure to hold arguments. */
- unsigned drive; /* Drive number (add 80H for hard disk). */
- unsigned head; /* Head number. */
- unsigned track; /* Track number. */
- unsigned sector; /* Starting sector. */
- unsigned nsectors; /* # sectors to read, write, or compare */
- void far *buffer /* Buffer to read, write, or compare. */
- } *info);
-
- DESCRIPTION
-
- The _bios_disk routine uses BIOS INT 13h to provide access to several
- disk functions. service selects the function desired, and info holds
- the agruments necessary to identify the area of the disk to be accessed.
-
- service can be set to one of the following manifest constants found in
- bios.h:
-
- Constant Function performed
- -------- ------------------
- _DISK_RESET Causes the disk controller to perform a hard reset,
- preparing for floppy-disk I/O. This is useful after an
- error occurs in another operation, such as a read. If
- this service is specified, info is ignored.
-
- _DISK_STATUS Returns the status of the last disk operation. info is
- ignored and the status is returned in the high-order
- byte of the return value as:
-
- Value Meaning
- ----- -------
- 0x00 No error.
- 0x01 Invalid function.
- 0x02 Bad address mark.
- 0x03 Write-protect violation.
- 0x04 Sector not found.
- 0x05 Reset failed.
- 0x06 Media removed.
- 0x07 Initialization error.
- 0x08 DMA failure.
- 0x09 DMA address error.
- 0x0A Bad sector encountered.
- 0x10 Parity error.
- 0x11 Corrected parity error.
- 0x20 Controller failure.
- 0x40 Seek failure.
- 0x80 Time-out.
- 0xAA Drive not ready.
- 0xBB Unknown error.
- 0xCC Write fault.
- 0xE0 Status error.
- 0xFF Sense failure.
-
- _DISK_READ Reads one or more disk sectors into memory. This
- service uses all fields of the structure that info
- points to. If no error occurs, the function returns
- zero in the high-order byte and the number of sectors
- read in the low-order byte. If there is an error, the
- high-order byte will contain a value as defined under
- _DISK_STATUS.
-
- _DISK_WRITE Writes data from memory to one or more disk sectors.
- This service uses all fields of the structure that info
- points to. If no error occurs, the function return
- zero in the high-order byte and the number of sectors
- read in the low-order byte. If there is an error, the
- high-order byte will contain a value as defined under
- _DISK_STATUS.
-
- _DISK_VERIFY Checks the disk to be sure the specified sectors exist
- and can be read. Also runs a cyclical redundancy test.
- This service uses all fields of the structure that info
- points to except buffer. If no error occurs, the func-
- tion returns zero in the high-order byte and the number
- of sectors read in the low-order byte. If there is an
- error, the high-order byte will contain a value as
- defined under _DISK_STATUS.
-
- _DISK_FORMAT Formats the track specified by info. Only one track
- can be formatted in a single call. buffer points to a
- set of sector markers. The format of those markers
- depends on the type of disk drive being formatted. See
- the appropriate Technical Reference Manual for your
- drive to determine the correct marker format. There is
- no return value for this service.
-
- CAUTIONS
-
- _bios_disk() provides raw disk I/O which was originally intended only for
- floppy disks. Reads and writes are from/to actual physical disk sectors.
- It is possible to damage your system and destroy data while using this
- function. Refer to a good DOS technical manual for complete explanations
- of error codes.
-
- RETURN VALUE
-
- Return values are specific to each service as indicated above.
-
- /*
- This program tests status of Drive C.
- Assumes High C users will always have a hard disk drive.
- */
-
- #include <stdio.h>
- #include <bios.h>
-
- void main() {
- unsigned status = 0;
- struct diskinfo_t info;
-
- info.drive = 0x80; /* Drive C: */
- info.head = 0; /* Use the boot sector. */
- info.track = 0;
- info.sector = 1;
- info.nsectors = 1;
- info.buffer = 0;
-
- status = _bios_disk(_DISK_STATUS, &info);
- printf("Status of disk drive C: is %x",status);
- }
-
-
- prints:
-
- Status of disk drive C: is 0
-
-
- ---------------------------------------------------------------------------
- _bios_memsize Determines the amount of DOS-accessible memory installed.
- ---------------------------------------------------------------------------
-
- DOS Only
- Reentrant
-
- SYNOPSIS
-
- #include <bios.h>
- unsigned _bios_memsize (void);
-
- DESCRIPTION
-
- _bios_memsize() uses BIOS INT 12h to determine the amount of DOS-
- accessible memory installed. The return value is the number of 1K blocks,
- with a maximum possible value of 640.
-
- RETURN VALUE
-
- Amount of DOS-accessible memory in 1K blocks.
-
- EXAMPLE
-
- /*
- This program prints the amount of system memory.
- */
-
- #include <stdio.h>
- #include <bios.h>
-
- void main() {
- unsigned memsize;
-
- memsize = _bios_memsize();
- printf("The amount of system memory "
- "is %uKB \n", memsize);
- }
-
-
- prints (may vary):
-
- The amount of system memory is 640KB
-
-
- --------------------------------------------------------
- _fdopen Associate a stream with an open handle.
- --------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <fcntl.h> /* Required for constants. */
- #include <stdio.h>
- FILE *_fdopen(int handle, char *mode);
-
- DESCRIPTION
-
- _fdopen() associates a stream with handle, and returns a pointer to that
- stream. handle must be a valid open file handle. Furthermore, mode
- must match the mode in which handle was opened. If mode does not match
- the actual opening mode of the handle, the behavior that results from
- using the stream is undefined.
-
- RETURN VALUE
-
- _fdopen returns NULL on error, and sets errno appropriately.
-
- CAUTIONS
-
- The opening mode of the stream is not validated against the opening mode
- of the handle. If the two do not match, the results of using the stream
- are undefined.
-
- SEE ALSO
-
- fopen for a description of the mode string.
- _fsopen, _open, _sopen
-
- EXAMPLE
-
- #include <fcntl.h>
- #include <io.h>
- #include <share.h>
- #include <stdio.h>
- #include <stdlib.h>
-
- void main(void) {
- FILE *fp;
- int pan;
- char c;
-
- _fdopen= _sopen("test.dat",
- O_RDONLY | O_TEXT,
- _SH_DENYWR
- );
- if (pan != -1)
- printf("File test.dat exists, handle=%d\n", pan);
- else
- printf("File test.dat cannot be sopened,"
- " error code=%d\n",pan);
- if((fp = _fdopen(pan, "r")) == NULL) {
- perror("Error opening test.dat");
- return;
- }
- /* Get and print characters until the end of file. */
- while((c = fgetc(fp)) != EOF)
- printf("%c", c);
-
- /* Close the file. Now any other process can read and write to the file
- test.dat until some other process puts a lock on it. */
- fclose(fp);
- }
-
-
- Given that the contents of test.dat are:
-
- testing 1 abcd
- testing=2 efgh
- testing=3 ijkl
- testing=4 mnop
- testing=5 qrst
- testing=6 uvwx
- testing=7 yzAB
- testing=8 CDEF
-
- the program prints:
-
- File test.dat exists, handle=5
- testing 1 abcd
- testing=2 efgh
- testing=3 ijkl
- testing=4 mnop
- testing=5 qrst
- testing=6 uvwx
- testing=7 yzAB
- testing=8 CDEF
-
-
- ------------------------------------------------------
- _fgetchar Get a character from standard input.
- ------------------------------------------------------
-
- Not Reentrant
-
- SYNOPSIS
-
- #include <stdio.h>
- int fgetchar(void);
-
- DESCRIPTION
-
- fgetchar() is equivalent to fgetc(stdin); see fgetc().
-
- The function fgetchar() performs a getc(stdin).
-
- SEE ALSO
-
- fgetc, fgets, fputc, fputs, getc, getchar, gets, putc, putchar, puts,
- ungetc.
-
- For short descriptions of the listed functions, see the SEE ALSO section
- for fgetc.
-
- EXAMPLE
-
- /*
- This program copies standard input character by character to
- fgetchar.tmp and to standard output. Similar examples are given for
- fgetc and getc, pointing out the differences among the functions.
- */
- #include <stdio.h>
-
- void main() {
- FILE *FP1;
-
- if ((FP1 = fopen("fgetchar.tmp", "w")) == NULL)
- perror("Cannot open fgetchar.tmp.");
- printf("Please enter text, ending"
- " with the ENTER key.\n\n");
- while ('\n' != fputc(fputchar(fgetchar()), FP1));
- }
-
-
- ------------------------------------------------------------------
- _getpvect Get the current protected-mode interrupt handler.
- ------------------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <dos.h> /* Required. */
- _Far _INTERRPT void (* _getpvect(int intno))();
-
- DESCRIPTION
-
- _getpvect() returns a 48-bit pointer to a function that returns void.
-
- This is one of several functions (see the SEE ALSO section) intended to
- provide 80386/486 support similar to that provided by _dos_setvect() and
- _dos_getvect() in the 80x86 16-bit library.
-
- Because protected-mode DOS extenders handle interrupts differently from
- normal DOS, _dos_setvect() and _dos_getvect() cannot be used in protected
- mode.
-
- RETURN VALUE
-
- Returns the address of the current protected-mode handler for intno, or
- -1 if the operation fails.
-
- CAUTIONS
-
- Under OS/386 _getpvect does, in fact, mirror the usage of _dos_getvect.
-
- If you install your own interrupt handler, be sure to save and restore
- the previous handler. If you do not restore the original handler, the
- machine may exhibit unexpected behavior after the program exits.
-
- SYSTEM DEPENDENCIES
-
- This function detects the DOS extender currently installed and acts
- accordingly. You can determine which environment the program is running
- in by testing the value of the extern char variable _mwenv. A value of
- 2 indicates Phar Lap's 386|DOS-Extender, 3 indicates Ergo's OS/386.
-
- SEE ALSO
-
- _getrvect To get the real-mode vector.
-
- _setrpvectp To set both the protected- and real-mode vectors to point
- to a protected-mode handler.
-
- _setpvect To set the protected mode vector.
-
- _setrvect To set the real-mode handler.
-
- EXAMPLE
-
-
- See the example provided for _setrpvectp.
-
-
- -------------------------------------------------------------
- _getrvect Get the current real-mode interrupt handler.
- -------------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <dos.h>
- _real_int_handler_t _getrvect(int intno);
-
- DESCRIPTION
-
- This is one of several functions (see the SEE ALSO section) intended to
- provide 80386/486 support similar to that provided by _dos_setvect() and
- _dos_getvect() in the 80x86 16-bit library.
-
- Because protected-mode DOS extenders handle interrupts differently from
- normal DOS, _dos_setvect() and _dos_getvect() cannot be used in protected
- mode.
-
- RETURN VALUE
-
- _getrvect() returns the address of the current real-mode handler for
- intno, or -1 if the operation fails.
-
- CAUTIONS
-
- If you install your own interrupt handler, be sure to save and restore
- the previous handler. If you do not restore the original handler, the
- machine may exhibit unexpected behavior after the program exits.
-
- SYSTEM DEPENDENCIES
-
- This function is not supported for OS/386. The function returns -1 if
- it is called under OS/386.
-
- This function detects the DOS extender currently installed and acts
- accordingly. You can determine which environment the program is running
- in by testing the value of the extern char variable _mwenv. A value of
- 2 indicates Phar Lap's 386|DOS-Extender, 3 indicates Ergo's OS/386.
-
- _getpvect To get the protected-mode vector.
-
- _setrpvectp To set both the protected- and real-mode vectors to point
- to a protected-mode handler.
-
- _setpvect To set the protected-mode vector.
-
- _setrvect To set the real-mode handler.
-
- EXAMPLE
-
- See the example provided for _setrpvectp.
-
-
- ---------------------------------------------
- _setactivepage Current active screen page.
- ---------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <graph.h>
- short _setactivepage(short page);
-
- DESCRIPTION
-
- _setactivepage() allows you to set the current active screen page to an
- alternate page. The default page is page zero.
-
- Consult a standard DOS reference for more information on how many pages
- are available under different display modes on different video cards.
-
- RETURN VALUE
-
- _setactivepage returns the previous active page.
-
- SEE ALSO
-
- _getvideoconfig, _setvideomode, _setvisualpage
-
-
- --------------------------------------------------------
- _setpixel Color value of a single graphics pixel.
- --------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <graph.h>
- short _setpixel(short x, short y);
-
- DESCRIPTION
-
- _setpixel() sets the pixel at (x, y) to the current color, and returns the
- previous color value of the pixel.
-
- SEE ALSO
-
- _getpixel
-
-
- ----------------------------------------------------------
- _setpvect Set the protected-mode interrupt handler.
- ----------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <dos.h>
- int _setpvect(int intno,
- _Far _INTERRPT void(* handler)()
- );
-
- DESCRIPTION
-
- _setpvect() installs handler as the protected-mode interrupt handler for
- intno. This is one of several functions (see the SEE ALSO section)
- intended to provide 80386/486 support similar to that provided by
- _dos_setvect() and _dos_getvect() in the 80x86 16-bit library.
-
- Because protected-mode DOS extenders handle interrupts differently from
- real-mode DOS, _dos_setvect() and _dos_getvect() cannot be used in
- protected mode.
-
- RETURN VALUE
-
- The function returns -1 if the operation fails. If successful, the
- function returns zero.
-
- CAUTIONS
-
- If you install your own interrupt handler, be sure to save and restore
- the previous handler. If you do not restore the original handler, the
- machine may exhibit unexpected behavior after the program exits.
-
- SYSTEM DEPENDENCIES
-
- This function is not supported for OS/386. The function returns -1 if
- it is called under OS/386.
-
- This function detects the DOS extender currently installed and acts
- accordingly. You can determine which environment the program is running
- in by testing the value of the extern char variable _mwenv. A value of
- 2 indicates Phar Lap's 386|DOS-Extender, 3 indicates Ergo's OS/386.
-
- SEE ALSO
-
- _getpvect To get the protected-mode vector.
-
- _getrvect To get the real-mode vector.
-
- _setrpvectp To set both the protected- and real-mode vectors to point
- to a protected-mode handler.
-
- _setrvect To set the real-mode handler.
-
- EXAMPLE
-
- See the example provided for _setrpvectp.
-
-
- --------------------------------------------------------------------------
- _setrpvectp Set the real-mode and protected-mode interrupt handlers.
- --------------------------------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <dos.h>
- int _setrpvectp(int intno,
- _Far _INTERRPT void(* pmhandler)()
- );
-
- DESCRIPTION
-
- _setrpvectp() installs handler as the real-mode interrupt handler for
- intno. Both real-mode and protected-mode vectors point to the
- protected-mode handler pmhandler.
-
- This is one of several functions (see the SEE ALSO section) intended to
- provide 80386/486 support similar to that provided by _dos_setvect() and
- _dos_getvect() in the 80x86 16-bit library.
-
- Because protected-mode DOS extenders handle interrupts differently from
- real-mode DOS, _dos_setvect() and _dos_getvect() cannot be used in
- protected mode.
-
- RETURN VALUE
-
- The function returns -1 if the operation fails. If successful, the
- function returns zero.
-
- CAUTIONS
-
- Note that under OS/386 _setrpvectp() does, in fact, mirror the usage of
- _dos_setvect().
-
- If you install your own interrupt handler, be sure to save and restore
- the previous handler. If you do not restore the original handler, the
- machine may exhibit unexpected behavior after the program exits.
-
- SYSTEM DEPENDENCIES
-
- This function detects the DOS extender currently installed and acts
- accordingly. You can determine which environment the program is running
- in by testing the value of the extern char variable _mwenv. A value of
- 2 indicates Phar Lap's 386|DOS-Extender, 3 indicates Ergo's OS/386.
-
- SEE ALSO
-
- _getpvect To get the protected-mode vector.
-
- _getrvect To get the real-mode vector.
-
- _setpvect To set the protected-mode handler.
-
- _setrvect To set the real-mode handler.
-
- EXAMPLE
-
- #include <dos.h>
- #include <stdio.h>
- #include <stdlib.h>
-
- int Num_Ctrl_Cs = 0;
-
- _Far void _INTERRPT handler(void) {
- Num_Ctrl_Cs++;
- }
-
- void main(void) {
- int i, intno = 0x23; /* 0x23 is the Control-C interrupt. */
- _real_int_handler_t saver;
- _Far _INTERRPT void (* savep)() = (_Far) NULL;
-
- saver = _getrvect(intno); /* Get original vectors. */
- savep = _getpvect(intno);
-
- /*
- Set both vectors to point to protected-mode handler.
- */
-
- if(_setrpvectp(intno, handler) == -1 ) {
- fprintf(stderr, "Failed to install handler\n");
- return;
- }
-
- printf("Hit Control-C for a little while.\n");
- for(i = 0; i < 5000; i++)
- printf("\r%5d", i);
- printf("Number of Control C's = %d.\n", Num_Ctrl_Cs);
-
- /* Restore real-mode handler. */
- if(_setrvect(intno, saver) == -1 ) {
- fprintf(stderr, "Failed to restore"
- " real-mode handler.\n");
- return;
- }
-
- /* Restore protected-mode handler. */
- if(_setpvect(intno, savep) == -1 ) {
- fprintf(stderr, "Failed to restore"
- " protected-mode handler.\n");
- return;
- }
- return;
- }
-
-
- prints (will vary):
-
- Hit Control-C for a little while.
- ^C215
- ^C3
- ^C19
- ^C868
- 2444^C
- ^C49
- 41^C
- ^C78
- 4999
- Number of Control C's = 8.
-
-
- -----------------------------------------------------
- _setrvect Set the real-mode interrupt handler.
- -----------------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <dos.h>
- int _setrvect(int intno,
- _real_int_handler_t rmhandler
- );
-
- DESCRIPTION
-
- _setrvect() installs handler as the real-mode interrupt handler for intno.
- _setrvect() can be used only to restore the vector to a handler previously
- read with _getrvect(). No provision is made for directly setting the
- real-mode vector to an arbitrary routine.
-
- It is possible to set the real-mode handler to an arbitrary routine. To
- do so, you must write some code to convert the protected-mode address of
- the handler to a real-mode address. Under Phar Lap, this is possible
- using INT 21h, function 250Fh. See the Phar Lap 386|DOS-Extender manual
- for details.
-
- This is one of several functions (see the SEE ALSO section) intended to
- provide 80386/486 support similar to that provided by _dos_setvect() and
- _dos_getvect() in the 80x86 16-bit library.
-
- Because protected-mode DOS extenders handle interrupts differently from
- real-mode DOS, _dos_setvect() and _dos_getvect() cannot be used in
- protected mode.
-
- RETURN VALUE
-
- The function returns -1 if the operation fails. If successful, the
- function returns zero.
-
- CAUTIONS
-
- If you install your own interrupt handler, be sure to save and restore
- the previous handler. If you do not restore the original handler, the
- machine may exhibit unexpected behavior after the program exits.
-
- SYSTEM DEPENDENCIES
-
- This function is not supported for OS/386. The function returns -1 if
- it is called under OS/386.
-
- This function detects the DOS extender currently installed and acts
- accordingly. You can determine which environment the program is running
- in by testing the value of the extern char variable _mwenv. A value of
- 2 indicates Phar Lap's 386|DOS-Extender, 3 indicates Ergo's OS/386.
-
- SEE ALSO
-
- _getpvect To get the protected-mode vector.
-
- _getrvect To get the real-mode vector.
-
- _setpvect To set the protected-mode handler.
-
- _setrpvectp To set both the protected- and real-mode vectors to point
- to a protected-mode handler.
-
- See the example provided for _setrpvectp.
-
-
- --------------------------------------------
- _strdate Report the date as a string.
- --------------------------------------------
-
- DOS Only
- Not Reentrant
-
- SYNOPSIS
-
- #include <time.h> /* Required. */
- char *_strdate(char *sptr);
-
- DESCRIPTION
-
- _strdate() obtains the current date, converts it to character format, and
- places it in the string pointed to by sptr. The date is formatted as
- mm/dd/yy: mm is the month, dd is the day, and yy is the year. Each part of
- the date is two digits, and the string that sptr points to must be at least
- nine bytes long. The function places a terminating NUL character at the
- end of the date string.
-
- RETURN VALUE
-
- The function returns a pointer to the string.
-
- SEE ALSO
-
- asctime, ctime, gmtime, localtime, mktime, time, _tzset
-
- EXAMPLE
-
- #include <time.h>
- #include <stdio.h>
- void main() {
- char a[15];
-
- _strdate(&a[0]);
- puts("The date is --");
- puts(a);
- }
-
-
- prints:
-
- The date is --
- 4/23/92
-