Turbo C 2.0 library function Chinese description Daquan

zhaozj2021-02-17  47

The classification function, the function library is CTYPE.H INT ISALPHA (INT CH) if CH is the letter ('A' - 'Z', 'A' - 'Z') Returns a non-0 value, otherwise returns 0 ISALNUM (INTC If CH is the letter ('A' - 'Z', 'A' - 'Z') or numbers ('0' - '9'), return non-0 value, otherwise returns 0 int ISASCII (INT CH) if Ch Is a character (0-127 in the ASCII code) Returns a non-0 value, otherwise it returns 0 int ISCNTRL (INT CH) If the CH is a waste character (0x7f) or normal control character (0x00-0x1f), return non-0 value, otherwise returns 0 INT isdigit (int CH) If the CH is a number ('0' - '9') returns a non-0 value, otherwise returns 0 int ipegraph (int CH) if CH is a printable character (excluding space) (0x21-0x7e) Returns a non-0 value, otherwise it returns 0 ISLOWER (INT CH) if the ch is lowercase letters ('A' - 'Z') returns a non-0 value, otherwise returns 0 int isprint (int CH) if CH is printable characters (including Space) (0x20-0x7e) Returns a non-0 value, otherwise returns 0 int IPUNCT (INT CH) Returns a non-0 value if the CH is the punctuation character (0x00-0x1f), otherwise returns 0 int ISSPACE (INT CH) if ch is a space ( ''), Horizontal tabs ('/ t'), Enter ('/ R'), Paper Wavel ('/ f'), Vertical Table ('/ V'), Repair (' / n '), return a non-0 value, otherwise returning 0 int isupper (int CH) If the CH is uppercase letters (' a '-' z ') returns a non-0 value, otherwise returning 0 int isxdigit (int CH) if ch is 16 Enter ('0' - '9', 'A' - 'F', 'A' - 'F') Returns Non 0 Values, otherwise returns 0 int TOLOWER (INT CH) if ch is uppercase letter (' A '-' Z ') Returns the corresponding lowercase letters (' A '-' Z ') Int Toupper (INT CH) If CH is lowercase letters (' A '-' Z ') returns the corresponding uppercase letter (' A ' -'Z ') Mathematical functions, the function library is Math.h, stdlib.h, string.h, float.h int ABS (INT i) Returns the absolute value of the entire parameter i Double Cabs (Struct Complex Znum) Znum absolute value Double Fabs (double x) returns the double precision parameter X The absolute value Double EXP (Double X) returning the value long Labs (long n) Returns Double Frexp (Double Value, INT * EPTR) returns the value of the value in value = x * 2n, n Store Double Ldexp (Double Value, Int Exp) in EPTR;

Returns Value * 2EXP Value Double Log (Double X) Returns Double Log10 (Double X) Returns Double Pow (Double X, Double Y) Returns Double Pow10 (INT P) Returns 10p Double Double Double Double Double Double Double SQRT (double X) Returns the X-Double Double ACOS (Double X) Returns the X-flavored COS-1 (X) value, X is an angiobial sin-1 (x) value returns X of the radio Double Asin (Double X) , X is an arc Double Atan returns an anti-orthodox Tan-1 (X) value, X is the arc Double ATAN2 (Double Y, Double X) Returns Y / X of an anti-orthodox Tan-1 (X) value, Y X X is the cosine COS (X) value returns the X of the x, X is the sinusoidal SiN (X) value returns the X (Double X), and X is the arc Double Tan (Double X) returns The orthosis TAN (X) value of X, X is the two-curmed Cosh (X) value returns the X of the radians Double Cosh (X) value, and X is a dual sine SINH (X) value returns X of the arc Double SINH (Double X). , x is the two-dicing Tanh (X) value returns the X of X, X is the arc Double Hypot (double x, double y) Returns the length (Z), X and Y as the right angle triangle. Side length, z2 = x2

Y2 Double CEIL (Double X) Returns the minimum integer floor (double x) of the NOD (Double X) Returns the maximum integer void Srand (unsigned seed) initialization random number generator INT RAND () generates a random number and returns this number Double Poly (Double X, INT N, Double C []) generates a multi-term Double MODF (Double Value, Double * IPTR) from the parameter to decompose the double-precision value value to the mantissa and Double Fmod (double x, double y) Return to X The remainder of / y Double Frexp (Double Value, INT * EPTR) divides the double-precision value VALUE into the mantissa and the order Double ATOF (Char * NPTR) converts the string NPTR into floating point number and returns this floating point number Double Atoi (char * nptr) Converting the string NPTR into an integer and returns this integer Double Atol (Char * NPTR) to convert the string NPTR to the integer and return this integer char * ECVT (Double Value, int NDIGIT, INT * DECPT, INT * SIGN) to float Value converts the string and returns the string char * FCVT (Double Value, Int NDIGIT, INT * DECPT, INT * SIGN) converts floating-point value value into a string and returns the string char * GCVT (Double Value, int NDIGIT CHAR * BUF) converts the number value into a string and returned to the buf pointer char * ULTOA (unsigned long value, char * string, int RADIX) converts unsigned integer values ​​into a string and returns This string, RADIX is converted to the conversion CHAR * LTOA (Long Value, CHAR * STRING, INT RADIX) converts long-intensive value VALUE into a string and returns the string, and Radix is ​​based on the base char * ITOA ( INT Value, Char * String, Int Radix converts the integer value into a string to store String, RADIX is the base Double ATOF (Char * nptr) to convert the string Np when converted. Tr conversion into a double precision number, and returns this number, the error returns 0 INT ATOI (Char * NPTR) Converting the string nptr into an integer number, returns this number, error Returns 0 long atol (char * nptr) will string NPTR conversion to the total number, and return this number, the error returns 0 Double StRTOD (Char * Str, Char ** Endptr) converts the string STR into double precision, returns this number, Long Strtol (Char * Str, Char ** endptr, int base converts the string STR conversion to the total number, returns this number, int match (Struct Exception * e) user modifies mathematical error return information function (no need to use) Double _Matherr (_Mexcep why, char * Fun, Double * Arg1p, Double * Arg2P, Double Retval) User Modify Mathematical Error Return Information Functions (Nothing Use) Unsigned INT_CLEAR87 () Clears floating point status words and returns the original floating point status void _fpreset () Reproduction Floating point mathematics package unsigned int _status87 () Returns the floating point status word directory function, the function library is dir.h, dos.h int chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd chd cry ") Turns into the current working directory, successfully returns 0 int FindFirst (CHAR * PATHNAME, STRUCT FFB ​​* FFBLK, INT Attrib) Find the specified file, successfully returns 0 PathName as the specified directory name and file name, such as" C: // WPS // txt "

Ffblk is a structure for the specified save file information, defined as follows: ┏┏━━━━━━━━━━━━━━━━┓┓┓┓┓━━━━━━┓┓ ┓ ┓Truct Ffblk ┓ ━ ━ ┓ ┓ ┓ ━ ━ DOS reserved word * / char ff_attrib; / * file attribute * / INT ff_ftime; / * file time * / ternal file date * / LONG FF_FSIZE; / * file length * / Char ff_name [13]; / * file name * /}} ┗┗━━━━━┛━━━━━━━━━┛┛┛┛┛ 为 为━━━━━┛┛ Attrib for file properties, by the following character representative ┏┏━━ ━━━━━┳┳━━━━━━┓┓ ┓f_rdonly read-only file FA_Label volume marking number h h hidden file Fa_direc catalog _system system file ┗__━━━━━━━ ━┻┻━━━━━━━ ┛┛: struct ffblf; findfirst ("*. Wps", & ff, fa_rdonly); int FindNext (struct ffblk * ffblk) Repeat the Findway file, successfully return 0 void fumege (char * path, char * drive, char * dir, char * name, char * ext) This function passes the drive DRIVE (C:, A:, etc.), path DIR (/ TC, / BC / LIB, etc.), files Name (TC, WPS, etc.), extension ext (.exe, .com, etc.) form a file store in Path. Int fnsplit (Char * path, char * drive, char * dir, char * name, char * EXT) This function breaks down the file name Path into a disk letter Drive (C:, A:, etc.), path DIR (/ TC, / BC / LIB, etc.), file name Name (TC, WPS, etc.), extension EXT (. EXE, .COM, etc.) and deposit into the corresponding variables. INT getCurdir (int DRIVE, CHAR * DIREC) This function returns the current work directory name of the specified drive. Successfully returned 0 Drive Specified drive (0 = Current, 1 = A, 2 = B, 3 = C, etc.) DIREC Save Variables of the Specifies Drive Current Work Path Char * getCwd (Char * BUF, IINT N) This function takes the current work The directory is stored in BUF until the N-byte length is long. Error Returns NULL INT GETDISK () Take a drive that is currently in use, returns an integer (0 = a, 1 = B, 2 = C, etc.) int SetDisk INT Drive) The drive drive to use (0 = a, 1 = b, 2 = c, etc.), returns to build a new directory Pathname using the total number of drives, and successfully returns 0 int RMDir (charr * Pathname Delete a directory PathName, successfully returned 0 Char * mktemp (char * template) Constructing a file name not in a current directory and stores a file file file file file file file file file file file file file in TemPlate, this The function uses the DOS's path variable, and does not find the file to return the NULL process function. The function library is stdlib.h, and the process.h void abort () This function writes a termination information in stderr by calling _exit with export code 3, and abnormally Terminate the program.

Non-return value int exec ... loading and run other program int execl (char * arg1, char * argn, char * arg1, ..., char * argn, null) int execle (char * pathname, char * arg0, char * arg1, ..., Char * Argn, ​​NULL, CHAR * ENVP []) int execlp (char * pathname, char * arg0, char * arg1, ..., null) int execlpe (char * pathname, char * arg0, char * arg1, ..., NULL, Char * Envp [] Int Execv (Char * Pathname, Char * Argv []) Int Execve (Char * Pathname, Char * Argv [], Char * Envp []) int execvp (char * pathname, char * argv []) int execvpe (char * pathname, char * argv [], char * envp []) Exec function family is loaded and running the program Pathname, and the parameter arg0 (arg1, arg2, argv [], envp []) passed For the subroutine, the error returns -1. In the Exec function family, the suffix L, V, P, E are added to EXEC, and the specified function will have some operational capabilities. When there is suffix P, the function can use the DOS's PATH variable to find the subroutine file. l When the number of parameters transmitted in the function is fixed. v When the function passed is not fixed. E, the function passes the specified parameter ENVP, allows the environment where the sub-process is allowed, the sub-process uses the current program. Void_exit (int stat (int stat (int stat (int stat (int stat (int status) termination of the current program, turn off all files, write the output of the buffer (wait for the output), and call any register "exit function", no return Value int Spawn ... running program int Spawnl (int MODE, CHAR * PATHNAME, CHAR * ARG0, CHAR * Arg1, ..., char * argn, null) int Spawnle (int mode, char * pathname, char * arg0, char * arg1 , ..., char * envp []) int Spawnlp (int mode, char * pathname, char * arg0, char * arg1, ..., char * argn, null) int spawnlpe (int mode, char * pathname , Char * Arg0, Char * Arg1, ..., char * argn, null, char * envp []) int Spawnv (int mode, char * pathname, char * argv []) int Spawnve (int mode, char * pathname, char * argv [], char * envp []) int Spawnvp (int mode, char * pathname, char * argv []) int spawnvpe (int mode, char * pathname, char * argv [], char * envp []) SPAWN The function family runs the subroutine Pathname in the MODE mode and passes the parameter arg0 (arg1, arg2, argv [], envp []) to the subroutine. Error returns -1 Mode to run mode: Mode indicates the subroutine operation Follow the release of this program P_NOWAIT to run this program (unavailable) p_overlay in the subroutine runtime indicates that the operator is added to the spawn function family after this program exits, the suffix L, V, p, and e added to the spawn,

When the specified function will have some operace with a suffix P, the function uses DOS's PATH to find the subroutine file L. The number of parameters passed by the function is fixed. V, the number of parameters passed is not fixed. E, Specifying parameter ENVP can be passed to a subroutine, allowing to change the subroutine running environment. When the suffix E, the subroutine uses the environment of this program. Int System (char * Command) passes the MSDOS command Command to the DOS execution of the converter subroutine, the library For Math.h, Stdlib.h, CType.h, Float.h Char * ECVT (Double Value, Int Nd Ndigit, INT * DECPT, INT * SIGN) converts floating point value value into a string and returns to this string char * FCVT (Double Value, Int NDIGIT, INT * DECPT, INT * SIGN converts floating point value VALUE into a string and returns the string char * GCVT (Double Value, int NDIGIT, CHAR * BUF) converts the number Value into a string coexistence In BUF, return BUF's pointer char * ULTOA (unsigned long value, char * string, int RADIX) converts unsigned integer values ​​into a string and returns to the string, and Radix is ​​based on the base CHAR * LTOA. (Long Value, Char * String, Int Radix converts long-interented VALUE into a string and returns the string, Radix is ​​the base char * ITOA (int value, char * string, int rading) when converting Converting a string to store String, radix is ​​converted to the base Double ATOF (Char * nptr) to convert the string nptr into the number of double precision, return this number, error returns 0 int atoi (char * nptr) will string NPTR Convert to an integer, return this number, error Returns 0 long atol (char * nptr) converts the string NPTR to a long integer number, return this number, error Return 0 Double Strtod (char * str, char ** Endptr ) Converting the string STR to double precision, returns this number, Long Strtol (CHAR * STR, CHAR ** ENDPTR, INT BASE) converts the string STR to grow integers, and return this Number, int toascii (int C) Returns C The corresponding ASCII INT TOLOWER (INT CH) Returns the corresponding lowercase letters ('A-' Z ') INT _TOLOWER (' A- 'Z') INT_TOLOWER (int CH) Returns CH corresponding lowercase letters ('A' - 'Z') Int Toupper (INT CH) If CH is lowercase letters ('A' - 'Z') Returns the corresponding uppercase letters ('A'-' Z ') INT _TOUPPER (int CH) Returns the corresponding uppercase letter (' a '-' z ') diagnostic function, the function library is assert.h, Math.h void assert (int test) is an extension into an IF statement Macro, if the Test test fails, displays an information and terminates the program, the non-return value void perror (char * String) This function will display the most recent error message, format such as:

String string: Error message Char * strerror (char * STR) This function returns the last error message, format, string str: error message int match (STRUCT EXCEPTION * E) User Modify Mathematical Error Return Information Function (no necessary Use Double_Matherr (_MexceP Why, Char * Fun, Double * Arg1p, Double * Arg2p, Double Retval) User Modify Mathematical Error Return Information Function (Nothing Use) Input Output Subprint, Function Library is IO.H, Conio.h , Stat.h, dos.h, stdio.h, Signal.h int kbhit () This function returns a recently knocked button int FGETCHAR () reads a character from the console (keyboard), displayed on the screen INT getch () Read a character from the console (keyboard), not displayed on the screen INT pUTCH () Write a character int GETCHAR () from the console (keyboard), display on the screen Int Putchar () Write a character INT getChe () from the console (keyboard) to read a character from the console (keyboard), displayed on the screen INT UNGETCH (INT C) to return the character C back to the console (keyboard) char * cgets (char * string ) From the console (keyboard) to read the string in string int Scanf (Char * Format [, argument ...]) reads a string from the console, assigns each parameter, and uses the BIOS to output int vscanf. CHAR * FORMAT, VALIST PARAM) Reads a string from the console, assigns each parameter, using the BIOS to output, the parameters take int Cscanf (Char * format [, argument ...] from the Valist Param from the console Enter a string, assign each parameter, directly on the control table, such as the display when the display is displayed in the display INT SSCANF (Char * string, char * format [, argument, ...]) Through the string string, assign each parameter int vsscanf (Char * String, Char * Format, Vlist PARAM), assigns each parameter, parameter from VLIST, respectively, parameter from VLIST, respectively. The int PUTS (CHAR * STRING) is sent to the console (display), using the BIOS to output void cputs (char * string) Send a string string to the console (display), directly to the console Working, such as the display of the display INT Printf (Char * Format [, Argument, ...]) Send formatted string output to the console (display), using the BIOS to output int vprintf (char * format, valist) PARAM) Send a format string output to the console (display),

Use the BIOS to output, the parameters take int CPRINTF (Char * Format [, Argument, ...]) to send formatted strings from the Valist Param to the console (display), directly on the control table, such as the display is directly written Frequency mode Display INT VCPRINTF (Char * Format, Valist Param) Send Format String Output to Console (Display), directly on the control table, such as the display is displayed directly, the parameters are obtained from the Valist Param Sprintf (char * string, char * format [, argument, ...]) Reconnects the contents of the string string to formatted string int vsprintf (char * string, char * format, valist param) will string String The content is rewritten to the formatted string, and the parameter gets int Rename (Char * OldName, Char * newname) from Valist Param to change the name of the file oldname to NewNameint IOCTL (Int Handle, Int CMD [, Int * argDX, INT) ARGCX]) This function is used to control input / output devices, please see the following table: ┌ - ─ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ┐ │CMD value │ function │├──────────────────────────────────────── │ │ 1 │ Settings Equipment Information ││ 2 │ Read Argcx byte into the address referred to by argdx │ │ 3 │ ∎ Added Argcx byte │ │ 4 │ In addition to handle Handle as a device number (0 = Current, 1 = a, etc.), both, both CMD = 2 ││ 5 │ In addition to the handle as a device number (0 = current, 1 = A, etc.), all and cmd = 3 The same │ │ │ Take Input Status │ │ 7 │ Take Output Status │ │ 8 │ Test Conformability; Only For DOS 3.x │ │ 11 │ Set Sharing Conflict Reduction; Only DOS 3.x │ └ └ ─ ─ ──────────────────── ─ ┘ Int (* Ssignal (int SiG, int (* action) ()) ) Perform software signals (unnecessary) INT GSIGNAL (INT SIG) executes software signals (no need to use) INT_OPE n (char * pathname, int access) to open a file for reading or writing, press Access to determine whether reading file or write files, Access values ​​see the table below - ───────────────────── ──────── ─ ┐ │ACCESS value │ meaning │ ├─────────────────────────── O_RDONLY │ Read File │ │O_WRONLY │ │ │O_RDWR │ │ │O_NOINHERIT │ If the file is not passed to the subroutine, it is included │ │O_DENYALL │ only allows the current handler to access the file │ │O_Denywrite │ Only available file reads from any other open file │ │O_Denyread │ │ │O_DENYNONE │ Allow other shared open files │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────────── ─ ┘ Int open (int permissame, int access [, int permiss) is a file to read or write, press Access to determine whether reading file or writes files, Access value See the table below - ─ ────────────── ─ ─ │ACCESS value │ Significance │ ├────────── ───────── ─ ┤ │O_RDONLY│T reading file │ │O_WRONLY│ 写 文件 │ │ _ndlay│No; for UNIX System │ │O_APpend│ reading Write, but each time you write is always added to the file tail to add │ │O_CREAT │ if the file exists, this flag is useless;

If there is no existence, build a new file │ │O_TRUNC │ If the file exists, the length is intercepted 0, the attribute constant │ │O_EXCL │ │O_binary │ │ __binary│ This flag can be displayed in binary way File │ │O_TEXT │ This flag can be used to show a text mode to open files │ └─────────────────────────── ┘ Permiss as file attribute You can use the following values: S_IWRITE allows writing S_IREAD to allow reading S_IREAD | S_IWRITE to allow read, write int Creat (CHAR * FileName, INT Permiss) to create a new file filename, and set read and write. Permiss is read or written for file, allowing the following value S_IWRITE to write S_IREAD to allow reading, INIREAD | S_IWRITE to allow reading, write int _CREAT (CHAR * FileName, int Attrib) to establish a new file filename, and set file properties. Attrib for file properties, you can hide the following value FA_RDONLY read-only FA_HIDDEN hide the FA_SYSTEM system INT CreatNew (Char * filenamt, int attrib) to create a new file filename, and set file properties. Attrib for file properties, you can hide the following value FA_RDONLY read-only FA_HIDDEN hide the FA_SYSTEM system INT CreatTemp (Char * filenamt, int attrib) to create a new file filename, and set file properties.

Attrib for file properties, you can hide the following value FA_RDONLY read-only FA_HIDDEN hide the FA_SYSTEM system int ie, the NBYTE "from the file number is written in the file number, the NBYTE" is stored in BUF INT _READ (INT HANDLE) , void * buf, int nbyte) Read NBYTE characters from the file number to the file number to store the NBYTE, directly call MSDOS to operate. Int Write (int Handle, Void * BUF, INT NBYTE) Put the NBYTE in BUF The character writes the file number in the file number in the file number INT _WRITE (INT HANDLE, VOID * BUF, INT NBYTE) Write the NBYTE character in the BUF to the file number in the file number, Int Dup (int Handle) Copy a file processing pointer Handle, returning this pointer int DUP2 (INT HANDLE, INT NEWHANDLE) Copy a file processing pointer Handle to NewHandle Int EOF (INT * HANDLE) Check if the file ends, end returns 1, otherwise returns 0 long fileLength Returns the file length Handle is the time for the file number for the file number Int setmode (int Handle, Unsigned Mode) to set the file number to open the file number INT getftime (int Handle, Struct ftime * ftime) Read the file number for the file number And save the file time in the FTIME structure, successfully returned 0, the FTIME structure is as follows: ┌───────────── │Struct FTIME │ │ {│ │ unsigned ft_tsec: 5 ; / * Second * / │ │ unsigned ft_min: 6; / * 分 * / │ │ unsigned ft_Hour: 5; / * * / │ │ unsigned ft_day: 5; / * day * / │ │ unsigned ft_month: 4; / * Month * / │ │ UNSIGNED FT_Year: 1; / * Years -1980 * / │ │} │ └──────────────── ─ ┘ Int SetFTIME (Int Handle, Struct FTI ME * ftime) Overwrites the file number of the file number to the file time, the new time is in the structure ftime. Successful returns 0. Structure ftime as follows: ┌─────────────────── │Struct FTIME │ │ {│ │ unsigned ft_tsec: 5; / * │ │ unsigned ft_min: 6; / * 分 * / │ │ unsigned ft_Hour: 5; / * * * / │ │ unsigned ft_day: 5; / * day * / │ │ UNSIGNED FT_MONTH: 4; / * Month * / │ │ UNSIGNED FT_YEAR: 1;

/ * Year -1980 * / │ │} │ └ - ─────────────────────────────────────────────────────────────────────gyongişmlikin The file's pointer is moved to the origin of the release. Seek_set file Switch seek_cur Current location SEEK_END File Tail Long Tell (INT HANDLE) This function returns the file number to the handle file pointer, indicating ISATTY in byte (Int Handle) This function is used to take the type of INT LOCK (INT HANDLE, Long Offset, Long LENGTH) to the file shared Int Unlock (INT HANDLE, Long Offset, Long Length) Opens the block shared Int Close (Int Handle) Close the file processing represented by Handle, handle is from _CREAT, CREAT, CREATNEW, CREATTEMP, DUP, DUP2, _OPEN, and one of the files obtained from one of _creat, dup2, _open, and Open. _close (int Handle) Close the file processing represented by Handle, handle is from _CREAT, CREAT, CREATNEW, CREATTEMP, DUP, DUP2, _OPEN, and one of the files obtained in one of the time in Open, otherwise returning -1, only Can be used for MSDOS system file * fopen (char * filename, char * type) open a file filename, open mode is type, and return this file pointer, Type can add a suffix to the following string - ┬──── ┬───────────── ─ ┐ │TYPE│Express │ Text / 2 credit │ Building / Open Old File │ ├───────────────────────────────────────────────────────── ─ ─ ─ ────── ┤ │R │ │ │ │ │W │ 写 │ │ │ 建 文件 文件 │ │ │ │ │ Text │ If you have an open? │R │ Read / Write │ Unlimited │ Open │ │W │ Read / Write │ Unlimited │ Construction Document │ │A │ Read / Add │ Unlimited │ Open Improper Construction │ └─────────────────────────────────────────────────tes ┴────────────────── ─ ┘ can be added to T, B.

Plus B indicates that the document is operated in binary form, T is not necessarily used: ┌ --──────────────── │ │ │MAIN () │ │ {│ │ File * fp; │ │ │FP = FOPS.exe, "R B"); │ └────────────── ─ ─ ┘ File * fdopen (int ahndle, char * type) file * Freopen (Char * filename, char * type, file * stream) INT GETC (File * Stream) reads a character from the stream stream and returns this Character INT PUTC (INT Ch, File * Stream) Writes a character ch INT GETW (File * Stream) from the stream stream into an integer, error Returns EOF INT PUTW (Int W, File * Stream) Stream Stream Write an integer int ungetc (Char C, File * Stream) Returns the character c back to the stream stream, the next read character will be a character at Cint Fgetc (File * Stream) from the stream stream, and return this character INT FPUTC (int CH, File * Stream) CHAR * FGETS (CHAR * STRING, INT N, FILE * STREAM) from the stream stream in the stream stream (Char * String) File * stream) Read the string string into the Stream INTFREAD (VOID * PTR, INT SIZE, INT NITEMS, File * Stream) Enter the NITEMS in the stream stream to store the NITEMS length SIZE in the PTR in the PTR FWRITE (Void * PTR, int size, int nitems, file * stream) writes a string of NITEMS for size in the stream stream, string in PTR Int fscanf (file * stream, char * format [, argument, ...]) read a string int vfscanf (file * stream, char * format) in a formatted form in a formatted Stream (File * Stream, Char * Format Valist param, read a string from the stream stream in a formatted form, and the parameter takes int fprintf (file * stream, char * format [, argument, ...]) from the Valist Param to form a string to form a string Write a string to the specified stream stream in formatting the specified streaming stream in formatted streams, parameters from Valist Param (File * Street, long offset, The int.comwhere function moves the file pointer to the backstart item of the location of the location of FROMWHER, and fromwhere can: seek_set file switch seek_cur Current position seek_end file tail long ftell (file * stream) function Return positioning in Stream The current file pointer position, in byte indicating INT REWIND (file * stream) to move the current file pointer stream to the beginning INT feof (file * stream) Detection Stream Stream Pointer is ended in the end position int fileno (file * stream ) Replace the file processing on the stream, and return to the file processing INT FERROR (File * STREAM) to detect whether there is a read and write error on the stream,

If there is a mistake, return 1 Void Clearerr (File * Stream) Clear Stream, readbuf (File * Stream, Char * BUF) on Stream, specify a buffer buf void setvbuf (file * stream, char * buf) , int type, unsigned size) Give Stream Specifies a buffer BUF, size size, type Type, Type's value see the table ┌ - ─ ───────────── ──────────── ─ ┐ │TYPE │ │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ───────── ─ ┤ │_IOFBF│Fable is a full buffer, when the buffer is empty, the next input operation will attempt to fill the entire loose │ │ │ 区. When output, any data Before writing to the file, you will completely fill the buffer. │ │_iolbf│ file is a row buffer. When the buffer is empty, the next input operation will still try to fill the entire loose │ │ │ 区. However, when output, every When the new line is written, the buffer is cleaned. │ │_ ionbbf│ file is unbuffered .buf and size parameters are ignored. Each input operation will directly read directly from │ │ │-read, each The output will immediately write the data to the file. │ └ - ┴─────────────────────────────── ─ ─ ┘ Int Fclose (file * stream) Close a stream, which can be a file or device (for example, LPT1) int Fcloseall () Close all streams except STDIN or STDOUT turn off a stream, and processing the buffer processing That is, the stream is read, read the contents of the stream into the buffer; the write stream, write the contents within the buffer. Successfully returned 0 int fflushall () Close all streams, and conveys the respective buffer works processing, that is, the stream is read, and the content is read into the buffer; the write stream, write the contents in the buffer.

Successfully Returns 0 INT Access (CHAR * FileName, Int Amode) This function checks file filename and returns the properties of the file. The function exists in Amode. Amode is written by the combination of the following bits. You can read 02 can be read. 01 Perform (ignored) 00 file existence If FileName is a directory, the function will only determine if the directory exists to perform successful returns 0, otherwise returns -1 int chmod (int permiss) This function is used to set file filename The attribute Permiss can allow the following value S_IWRITE to write s_iread to allow reading S_IREAD | S_IWRITE to read, write int _chmod (Char * filename, int func [, int attrib]); this function is used to read or set the properties of the file filename, When FUNC = 0, the function returns the properties of the file; when func = 1, the attribute of the function setting file is for setting file properties, attrib can use one of the following constants to hide the FA_SYSTEM system interface subroutine, The library is: dos.h, bios.h unsigned sleep (unsigned seconds) Pause Seconds microseconds (one percent) Int unlink (char * filename) Delete file filename unsigned fp_off (Void Far * Farptr) This function is used The offset of far pointer Farptr Unsigned FP_SEG (Void Far * Farptr) This function is used to set a FAR * mk_fp (unsigned seg, unsigned off) according to segment seg and offset OFF. Pointer Unsigned getPSP () Device segment address segment address, and return this address char * PARSFNM (CHAR * CMDLINE, STRUCT FCB * FCBPTR, INT OPTION) Function Analysis of a string, usually, for a file name, CMDLINE refers to the file name is put in an FCB as a drive, file name, and extension. FCB is specified by the FCBPTR. Option parameter is the value of the Al text when the DOS analysis system is called. int ABSREAD INT Drive, int Nsects , int SECTNO, VOID * BUFFER This function function is to read a specific disk sector, Drive is the driver number (0 = a, 1 = b, etc.), nsects is the number of sectors to read, and SECTNO starts logical sector number. Buffer To save the save space of the read data, Int AbsWrite (int DRIVE, INT NSECTS, INT Sectno, Void * Buffer) This function is written to write a specific disk sector, Drive is the drive letter (0 = a, 1 = B, etc. ), Nsects is the number of sectors to be written, and SECTNO starts logical sector number, Buffer is the free space of the disk to save the space written by Void getDfree (int Drive, Struct DFree * DFreeP) This function is used to take the free space of the disk. For disk numbers (0 = Current, 1 = A, etc.). Functions In the DFree structure of the disk characteristic, DFREEP. DFREE structure is as follows: ┌ --──────────────────────────────────────────────────────────────────────────────────────────────────── ┐ │STRUCT DFREE │ │ {│ │ unsigned df_avail; / * Useful cluster number * / │ │ unsigned df_total; / * Total cluster number * / │ │ unsigned df_bsec; / * Each sector byout │ │ UNSIGNED DF_SCLUS;

/ * Each cluster sector number * / │ │} │ └─────────────────────────── ┘ Char far * getdta () Take the disk switch address DTA Void setdta (char FAR * DTA) Set Disk Conversion Address DTA Void Getfat (int DRIVE, FATINFO * FATBLKP) This function returns file allocation table information of the specified drive Drive (0 = current, 1 = A, 2 = B, etc.) and stored in structural FATBLKP The structure is as follows: ┌ - ─────────── │ │ {│ │ Char Fi_SClus; / * Each cluster sector * / │ │ CHAR FI_FACID; / * File allocation table bytes * / │ │ │ │ │ 字 字 * / │ │} │ └───────── ──────────── ─ ┘ Void getfatd (Struct Fatinfo * Fatblkp) This function returns the file allocation table information of the current drive, and stores the structure FATBLKP, the structure is as follows: ┌────── ──────────┐ │struct fatinfo │ │ {│ │ char fi_sclus; / * number of clusters per sector * / │ │ char fi_fatid; / * number of bytes in the file allocation table * / │ │ int Fi_nclus; / * Number of clusters * / │ │ 字 * / │ │} │ └────────────────────────────────────────────────────────────────── ─ ─ ─ BDOS (int dosfun, unsigned dosdx, unsigned DOSAL) This function calls the MSDOS system, DOSDX is the value of the register DX, DOSAL is the value of the register Al, dosfun is the function number Int Bdosptr (int dosfun, void * argument, unsiigned dosal) This function is called by the MSDOS system, and the argument is the value of the register DX. Dosal is the value of the register Al, and the dosfun is the function number int INT86 (INT INTR_NUM, Union Regs * INREGS, Union Regs * Outregs) executes the INTR_NUM number interrupt, user-defined The register value is stored in the structure inregs, and the register value returned after execution is OUTREG. S. INT INT86X (int INTR_NUM, UNION REGS * INREGS, Union Regs * OUTREGS, STRUCT SRUCS * SegRegs) Execute an INTR_NUM number interrupt, and user-defined register values ​​are stored in archregs in Segregs, will return after execution. The register value is stored in Outregs. INT INTDOS (Union Regs * INREGS, Union Regs * Outregs) This function performs DOS interrupt 0x21 to call a specified DOS function, and the user-defined register value exists in INREGS, execution functions The returned register value is stored in the structure Outregs INT INTDOSX (Union Regs * INREGS, UNION REGREGS) This function performs DOS interrupt 0x21 to call a specified DOS function, and the user-defined register value exists. Inregs and Segregs, the function is executed to save the returned register value in the structure OUTREGS VOID INTR (INT INTR_NUM, STRUCT REGPACK * PREG) This function is an alternate 8086 software interrupt interface that it can generate a 8086 specified by the parameter INTR_NUM The software is interrupted. The function replicates the user-defined register value to each register before executing the software interrupt. After the software is interrupted, the function will be copied to the value of the current registers into the structure pregon. The parameters are as follows: INTR_NUM is executed interrupt No.

PREG is the structure of saving user-defined register values ​​- ────────────────── │STRUCT Regpack │ {│ │ Unsigned R_ax, R_BX, r_cx, r_dx; │ │ unsigned r_bp, r_si, r_di, r_ds, r_es, r_flags; │ │} │ └──────────────────────┘ executing the function Afterwards, the new register value is stored in the structural PREG (int status, int size) Returns MSDOS in the Status status, but the program remains in memory, the space occupied by Size. Void Ctrlbrk (int (* fptr) ()) Set the interrupt handler after the interrupt. Void disable () disables the interrupt VOID Enable () allows interrupt VOID GENINTERRUPT (INT INTR_NUM) to execute the software specified by INTR_NUM to interrupt VOID INTERRUPT (* getvect (int INTR_NUM) () Returns the interrupt handler for the interrupt number INTR_NUM, for example: OLD_INT_10H = GetVect (0x10); Void setVect (int INTR_NUM, VOID INTERRUPT (* ISR) ()) Setting the interrupt handler ISR INTR_NUM, for example : setVect (0x10, new_int_10h); Void Harden ()) Defines a hardware error handler, whenever an error occurs, call the program void hardresume (int Rescode) hardware error handler for FPTR void HardRetn (int erRcode) hardware error handler INT Inport (int prot) reads a word from the specified input port, and returns this word int inportb (int port) to read a byte from the specified input port and return this byte Void Outport (int port, int Word) Write the word Word to the specified output port Port Void Outportb (int port, char Byte) Write byte Byte to the specified output port Port Int PEEK (int segment, unsigned offset function) Segment: o A word char peekb (int segment) function returns a segment: Offset, int offset, char value, write the word Value, Segment: Offset Void Pokeb (int segment) , int offset, int value) Write bytes Value to the segment: Offset The int RANTBRD (INT RECNT) function is recorded by the FCB referring to the FCBPTR. Int RandbWR (Struct FCB * fcbptr, int The RECNT function writes the RecCnt record in the FCB referred to in FCBPTR to the VOID Segread (Struct Sregs * SEGTBL) function puts the current value of the segment register into the current status of the INT GETVERIFY () in SEGTBL (0) = Test Close, 1 = Test Opening) Void setVerify (int value) Set the current inspection status, Value is 0 indicates the shutdown test, indicating that the INT Get GetcBRK () This function returns the current setting of the control interrupt detection INT setCBRK (int value This function is used to set the control interrupt to detect when Value = 0 is turned on. When Value =

1 At the time of detecting INT DOSEXTERR (Struct Doserr * EBLKP), the extended error is removed. After the DOS error occurs, this function fills the extended error message in the Doserr structure referred to in EBLKP. This structure is as follows: ┌─ ────────── │ │ │ │ │ Int EXTERROR; / * Extension error * / │ │ Char class; / * Error type * / │ │ Char action; / * way * / │ │ CHAR LOCUS; / * Error / │ │} │ └ - ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────book is responsible for data Communication work, cmd can be the following value: 0 Communication parameters as byte BYTE value 1 Send Characters By communication line output 2 Retrieve character 3 from the communication line Returns the communication port, port = 0 When the communication port is COM1 When port = 1, the communication port is COM2, and the parameters when the BYTE is transmitted or received, the combination of the following bit: ┌ - ─ ───────────── ─ ─ ──── ┐ │BYTE Value │ meaning │BYTE Value │ meaning │BYTE Value │ Significance │ ├─────────────────────────────────────────────────────────────────────── ┼─── ─ ┤ │0x02 │7 data │0x03 │8 data 位 │0x00 │1 stop bit │ │0x04 │2 stop bit │0x00 │ 无 奇 │0x08 │ odd parity │ │0x18 │ │ 奇偶 奇│0x00 │110 Potter │0x20 │150 Potter │ │ │0x40 │300 Baud │0x60 │600 Port │0x80 │1200 Port │ │0xa0 │2400 Port │0XC0 │4800 Port │0XE0 │9600 wave Special │ └ - ─ ──────────────────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─te Special, odd parity, 1 stop bit, 8 data bits. Function return value is a 16-bit integer, defined as follows: 15th timeout 14th transfer shift register empty 13th transfer fixed register empty 12th interrupt detection 11th Frame Error 10th Parity Error 9th Overload Running Error 8th Data Ready 5th Receive Line Signal Detection Sixth Ring Indicator 5th Data Setting Ready 4th Clear Send 3rd Bit δ Connection Crupt Line Signal Detector 2nd Decline Side Ring Detector No. 1 Δ Data Setting Ready 0 - Bit δ Clear Send Int BiosDisk (int CMD, Int Drive, Int head, int track, int syn, int nsects, void * buffer This function is used to operate a certain operation for the drive. The CMD is the function number. Drive is the drive letter (0 = a, 1 = b, 0x80 = c, 0x81 = d, 0x82 = e, etc.). Cmd can be the following value: 0 Reset Soft Disk System. This forces the drive controller to perform hard reset. 1 Return to the last hard disk operation status. Ignore all other parameters 2 read one or more disk sectors to memory. Read the sector Given by Head, Track, Sector. The sector number is given by nsects. Reading 512 bytes of data of each sector into buffer 3 writes from memory read data to one or more sectors. The sector written by Write is given by Head, Track, and Sector. The sector number is given by nsects. Write data in Buffer, 512 bytes per sector. 4 Test one or more sectors. Start the sector by Head, Track, Sector. The sector number is given by nsects. 5 Format a track, which is given by Head and Track. Buffer points a table to the sector header written on the specified track. The following CMD values ​​are only allowed for XT or AT microcomputers: 6 formatted a track, and set a bad sector flag. 7 Format the beginning of the drive on the specified track. 8 Returns the current drive parameter, the drive information returns to the buffer (indicated in four bytes). 9 Initialize a pair of driver characteristics.

10 Perform a long reading, each sector reading 512 plus 4 additional bytes 11 Perform a long writing, each sector write 512 plus 4 additional bytes 12 Perform a disk lookup 13 alternate disk reset 14 read fan District buffer 15 write sector buffer 16 Check that the specified drive is ready 17 Review Drive 18 Controller RAM Diagnostics 19 Drive Diagnostics 20 Controller The internal diagnosis function returns the status byte of the following bits: 0x00 operation success 0x01 bad Command 0x02 address tags Can't find 0x04 records Can't find 0x05 Reset failure 0x07 Drive Parameters Activity Failure 0x09 Attempt DMA At 64K Limit 0x0B Check DBR Tag 0x10 Direct ECC Reads 0x11 ECC Correction Data Errors (Note It Not an error) 0x20 Controller Failure 0x40 Finding Failed 0x80 Response Link Failed 0xBB Appearance Unfained Error 0xFF Read Operation Fail INT Biodquip () Check Device, Function Returns a Byte, the byte represents a message, as follows: The 15th printer number 14th printer number 13th unused 12th bit connection game I / O No. 11 RS232 port number 8th unwinding the 7th-bit soft disk number, 00 is No. 1 drive 01 is the No. 2 driver, 10 is the No. 3 driver, 11 is the No. 4 driver 5th bit initialized the 4th display mode 00 is not used, 01 is 40x25bW color display card 10 is 80x25bw color display card, 11 is 80x25bw Monochrome The second random memory capacity of the third mother sector is displayed, 00 is 16K, 01 is 32K, 10 is 48K, 11 is 64K First Bit Floating Point Shared Processor 0th Bit Guide INT Bioskey (int Bioskey) CMD) This function is used to perform various keyboard operations, determined by the CMD. The CMD can be the following value: 0 Returns the next button on the keyboard. If the low 8 bits are non-0, it is an ASCII character; if the low 8 bits are 0, return the expanded keyboard code. 1 Test if the keyboard can be used to read. Returns 0 indicates that there is no key to be available; otherwise returns the next knock key value. The knock key itself keeps the value returned by the Bioskey, which is 0, the CMD value of the next call.

2 Returns the current keyboard status, which is represented by each bit of an integer, see the table: ┌ - ┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ 0 0 意 意 意 1 1 意 意 意 意 意 状态 ┼ ┼ 状态 状态 ┼ ┼ 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态 状态│ 大写 │ │ 5 │ Digital Status, Numlock Lights Light │ Corbital Status, Numlock Lights Off - │ │ 4 │Scrollock Lights Light │Scrolllock Lights Off │ │ 3 │ALT Press │ALT Unpaid │ │ │CTRL Press Lower │CTRL unpub │ │ 1 │ left Shift Press │ Left Shift Unforce │ │ 0 │ Right Shift Press │ Right Shift Unforgettable │ └ - ┴──────── ┴───────── ─ ┘ INT BiosMemory () Returns the memory size, in K. INT BiospRINT (int CMD, int Byte, int port) Controls the input / output of the printer. Port is the printer number, 0 is LPT1, 1 is LPT2, 2 is LPT3 and other CMDs may be the following value: 0 print characters, send character BYTE to the printer 1 Printer port Initialization 2 Read the printer status function Return value consisting of the following bit value indicating the current printer status 0x01 device Time timeout 0x08 input / output error 0x10 selected 0x20 Paper 0x40 Approve 0x80 Not Busy INT Biostime (int CMD, long newtime) Timer control, cmd is function number, can return the current value of the timer for the following value 0 function 1 The timer is set to the new value newtime struct country * Country (int COUNTRYCMODE, STRUCT country * countryp) This function is used to control information about a country, such as date, time, currency, etc. If countryp = -1, current country Set to CountryCode (must be non-0). Otherwise, the COUNTRY structure pointed to the following national related information: (1) Current country (if countrycode is 0 or 2) by CountryCode. Structure Country is as follows: ┌ --────────────── │ {│ │ │ __date; / * Date Format * / │ │ CHAR CO_CUR R [5]; / * Currency Symbol * / │ │ CHAR CO_THSEP [2]; / * Digital Division * / │ │ CHAR CO_DESEP [2]; / * Different points * / │ │ CHAR CO_DTSEP [2]; / * Date Separator * / │ │ CHAR CO_TMSEP [2]; / * Time Delivery * / │ │ CHAR CO_CURRSTYLE; / * Money Form * / │ │ CHAR CO_DIGITS; / * Valid Number * / │ │ INT (FAR * CO_CASE) ); / * Event processing function * / │ │ CHAR CO_DASEP; / * Data Delivery * / │ │ CHAR CO_FILL [10];

/ * Supplemental characters * / │ │} │ └ --────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─te The currency display of the value of CO_CURRSTRLE 2 months is that the currency symbol is in front of the value, the intermediate spaceless 1 currency symbol After the value, the middle spaceless 2 currency symbol is in front of the value, there is a space 3 currency symbol after value There is a space operation function in the middle, the function library is String.h, Mem.h MEM ... operation storage array VOID * MEMCCPY (Void * Destin, Void * Source, unsigned char ch, unsigned n) void * memchr (void * s , char ch, unsigned n) void * Memcmp (Void * S1, Void * S2, unsigned n) int memory (void * s1, void * s2, unsigned n) void * Memmove (void * destin, void * source, unsigned n Void * Memcpy (Void * Destin, Void * Source, unsigned n) Void * MEMSET (Void * s, char ch, unsigned n) These functions, all members of the MEM ... series are operated in all these functions. The array is N-byte length. Memcpy copies an N-byte block to Destin from Source. If the source block and the target block are overlap, select the copy direction to correctly copy the overlay bytes. Memmove is the same as Memcpy. MEMSET places all the words S in byte CH. The length of the array is given by n. Memcmp is exactly the two strings S1 and S2 of the N-byte length. Some functions are compared by the unsigned characters. Therefore, MEMCMP ("0xFF", "/ x7f", 1) The return value is greater than 0. Memicmp compares the first n bytes of S1 and S2, regardless of character capital or lowercase. Memccpy Copy byte from source to Destin. Copy one end The following is the following: (1) Character CH Preferences Copy to Destin. (2) N bytes have been copied to Destin. Memchr Retrieves the first n bytes of the S array for character CH. Return Value: Memmove and Memcpy return Destin MemSet Returns the value of s MEMCMP and Memicmp─ ┬─ If S1

Offest) Void MoveMem (Void * Source, Void * Destin, Unsigned LEN) This function is copied from the Source to Destin. If the source address and destination address string are overlapped, select the replication direction for correct Copy data. Void setmem (void * addr, int LEN, char value) This function places the first byte of the block referred to in Addr in byte Value. STR ...

