C library function manual classification function, the function library is ctype.hint isalpha (int CH) if CH is the letter ('A' - 'Z', 'A' - 'Z') Returns 0 value, otherwise returns 0INT IsalNum INT CH) If CH is a letter ('A' - 'Z', 'A' - 'Z') or numbers ('0' - '9') returns to non-0 value, otherwise returns 0InT isascii (int CH) if ch Is a character (0-127 in the ASCII code) Returns a non-0 value, otherwise returns 0INT ISCNTRL (INT CH) If the CH is a waste character (0x7f) or the normal control character (0x00-0x1f) returns a non-0 value, return 0int isdigit (int CH) If the CH is a number ('0' - '9') returns a non-zero, it will return 0INT ISGRAPH (INT CH) if the CH is a printable character (excluding space) (0x21-0x7e) returns non-0 value Otherwise, returning 0int islower (int CH) If CH is lowercase letters ('A' - 'z') returns non-0 value, otherwise returning 0int isprint (int CH) if ch is a printable character (including air) (0x20-0x7e) Returns a non-0 value, otherwise returns 0INT ISPUNCT (INT CH) Returns a non-0 value if the CH is the punctuation character (0x00-0x1f), otherwise returns 0INT ISSPACE (INT CH) if ch is space (''), horizontal tab ('/ t'), Enter ('/ R'), Paper Wrap ('/ f'), Vertical Table ('/ V'), Retained ('/ N') Returns Non 0 Value Otherwise, returning 0INT Isupper (int CH) If the CH is uppercase letters ('A' - 'Z') returns to a non-0 value, otherwise returns 0INT Isxdigit (int CH) if CH is a 16-en-load number ('0' - '9 ',' A '-' f ',' a '-' f ') Returns a non-0 value, otherwise returns 0int 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 letters ('A' - 'Z') mathematical functions, the function library is Math.h, stdlib.h, string.h, float.hint ABS (INT i) Return to the absolute value of the entire parameter i Double Cabs (Struct Complex Znum) Returns the absolute value of the recoverable znum Double Fabs (double x) Returns double precision The absolute value of the parameter x Long Labs LONG N) Returns the absolute value Double EXP (Double X) returns the index function EX return index function EX Double Frexp (Double Value, INT * EPTR) Returns the value of X in Value = x * 2n, N storage in EPTR Double LDEXP (Double Value, INT Exp); Returns Value * 2EXP Double Log (Double X) Returns Double Log10 (Double X) Returns the value of log10x Double Pow Returns the value of XY Double Pow10 (INT P) Returns 10P Double SQRT (Double X) Returns
√x's value Double ACOS (Double X) Returns the anti-residual COS-1 (X) value of X, X is the arc Double Asin Returns the X-1 (X) value of X, X is the curvature Double Atan (Double X) Returns the Untifregate Tan-1 (X) value of X, X is the arc Double ATAN2 (Double Y, Double X) Returns Y / X Annectant Tan-1 (x) value, Y X is the curvature Double Double COS (Double X) Returns the cosine COS (X) value of X, X is the sinusoidal SiN (X) value returns X (Double X), and X is the precise TAN of X as the arc Double Tan (Double X) (X) ) Value, X is a double cosine Cosh (X) value returns the X of the radio Double Cosh (X) value, and X is the two-sin-sin (x) value returns the X of X. X is the curved Double Tanh. (Double X) Returns the double-dicing Tanh (X) value of X, X is the arc Double Hypot (double x, double y) Returns the length (z) of the angled triangle horns (Z), X and Y is the length of the straight angle, Z2 = X2
Y2DOUBLE CEIL (Double X) Returns the minimal integer of X. Double Floor (Double X) Returns the maximum integer Void Srand (unsigned seed) in which X initializes the random number 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, decomposes the double-precision value value into the mantissa and the order Double Fmod (Double X, Double Y) Returns to X / Y's remaining 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) String NPTR Converted 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 floating the floating point value VALUE Convert the string and return 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) Converting VALUE into a string and returned to BUF's pointer char * ULTOA (unsigned long value, char * string, int RADIX) converts unsigned integer values into a string and returns to String, Radix is the base char * LTOA (Long Value, Char * String, INT RADIX) for the conversion, converts long-intensive value VALUE into a string and returns the string, and Radix is the base char * ITOA (int)) VALUE, CHAR * STRING, INT RADIX, convert the integer value into a string to store String, Radix is converted to the base number Double ATOF (Char * nptr) to convert the string NPTR into a double precision, and return this, error Returns 0INT ATOI (Char * NPTR) Converting the string NPTR to an integer, returns this number, error Returns 0long atol (char * nptr) converts the string NPTR to grow the whole number, return this, error Return 0DOUBLE Strtod (char * str, char ** endptr) converts the string STR into a double-precision number, returns this number, Long Strtol (Char * Str, Char ** Endptr, Int Base) Converts String Str to Changing Integer And return 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 return) user modified mathematics Error return information function (no need to use) unsigned int _clear87 () clear floating point status words and return the original floating point status void _fpreset () Reproduction Floating point Mormature Package Unsigned INT _STATUS87 () Returns floating point status word Function, the function library is dir.h, dos.hint chdir (char * path) makes the specified directory PATH (eg "C: // WPS") into the current working directory, successfully returns 0INT FINDFIRST (Char * Pathname , struct ffblk * 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) Repeates the file with the Findirst file, successfully returns 0void FuMerge 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.), file name Name (TC, WPS, etc.), extension ext (.exe, .com, etc.) form a file store and PATH .int fnsplit (char * path, char * drive, char * dir, char * name, char * ext This function decomposes 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. Whit GetCurdir (int DRIVE, CHAR * DIREC) This function returns the current working directory name Drive specified by the specified drive (0 = Current, 1 = A, 2 = B, 3 = C, etc.) DIREC Saves Specifies the variable of the current working path of the drive to successfully return 0CHAR * GETCWD (Char * BUF, II NT N) This function takes the current working directory and stores it in BUF until the N-byte length is long. Error returns nullint getDisk () Take the currently used drive, return an integer (0 = A, 1 = B, 2) = C, etc.) INT setDisk (int DRIVE) Set the drive drive to use (0 = a, 1 = B, 2 = C, etc.), returns to establish a new directory Pathname using the total number of drives INT MKDIR (CHAR * PATHNAME), Successfully Returns 0INT RMDIR (Char * Pathname) Delete a directory PathName, successfully returns 0CHAR * mktemp (char * template) Constructing a file name not in a current directory and stored in Template in Char * searchPath (Char * Pathname) using MSDOS to find a file FileName where this function uses DOS's path variable, not finding a file to return NULL process functions, the function library is stdlib.h, process.hvoid abort () This function writes a termination information by calling _exit with export code 3 The program is terminated in Stderr and the procedure is terminated.
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 To the subroutine, error returns -1 In the exec function family, the suffix L, V, P, E are added to the exec, the specified function will have some kind of operational ability with suffix P, the function can take advantage of DOS's PATH variable lookup Subprogram 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 for P_Wait indicates that the subroutine is running After returning this program P_NOWAIT, when running this program (not available) at the time of the subroutine runtime, it indicates that the operator is added to the SPAWN function family after this program exits, the suffix L, V, P, E add 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 there is a bracket, the subroutine uses the environment of this program. Init System (Char * Command) passes the msdos command command to the DOS execution of the converter, function The library converts floating-point value value VALUE into a 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 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 number Double ATOF (Char * nptr) to convert the string NPTR into a double precision number, return this number, error returns 0INT ATOI (Char * NPTR) to convert the string NPTR conversion Interesting this number, returning this number, error Returns 0long atol (char * nptr) converts the string NPTR to the length of the whole number, return this number, error returns 0double StRTOD (Char * STR, Char ** Endptr) String STR is converted to a double precision, and returns this number, Long Strtol (CHAR * STR, CHAR ** ENDPTR, INT BASE) converts the string STR to the total number, and return this number, int to ASCII (INT C) Returns the corresponding ASCIINT TOLOWER (INT CH) If the CH is uppercase letters ('A' - 'Z') Returns the corresponding lowercase letters ('A' - 'Z') INT _TOLOWER (INT CH) Returns CHA corresponding lowercase letters ('A' - 'Z') INT TouPper (INT CH) Returns the corresponding uppercase letters ('A' - 'Z') INT _TOUPPER (int CH) Returns the CAC-like diagnostic function ('a' - 'z') diagnostic function, the function library is assert.h, Math.hvoid Assert (int test) is an extension into an IF statement, if Test Test Failure, showing an information and abnormally terminating the program, non-return VOID PERROR (CHAR * STRING) This function will display the most recent error message, the format is as follows:
String string: Error message Char * strerror (char * str) This function returns the last error message, the format is as follows: String str: error message int match (Struct Exception * e) User Modify Mathematical Error Return Information Functions (no need 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.hint KBHIT () This function returns the recently knocked button int FGetChar () reads a character from the console (keyboard), displayed on the screen INT getch () from Console (keyboard) read a character, not displayed on the screen INT PUTCH () Write a character int GETCHAR () from the console (keyboard) to read a character, display on the screen INT PUTCHAR () Console (keyboard) Write a character INT getche () reads a character from the console (keyboard),
Displayed on the screen INT UNGETCH (INT C) Returns the character C back to the console (keyboard) 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, using the BIOS to output int vscanf (char * format, valist param) from the console into a string, assigning each parameter, respectively, Use the BIOS to output, the parameters take int CSCANF from the Valist Param (Char * Format [, Argument ...]) to read a string from the console, assign each parameter, directly on the control table, such as the display is displayed When character is displayed, Int Sscanf (Char * String, Char * Format [, Argument, ...]) is used by string String, which assigns Int Vsscanf (Char * String, Char * Format, VLIST, VLIST, VLIST). Param) The string string is assigned to each parameter, and the parameter acquires INT PUTS (Char * String) in VLIST PARAM, a string string to the console (display), using the BIOS to output VOID CPUTS (Char * String ) Send a string string to the console (display), directly on the control table, such as the display of the display INT Printf (Char * Format [, Argument, ...]) Send formatted string output to control Taiwan (display) uses BIOS to output int Vprintf (Char * Format, Valist Param) Send formatted string output to the console (display) Output using the BIOS, the parameter acquires int CPrintf from Valist Param (Char * Format [, Argument , ...]) Send a format string to output to the console (display), directly on the control table, such as the display of the display INT VCPRINTF (Char * Format, Valist Param) to send formatted strings Console (display), directly on the control table, such as the display is displayed directly, the parameters take int Sprintf from the Valist Param (charr * String, char * format [, argument, ...]) Reconnect the contents of the string String to formatted strings INT vSprintf (Char * String, Char * Format, Valist Param) Rewote the contents of strings String To format the string, the parameter is changed from the 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 │ ├─ ┼──────────────────────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ │ Settings Equipment Information │ │ 2 │ Read Argcx byte into the address referred to by argdx │ │ 3 │ in argdx referred to in Argdx Write an ARGCX byte │ │ 4 │ In addition to handle it as a device number (0 = current, 1 = a, etc.), both, both, and cmd = 2 │ │ 5 │ In addition to the handle as a device number (0 = current, 1 = A, etc.), all the same as cmd = 3 │ │ │ │ │ │ │ 6 │ Take Input Status │ │ 7 │ Take Output Status │ │ 8 │ Test Conformability; For DOS 3.x │ │ 11 │ Set Sharing Conflict Reduction;
Only DOS 3.x │ └ - ─ ─────────────────────────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ()) ()) ()) () executes software signals (unnecessary) INT GSIGNAL (INT SIG) executes software signals (unnecessary) int _open (char * pathname, int access) to open a file for reading or writing, press After the Access is confined to read the file or write the file, the Access value is seen in the table. - ────────────────────── ─ ─ ─ ─ ─ │ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Significance │ ├──────────────────── ─ │O_RDONLY │ Read File │ │O_WRONLY │written file │ │O_RDWR │ 即 读 也 写│ │O_noinherit │ If the file is not passed to the subroutine, it is included │ │O_Denyall │ only allows the currently handle necessary to access file │ │O_Denywrite │ only allowed to open files from any other open │ │O_DenyRead │ only allows from any other Opened file write │ │O_Denynone │ Allow other shared open files │ └ - ────────────────────────────────────── , int access [, int permiss]) To read or write a file, press Access to determine whether it is reading the file or writes the file, and the Access value is seen in the table --- - ┬─────── ───────── ─ ┐ │ACCESS value │ Significance │ ├───────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │O_WRONLY│Written Document │ │O_RDWR │ │ │ │O_NDELA │ Nothing; INSTRC C│ │O_APpend│ 即 读 也, but each time write is always added to the file tail Add │ │O_CREAT │ │ Existence, this flag is useless; if there is no existence, the new file │ │O_TRUNC │ If the file exists, the length is intercepted 0, the attribute constant │ │O_EXCL │ │ │O_binary │ │O_Binary│ This flag can be displayed This flag can be used to display text mode to open files in a binary method to open files in text. └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ┘ Permiss as file properties, can be the following values: s_iwrite allows writing S_ IREAD allows read S_IREAD | S_IWRITE to allow reading, 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 Handle to store into buf, 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 NewHandleint EOF (int * handle) Check if the file ends, end returns 1, otherwise returns 0long fileLength Returns the file length, Handle For the file number int setmode (int Handle, Unsigned Mode) This function is used to set the file number INT getftime (int Handle, Struct Ftime * ftime) to read the file number of the file number of the file number, and Spend in the FTIME structure, the FTIME structure is successfully returned: ┌ - ───────────── │ │ 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 * / │ │} │ └─────────────────┘int setftime (int handle, struct ftime * ftime) Rewind file number of the file number is the file time of the handle, the new time is in the structure ftime. Successful returns 0. Structure ftime 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;
/ * 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, and T is not necessarily used: ┌ --─────────────── ─ │ # in ind
│ │MAIN () │ │ {│ │ File * fp; │ │ │ = fopen ("C: //WPS//WPS.exe", "R B"); │ └────── ───────── ─ ─ ─ ┘file * fdopen (int Ahndle, Char * Type) File * Freopen (Char * FileName, Char * Type, File * Stream) INT GETC (File * Stream) Read from Stream Street A character, and return this character int PUTC (INT Ch, File * Stream) Writing a character chint getw (file * stream) from the stream stream into an integer, error Returns EOFINT PUTW (int W, File * Stream Write an integer c, file * stream to return the character c back to the stream stream, and the next read character will be a character at the Cint Fgetc (File * Stream) from the stream stream, and Returns this character INT FPUTC (INTCH, File * Stream) In the streaming stream stream CHAR * FGETS (CHAR * STRING, INT N, FILE * STREAM) STRING STREAM STRING INT FPUTS (Char * String, File * Stream) Write strings String Write the stream Stream INTFREAD (Void * Ptr, Int size, int Nitems, File * Stream) Reads NITEMs in the stream stream from the stream SIZE Int fwrite (void * ptr, int size, int nitems, file * stream) in PTR is written into a string of NITEMS for size, string in PTR in PTR, int Fscanf (File * Stream, Char * Format) [, argument, ...]) read a string int vfscanf (File * Stream, Char * Format, Valist Param) in formatted form to format a string from the stream stream, parameter from Int fprintf in Valist Param (file * Stream, char * format [, argument, ...]) Write a string to the specified stream STREAMINT VFPRINTF (File * Stream, Char * Format, Valist PARAM) in formatted form to specify a string to the specified form. The stream stream, the parameter acquires the Int fseek (File * Stream, long offset, int.comwhere) function from Valist Param, moves the file pointer to the backsty-byte of the location of the FROMWHERE, and the fromwhere can be the following value: seek_set file Switch Seek_Cur Current location SEEK_END File Tail Long Ftell (File * Stream) Function Returns the current file pointer position positioning in Stream, indicating INT REWIND (File * Stream) to the beginning Int Feof (File " * stream) Detecting the file pointer on the streaming Stream to process the file processing on the stream int fileno (File * Stream), and return file processing INT FERROR (File * Stream) Detection Stream Stream Does Writing Error,
If there is an error, return 1void Clearerr (File * Stream) Clear stream Stream read-write error Void SetBuf (File * Stream, Char * BUF) Give Stream Specify a buffer bufvoid setvbuf (file * stream, char * buf, int Type, unsigned size) Give Stream Specifies a buffer BUF, size is size, type Type, Type's value see you - ┬──────────────────────── ────────── ─ ┐ │TYPE │ │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ────── ─ ┤ │_IOFBF│Fable is a complete buffer, when the buffer is empty, the next input operation will attempt to fill the entire loose │ │ │ 区. When output, write any data to Before the file, the buffer will be completely filled. │ │_iolbf│ file is a row buffer. When the buffer is empty, the next input operation will still try to fill the entire loose │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ Write the file, the buffer is cleaned. │ │_ │BF│ file is unbuffered .buf and size parameters are ignored. Each input operation will directly pass the text │ │ │-read, each output operation will immediately write the data file. │ └───┴───────────────────────────────┘int fclose ( File * stream off a stream that can be a file or device (for example, LPT1) int Fcloseall () Close all stream INT FFLUSH (File * Stream) except STDIN or STDOUT to turn off a stream, and processed the buffer processing. Read the stream, read the contents of the stream into the buffer; write the flow of the buffer to write the contents within the buffer. Successfully returned 0INT FFLUSHALL () to close all streams, and the respective buffer is processed by the target, the flow of the stream, read the contents within the buffer; the write stream, write the contents within the buffer.
Successfully returned 0INT Access (CHAR * Filename, Int Amode) This function checks file filename and returns the properties of the file, the function exists in Amode, and the combination of Amode is written by the combination of the following bit. You can read 02 can be written 01 Perform (ignored) 00 files There is if FileName is a directory, the function will only determine if the directory exists to perform successful returns 0, otherwise returns -1int chmod (int permiss) This function is used to set the file filename properties Permiss can allow S_IREAD to allow reading S_IREAD to allow reading S_IREAD | S_IWRITE to allow read, write int _chmod (char * filename, int func [, int attrib]); this function is used to read or set the properties of file filename, when func When = 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 To: dos.h, bios.hunsigned sleep (unsigned seconds) Pounte SECONDS microseconds (one percent) Int unlink (char * filename) Delete file filenameunsigned fp_off (Void Far * Farptr) This function is used to take far pointer Farptr Offset 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, and construct a FAR pointer unsigned getPSP according to segment seg and offset OFF. ) The segment address of the process sequence segment, and return this address char * PARSFNM (CHAR * CMDLINE, STRUCT FCB * FCBPTR, INT OPTION) function to analyze a string, usually, for a file name, it is referred to by cmdline A command line. The file name is placed in an FCB as a drive, file name, and extension. Fcb is specified by the FCBPTR. Option parameter is the value of the DOS analysis system call, Al text value .int Absread (int Drive, int Nsects, int SECTNO, VOID * BUFFER This function function is to read a specific disk sector. Drive is the drive number (0 = a, 1 = b, etc.), and NSECTS is the number of sectors to read, and SECTNO starts logical sector number, buffer is saved. 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 number (0 = a, 1 = B, etc.), Nsects is The number of sectors to be written, SECTNO starts logical sector number, Buffer is the free space of the disk for saving the space to save the data written, which is used to take the free space of the disk, Drive is a disk number ( 0 = Current, 1 = A, etc.). The function puts the DFREE structure of the disk characteristic by 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 Number * / │ │ unsigned DF_SClus ;
/ * Each cluster sector number * / │ │} │ └────────────────────────────_ ┘char far * getdta () Take the disk conversion address DTAVOID SETDTA (Char Far * DTA) Set Disk Conversion Address DTAVOID 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 FATBLKP, structure As follows: ┌ --─────────── │ │ {│ │ Char Fi_SClus; / * Each cluster sector * / │ │ CHAR FI_FAC; / * File allocation table bytes * / │ │ │ │ │ in │ │ 字 * / │ │} │ └─────────── ───────── ─ ┘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; / * Each cluster sector number * / │ │ char fi_fatid; / * File allocation table byte * / │ │ INT FI_NCLUS; / * Number of clusters * / │ │ INT FI_BYSEC; / * The number of words per sector * / │ │} │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ─ ─ INT DOSFUN, UNSIGNED DOSDX, Unsigned Dosal This function is called to the MSDOS system, and 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 The MSDOS system is called, 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 inru. "INT INTR_NUM, Union Regs * INREGS, Union Regs * Outregs" executes the INTR_NUM number interrupt, user-defined register value Save the structure inRegs, save the returned register value in Outregs after execution .int .int INT86X (INTR_NUM, Union Regs * INREGS, Union Regs * OUTREGS, STRUCT SRUCT SREGS * SEGREGS) Execute the INTR_NUM number, and the user-defined register value is stored in the structure inregs and the structure Segregs, and the returned register value is stored after execution. Structure 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, and executes the return function to return registers. The value is stored in the structure Outregs INT INTDOSX (Union Regs * INREGS, UNION REGS * OUTREGS, STRUCT SREGS * SegRegs) This function performs DOS interrupt 0x21 to call a specified DOS function, and user-defined register values exist in INREGS and Segregs. , Execution of the function will return the returned register value in the structure Outregs in the output of Void INTR (INT INTR_NUM, STRUCT REGPACK * PREG) This function is an alternate 8086 software interrupt interface which can generate a 8086 software interrupt specified by the parameter INTR_NUM. Function Before executing the software interrupt, copy the user-defined register value to each register from the structural preg. After the software is broken, the function is copied to the value of the current registers to the structure preg. The parameter is as follows: INTR_NUM is executed, the interrupt number preg is saved. The structure of the user-defined register value, the structure is, and the structure is. - ────────── │ │TRUCT Regpack │ {│ │ Unsigned R_ax, R_BX, R_CX, R_DX ;
│ │ UNSIGNED R_BP, R_SI, R_DI, R_DS, R_ES, R_FLAGS; │ │} │ └────────────────────────────────────────── The register value is stored in the structural pregon (int status, int size) Returns MSDOS in Status status, but the program remains in memory, the occupied space is determined by Size.void CtrlBrk (int (* fptr) ()) setting The interrupt handler after the interrupt is interrupted. Interrupt handler for INTR_NUM, for example: OLD_INT_10H = getVect (0x10); Void setVect (int INTR_NUM, VOID INTERRUPT (* ISR) ()) Settings the interrupt handler for interrupt INTR_NUM is ISR, for example: setVect (0x10 , New_INT_10H); Void Harden ()) Defines a hardware error handler, whenever an error occurs, the program referred to in calling FPTR Void HardResume (Int Rescode) hardware error handler 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) reads a byte from the specified input port and returns this byte void outport. Port, int Word Write the specified Output Port Portvoid Outportb (INT Port, Char Byte) to write byte Byte to the specified output port portint peek (int segment) function returns a segment: Offset Word Char peekb (int segment, unsigned offset) function Returns a byte void poid (int segment, int offset, char value) Write the word value to the segment: offset VoID pokeb (int segment, int offset, int value) Write byte value to segment: Offset The int RADBRD (Struct FCB * fcbptr, int RECNT) function is used to open FCBPTR Read Reccnt Record. Whit randbwr (struct) 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 structure. The current state of int GETVERIFY () in segtbl (0 = test is closed, 1 = verification open) Void setVerify (int value) Set the current inspection status, value is 0 indicates the shutdown test, 1 means opening test INT 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 disconnected. When Value = 1, it is detected INT DOSEXTERR (STRUCT DOSERR * EBLKP) takes an extended error. After the DOS error occurs, this function fills the extended error message in the Doserr structure referred to EBLKP. This structure is defined as follows: ┌──────── ─ ─ ┐ │STRUCT DOSERR │ │ {│ │ Int EXTERROR; / * Extended error * / │ │ │ │ │ │ / * Error type * / │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ l
/ * Error where * / │ │} │ └────────────────────────────────── This function is responsible for the communication of data, CMD can be The following values: 0 Communication parameters are byte BYTE Value 1 Send Characters By communication line output 2 Returns the communication port to the communication port, port = 0 When the communication port is COM1, Port = 1 When communication The port is COM2, which pushes BYTE as a parameter when transmitting or receiving data, is a combination of the following bit: ┌ - ─ ───────────────────────────────────────── ─ ┐ │BYTE Value │ meaning │BYTE Value │ meaning │BYTE Value │ │ │ ├─┼────────────────────────────────────── ─ ┤ │0x02 │7 data 位 │0x03 │8 data │0x00 │1 Stop 位 │ │ │ 0 │ 无 奇 位 │0X00 │ 无 奇 │0X08 │ odd parity │ │ │0x18 │ Even parity │0x00 │110 Potter │ │ │ │ 14 │ │ │ 0│ 06 │ │600 Port │0X80 │1200 Port │ │ │0xa0 │2400 Port │0XC0 │4800 Port │0XE0 │9600 baud │ │ └ - ─ ───────────────────────────── ┘, for example: 0xE0 | 0x08 | 0x00 | 0x03 means a communication port is 9600 waves 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 9th Overload Run Error 8th Data Ready 5th Receive Line Signal Detection Line 6 Ring Indicator Fifth Bit Data Setting Ready The 4th Clear Send Item 3 δ Receive Line Signal Detector 2nd Side Ring Defell Detector No. 1 Δ Data Setting Ready 0 - bit δ Clear Send Int BiosDisk (int CMD, Int Drive, Int Head, int track, int sector, int nsects, void * buffer) This function is used to operate a certain operation for the drive, and 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 Union. This is forced the drive controller to perform hard reset. Ignore all other parameters. 1 Return the last hard disk operation status. Ignore all other parameters 2 read one or more disk sectors to memory. Read the sector by Head, Track Sector gives it. 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 NewTimeStruct 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 national For the Countrycode value (must be non-0). Otherwise, the Country-related information poised by Countryp: (1) Current country (if countrycode is 0 or 2) by CountryCode, the country. Structure Country defined as follows: ┌ - ────────────────── │ {│ │ │ INT CO_DATE; / * Date format * / │ │ Char Co_curr [5] ; / * Currency Symbol * / │ │ CHAR CO_THSEP [2]; / * Digital Division Vegetator * / │ │ CHAR CO_DESEP [2]; / * Different points * / │ │ CHAR CO_DTSEP [2]; / * Date Separator * / │ │ CHAR CO_TMSEP [2]; / * Time Division * / │ │ 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 function function in the middle, the function library is string.h, mem.hmem ... 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 operate in stores. In all of these functions, The array is N-byte long. Memcpy copies an N-byte block to Destin from Source. If the source block and the target block are overlapped, select the copy direction to correctly copy the overlay byte. MEMMOVE is the same .MemSet Place all the words S in the byte CH. The length of the number is given by n. The MEMCMP is exactly the two strings S1 and S2 of the N-byte length. Some functions are compared by the unsigned characters, so Memcmp ("0xFF", "/ x7f", 1) The return value is greater than 0.MEMICMP compares the front n bytes of S1 and S2, regardless of the character uppercase or lowercase .Memccpy Copy byte from Source Copy bytes to Destin. Copying The following: (1) Character CH preferred copy to Destin. (2) N-bytes have been copied to Destin.Memchr Pre-N bytes of the S array in the character CH. Return Value: Memmove and Memcpy Return Destin MEMSET returns the value of S. Memcmp and Memicmp─ ┬─ If S1S2 return value is greater than 0 Memccpy If CH is copied, then return directly to CH in Destin. One pointer to the byte; otherwise returning NULL MEMCHR Returns a pointer to CH in S;
If you do not appear in the S array, return Null.void MoveData (int SGSRC, int offsrc, int segDest, int offdest, unsigned numBytes) This function is copied to the NumBytes bytes at SEGSRC: OFFSRC to the target. Address (SegDest:
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 to byte Value. Str ...
String Operation Function CHAR STPCPY (Char * DEST, Const Char * SRC) Copy the string src to Destchar 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 first time INT STRCMP (const char * s1, const char * s2) comparing the string S1 and S2 in the first occurrence of the string S, and returns S1-S2CHAR STRCPY (char * DEST, CONST CHAR * SRC) Copy the string SRC to Destsize_t strcspn (const char * s1, const char * s2) scan S1, returns in S1, and there are also characters in S2 CHAR STRDUP (Const Char * S) ) Copy the string S to the most recent set of unit INT STRICMP (const char * s1, const char * s2) comparison strings S1 and S2, and return the length of the S1-S2Size_T Strlen (Const Char * S) Returns the length of the string S Strlwr (char * s) transforms all uppercase letters in the string S into lowercase letters, and returns the converted string char strncat (char * dest, const char * src, size_t maxlen) will string SRC's most maxlen Character Copy to String DEST INT STRNCMP (Const Char * S1, Const Char * S2, SIZE_T MAXLEN) Compare Strings S1 and S2 Prior Maxlen Character CHAR STRNCPY (Char * Dest, Const Char * src, SIZE_T MAXLEN) Copy the former Maxlen characters in the SRC to the int StrnicMP (Const Char * S1, Const Char * S2, SIZE_T MAXLEN) comparison strings S1 and S2 former Maxlen characters 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 in S1 and S2 HAR STRCHR (Const Char * S, INT C) Scan a string SCHAR STRREV (CHAR * S) in a given character C to rearrange the characters in the string S, and return the arranged string Char StRSET (CHAR * S, INT CH) places all characters in a string S to scan string S1 in a given character chsize_t strspn (const char * s1, const char * s2), and returns to S1 and S2 The number of characters in the middle, the number of Char strstrstr (const char * s1, const char * s2) scan string S2, and returns the position of the S1 in the first time CHAR STRTOK (CHAR * S1, Const Char * S2) retrieval string S1 The string S1 is separated by the delimiter of the character string S2 to convert the lowercase letters in the string S in the string S2 into uppercase letters, and returns the converted string storage distribution subsets. The program, the function library is dos.h, alloc.h, malloc.h, stdlib.h, process.hint allocmem (unsigned size, unsigned * seg) using DOS assignment free memory, Size is allocated memory size, seg is assigned The latter memory pointer INT FreeMem (unsigned seg) Releases the memory allocated by allocmem, SEG is used for the specified memory pointer INT setBlock (int seg, int newsize) This function is used to modify the assigned memory length, and SEG is allocated memory. Memory pointer, newsize is the number of spaces for new length INT BRK (VOID * Endds) this function to change the number of space assigned to the calling program.
The new space end address is Enddschar * 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 of space Unsigned long core () This function returns the unused storage area Length, assigning NELEM lengths of the ELSIZE in bytes to ELSIZE, and returns the memory space of the Size byte, and returns the memory space of ElSize and returns the pointer Void * malloc (unsigned size) assigned the Size byte. Returns the pointer VOID FREE (Void * Ptr) allocated in the allocated memory, the memory that is all allocated, the pointer to the memory to be released is Ptrvoid * Realloc (VOID * PTR, UNSIGNED NEWSIZE) to change the size of the assigned memory, PTR is allocated The pointer of the memory area, NewSIze is the new length, returns the allocated memory pointer .long farcoreleft () This function returns the length of the unused storage area in the far, in bytes Void FarCalloc (unsigned long units, Unsigned long unitsz) From the far-reactors allocated Units a length 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, the pointer to the long stack of memory to be released to the blockvoid far * farRealloc (Void Far * Block, unsigned long news) change the size of the allocated memory, Block is The pointer to the memory area has been allocated, 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 mainly used structure has the following: Total time date Storage structure TM ┌─────────────────── ┐│STRUCT TM ││ {││ int tm_sec; / * 秒 0-59 * / ││ INTTM_MIN; / * Division, 0-59 * / ││ INTTM_HOUR; / *, 0-23 * / ││ INTTM_MDAY; / * Number, 1-31 * / │ ■ IntTM_MON; / * Month Number, 0-11 * / ││ i NT TM_YEAR; / * Since 1900 * / ││ IntTm_wday; / * Since the day of the Sunday 0-6 * / ││ int TM_YDAY; / * Since January 1st, 0-365 * / ││ int tm_isdst; / * if daylight savings time, using a positive number * / ││} │└──────────────────────┘ date storage structure date┌ ───────────── ─ ┐│Struct Date ││ {││ Int Da_year; / * from 1900 * / ││CHAR Da_DAY; / * Number * / ││CHAR Da_MON; / * Month 1 = jan * / ││} │ └ - ────────────────────────────────────────── ─ ┐│STRUCT TIME ││ {││ UNSIGNED CHAR TI_MIN; / * Minute * / ││ UNSIGNED Char Ti_Hour; / * Hours * / ││ unsigned char Ti_hund; │ │ unsigned char Ti_sec; / * * / ││ │ │ │ │ │ │ │ │ │ │ │ └─────────────── ─ ┘char * ctime (long * clock) This function converts the time referred to in the clock (such as the time returned by the function time) into the following format : Mon Nov 21 11:31:54 1983 / N / 0CHAR * ASCTIME (STRUCT TM * TM) This function converts the specified TM structure class into a string of the following format: MON NOV 21 11:31:54 1983 / N / 0double DiffTime (Time_t Time2,