String Operation Function CHAR STPCPY (CHAR * DEST, Const Char * src) Copy the string src to Dest Char STRCAT (CHAR * DEST, Const Char * SRC) Add a string src to the end of DEST CHAR STRCHR (Const Char * S) , INT C) Retrieves and returns the character c in the first occurrence of the first time INT STRCMP (const char * s1, const char * s2) compare the size of the string S1 and S2, and returns S1-S2 Char STRCPY ( CHAR * DEST, ConST Char * SRC) Copy the string src to DEST SIZE_T STRCSPN (Const Char * S1, Const Char * S2) Scan S1, returned in S1, and some characters in S2 CHAR STRDUP (Const CHAR * S) Copy the string S to the most recently established unit int STRICMP (Const Char * S1, Const Char * S2) compare strings S1 and S2, and returns S1-S2 SIZE_T STRLEN (const char * s) Returns string The length of CHAR STRLWR (Char * S) converts all uppercase letters in the string S into lowercase letters, and returns the conversion string char strncat (char * dest, const char * src, size_t maxlen) to string SRC Up to Maxlen characters Copy to string dest in int struct charm (const char * s1, const char * s2, size_t maxlen) comparison strings S1 and S2 in front Maxlen character char STRNCPY (Char * DEST, Const Char * src , SIZE_T MAXLEN) Copy the former Maxlen characters in the SRC to DEST INT STRNICMP (Const Char * S1, Const Char * S2, SIZE_T MAXLEN) Comparison Strings S1 and S2 in front Maxlen character char strnset (char * s, INT CH, SIZE_T N) Place the first n characters of the string S in CHAR STRPBRK (const char * s1, const char * s2) Scan string S1, and return The number of characters all in S1 and S2 CHAR STRRCHR (Const Char * S, INT C) Scan a string S CHAR STRREV (Char * S) of a given character C to all characters in the string S Invert the order, rearrangement, and return the arranged string char strst (CHAR * S, INT CH) to place all characters in a string S in a given character CH size_t strspn (const char * s1, const char *) S2) Scan string S1 and returns a character number CHAR STRSTR (const char * s1, const char * S2) in S1 and S2, and returns the first time S1 position char Strtok ( CHAR * S1, Const Char * S2) Retrieve string S1, which is separated by the delimiter of the character string S2 to convert the lowercase letters in the string S to uppercase Letters, and return the converted string storage allocated subroutines, the library is dos.h, alloc.h, malloc.h, stdlib.h, process.h int allocmem (unsigned size, unsigned * seg) using DOS Assign idle memory, Size is allocated memory size, SEG-assigned memory pointer INT FreeMem (unsigned seg) releases the memory allocated by allocmem, SEG is the specified memory pointer Int setBlock (int seg, int newsize) This function is used To modify the assigned memory length, SEG is the memory pointer that has been allocated, and newsize is used for the new length INT BRK (Void * endds) This function is used to change the number of spaces assigned to the data segment of the calling program.

The new space end address is Endds Char * SBRK (INT INCR) This function is used to increase the number of space assigned to the data segment assigned to the calling program, adding the INCR-byte space UNSigned long core () This function returns unused storage area The length, assigning the NELEM length of the ELSIZE in bytes in bytes, and returns the memory space of the allocated SIZE bytes, and returns the memory space of the assigned memory. And returns the pointer Void Fre (Void * Ptr) allocated, released, and the memory of the memory to be released is Ptrvoid * Realloc (Void * PTR, UNSIGNED NEWSIZE) to change the size of the assigned memory, PTR is allocated There is a pointer in the memory area, and newsize is a new length, returns a hidden memory pointer. Long farcoreleft () This function returns the length of the unused storage area in the far, in bytes Void Far * Farcalloc (unsigned long units UNSigned long unitsz) From the far-reactor allS length of the Units, and returns the pointer VOID * FARMALLOC (Unsigned long size) assigned the SIZE byte, and returns the assigned memory pointer Void Farfree (Void Far * Block) Releases the memory space previously assigned from the far-reactor, the pointer to the long stack memory to be released to the block void far * farrealloc (Void Far * Block, unsigned long news) change the size of the allocated far, Block is a pointer that has been assigned with a memory area, and newzie is a new length, returns the assigned memory pointer time date function, the library is time.h, DOS.H In the time date function, the main use structure has the following structure. One: Total Time Date Storage Structure TM ┌ --───────────────── ┐ │STRUCT TM │ │ {│ │ INTTM_SEC; / * Second, 0-59 * / │ │ INTTM_MIN; / * Division, 0-59 * / │ │ INTTM_HOUR; / *, 0-23 * / │ │ INTTM_MDAY; / * Number, 1-31 * / │ │ INTTM_MO n; / * month, 0-11 * / │ │ INTTM_YEAR; / * Since 1900's number of days * / │ │ INTTM_WDAY; / * Since Sunday's days 0-6 * / │ │ IntTM_YDAY; / * Since 1 The number of days from the month, 0-365 * / │ │ INTTM_ISDST; / * Whether to use a summer time system, it is positive * / │ │ │ └──────────────── ────────────────────────────────── │Struct Date │ │ {│ │ Int Da_Year; / * Since 1900's number of days * / │ │ char da_day; / * days * / │ │ char da_mon; / * months 1 = Jan * / │ │} │ └───────────────┘ time storage structure time ┌─ ────────── │ │ {│ │ unsigned char Ti_min; / * Minute * / │ │ UNSIGNED Char Ti_Hour; / * Hours * / │ │ unsigned char Ti_hund; │ │ UNSIGNED CHAR TI_SEC; / * Second * / │ │ │ └ - ──────────────────── ─ ┘ char * ctime (long * clock) This function puts the time referred to in Clock (eg The time returned by the function time) String to the following format: Mon Nov 21 11:31:54 1983 / N / 0 CHAR ASCTIME (STRUCT TM * TM) This function converts the specified TM structure class into the following format String: Mon Nov 21 11:31:54 1983 / N / 0 Double DiffTime (Time_t Time2,

转载请注明原文地址:https://www.9cbs.com/read-28500.html

New Post(0)