C library function manual (all, including all below)

xiaoxiao2021-03-06  64

C library function manual

The classification function, the function library is ctype.hint isalpha (int CH) if CH is the letter ('A' - 'Z', 'A' - 'Z') returns to a non-0 value, otherwise returns 0INT IsalNum (INT CH) CH is the letter ('A' - 'Z', 'A' - 'Z') or numbers ('0' - '9') returns to a non-0 value, otherwise returns 0INT ISASCII (int CH) if ch is a character (ASCII) 0-127 in the code returns a non-0 value, otherwise returns 0INT ISCNTRL (INT CH) If the CH is a waste character (0x7f) or normal control character (0x00-0x1f) returns 0 value, return 0int isdigit (int CH) If CH is a number ('0' - '9') returns a non-0 value, if the 0INT ISGRAPH (INT CH) is returned if the CH is a printable character (excluding space) (0x21-0x7e) returns a non-0 value, otherwise returns 0INT Islower (int CH) Returns a non-0 value ('a' - 'z'), otherwise returns 0INT Isprint (int CH) if the CH is a printable character (including the air) (0x20-0x7e) Return non-0 Value, otherwise returning 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 '), The carriage return (' / R '), paper offline (' / f '), vertical tab (' / v '), the wrap (' / n ') returns a non-0 value, otherwise returns 0int IsUpper (int CH) If the CH is uppercase letters ('A' - 'Z') returns a non-0 value, otherwise returns 0INT Isxdigit (int CH) if CH is a 16-based number ('0' - '9', 'A '-'F', 'a' - 'f') Returns a non-0 value, otherwise returns 0Int Tolower (INT CH) If CH is uppercase letters ('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) Returns an absolute value Double Cabs (Struct Complex Znum) returns the absolute value of the recovered Znum Double Fabs (Double X) Returns the absolute value of the double precision parameter X Returns the absolute value Double Exp (Double X) of the long integer parameter n Returns Double Frexp (Double Value, INT * EPTR) Returns Value = x * 2n in the value of X, N storage Double Ldexp (Double Value, INT Exp); Returns Value * 2EXP Double Log (Double X) Returns Double Log10 (Double X) Returns log10x Double Pow (Double X, Double Y) Returns the value of XY Double Pow10 (INT P) Returns 10p Double SQRT (Double X) Returns √x Double ACOS (Double X) Returns the anti-Sucoid COS- 1 (x) value, X is the arc Double Asin Returns the X-1 (X) value of the X, X is the arc Double ATAN (Double X) Returns an anti-fixed TAN-1 (X) value of X, X is an arc Double ATAN2 (Double Y, Double X) Returns Y / X of the UF Tan-1 (X) value, Y X is the curve COS (X) value of the x-race Double Cos (Double X), X is Arc Double Sin (Double X) Returns the sinusoidal SIN (X) value of X , X is the precipitating TAN (X) value returns the X of the radians, and X is the two-curmed Cosh (X) value returns the X of the radian Double Cosh (Double X), X is the curvature Double Sinh (Double X) Returns the double sinusoid SINH (X) value of the X, X is the two-dicing Tanh (X) value returns the X of the radians Double Tanh (Double X), and X is the arc Double Hypot (Double X, Double Y) Returns the right angle triangle The length (z), X and Y are the length of the straight corner, 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 Classic CHAR * LTOA (Long Value, Char * String, Int Ra) DIX) Convert long-interaction VALUE into a string and returns the string, Radix is ​​converted to the base char * itoa (int value, char * string, int RADIX) to store the integer value into a string String, Radix Converting the string NPTR to double precision when converting, returns to this number, error returns 0INT ATOI (Char * NPTR) Converting the string NPTR into an integer, and returns this number Error returns 0long atol (char * nptr) converts the string NPTR to the total number, and returns this number, the error returns 0double StRTOD (Char * STR, CHAR ** ENDPTR) converts the string STR to double precision, and Returns this number, Long Strtol (CHAR * STR, CHAR ** Endptr, INT Base) converts the string STR to the total number, return this number, int match (STRUCT Exception * e) user modified mathematical error returns 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 return the original floating point status void _fpreset () Reproduces the floating point math package unsigned int _STATUS87 () Returns the floating point status word directory function, the function library is dir.h, dos.hint chdir (char * path) to make the specified directory PATH (eg "C: // WPS") into the current working directory, success Returns 0INT 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 for the specified saved file A structure of information, defined as follows: ┏┏━━━━━━━━━━━━━━━━━┓┓┓┓━━━━━━┓ ┓ ┓Struct Ffblk ┓ {{ff_reserved [21]; / * DOS reserved word * / Char ff_attrib; / * file attribute * / INT ff_ftime; / * file time * / int FF_FDATE; / * File date * / LONG FF_FSIZE; / * File length * / ce ff_name [13] ; / * File name * /} ┗┗━━━━━┛┛━━━━━━━━━┛ attrib for file properties, by the following characters, ┏┏━━━━━━━━━━ ┳┳━━━━━┓┓ ┓ ┓_rdonly read-only file FFA_Label volume marking number a_hidden hidden file Ffa_direc directory a_system system file a__━ ┗ ┗┗━━━━━━━━┻┻━━ ━━━━ ┛┛: Struct Ffblk FF; Findfirst ("*. WPS", & FF, FA_RDONLY);

INT FINDNEXT (STRUCT FFBLK * FFBLK) Repeates Findirst's files, successfully returns 0void FuMege (Char * Dir, Char * Name, Char * ext) This function passes 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 name and PATH.Int Fnsplit ( CHAR * PATH, CHAR * DRIVE, CHAR * DIR, CHAR * Name, CHAR * EXT) This function breaks down the file name Path Decomposed into a disk DRIVE (C:, A:, etc.), path DIR (/ TC, / BC / LIB Wait), 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 to the specified drive The current work directory name drive (0 = Current, 1 = A, 2 = B, 3 = C, etc.) DIREC Saves the specified variable of the specified drive to successfully return 0CHAR * GETCWD (CHAR * BUF, IINT N) This function Take the current working directory and store it into the BUF until n word is thrown. Error Return nullint getDisk () Take the drive that is currently using, 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, and successfully returns 0Int RMDIR CHAR * PATHNAME Deletes a directory PathName, successfully returns 0CHAR * mktemp (char * template) Constructing a file name not in a current directory and saving a path in Template in Char * SearchPath (Char * Pathname) to use MSDOS to find the file file file file file file, 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 in stderr by calling _exit with exit code 3, and is abnormally terminating 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 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 ... Run 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 * Argn, ​​NULL, 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 function In the Mode mode, run the subroutine Pathname, and pass the parameter arg0 (arg1, arg2, argv [], envp []) to the subroutine. Error returns -1 Mode to run mode Mode to P_Wait indicate after the subroutine is running Returning this program p_nowait Indicates that the program is running this program (not available) at the time of the subroutine runtime indicates that the operator is added to the spawn function family after this program is exited, and the suffix L, V, P, E are added to the SPAWN, specified When a function will have a suffix P, the function passes the function of DOS using the DOS's PATH. When the number of parameters is fixed. V, the number of parameters passed is not fixed. E, the specified parameter ENVP can be passed to the subroutine, allowing to change the subroutine running environment. When there is no embedding E, the subroutine uses the program of this program .INT System (Char * Command) passes the msdos command command to DOS execution

Converter, the library is Math.h, stdlib.h, ctype.h, float.hchar * ECVT (Double Value, Int NDIGIT, INT * DECPT, INT * SIGN) converts floating point value value VALUE into a string and returns to 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) will number VALUE Convert into string and stored in BUF, 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 the string, and RADIX is converted. The base char * LTOA (Long Value, Char * String, INT RADIX) converts long integer values ​​into a string and returns the string, and Radix is ​​the base char * itoa (int value, char * string, int value). Radix converts 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 to 0ItOi (Char * NPTR) Convert the string NPTR to an integer, return this number, error returns 0long atol (Char * nptr) converts the string nptr to the total number, return this number, error Return 0Double Strtod (Char * Str, Char * * Endptr Converts the string STR to the double precision, returns this number, Long Strtol (CHAR * STR, CHAR ** ENDPTR, INT BASE) converts the string STR to the length, and return this, int toascii (INT C) Returns C The corresponding ASCIIInt Tolower (INT CH) If CH is uppercase letters ('a' - 'Z ') Returns the corresponding lowercase letters (' 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 CHOPPER (' A '-' Z ') diagnostic function, the function library is Assert .h, math.hvoid assert (int test) Macro like an IF statement, 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 last time The 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 Mathematics Error return information function (no need to use) Double _matherr (_Mexcep why, char * fun, double * arg1p, double * arg2p, double return) user modified mathematical error returns information function (no need to use)

Input output subroutine, the library is IO.H, Conio.h, Stat.h, dos.h, stdio.h, Signal.hint KBHIT () This function returns the most recently knocked button int FGetChar () from the console ( Keyboard) Read a character and display it on the screen to read a character from the console (keyboard), not displayed on the screen INT PUTCH () Write a character int GETCHAR () from the console ( Keyboard) Read a character, displaying a character INT getChe () from the console (keyboard) on the screen (keyboard) to read a character from the console (keyboard), displayed on the screen INT UNGETCH (INT C) Put the character C Return to the console (keyboard) CGETS (Char * String) Read from the Console (Keyboard) to the string in string int Scanf (char * format [, argument ...]) is read from the console into a string, Assign each parameter, use the BIOS to output int vscanf (char * format, value param) from the console, assign each parameter, using the BIOS to output, parameters to get int CSCANF from Valist Param (Char * Format [, Argument ...] reads a string from the console, assigns each parameter, directly on the control table operation, such as the display, when the display is displayed, the direct write-frequency mode is displayed in the direct write-frequency mode, and displays int SSCANF. Char * string, char * format [, argument, ...]) By string String, assigning Int Vsscanf (char * string, char * format, vlist param), respectively, assigns each parameter for each parameter String, respectively. The parameter acquires int PUTS (Char * String) in VLIST PARAM to send a string string to the console (display), using the BIOS to output VOID CPUTS (Char * String) Send a string string to the console (display), Direct to control Taiwan operation, such as the display is Direct written mode display INT Printf (charr * Format [, argument, ...] Send formatted string Output to console (display) Output INT VPRINTF (Char * Format, Valist Param) Send formatted string Output to console (display) to use BIOS Output, parameter acquires int CPRINTF (Char * Format [, ARGUMENT, ...]) in Valist Param Send format string to output to the console (display), directly on the control table, such as the display is directly written INT VCPRINTF (CHAR * FORMAT, VALIST PARAM) Sends a format string to output to the console (display), directly on the control table, such as the display is shown in direct write-frequency mode, parameter acquired from 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 table below:

┌ - ┬──────────────────── ─ │CMD value │ function │ ├──────── ──────────────── ┤ │ 0 │ Remove Equipment Information │ │ 1 │ Settings Equipment Information │ │ 2 │ Put the argcx byte by Argdx Address │ │ 3 │ The address referred to argdx Write argcx bytes │ │ 4 │ In addition to the handle as a device number (0 = current, 1 = a, etc.), both CMD = 2 │ │ │ 5 │ In addition to handle as a device number (0 = current, 1 = A, etc.), alliances with cmd = 3 │ │ 6 │ Take Input Status │ │ 7 │ Take Output Status │ │ 8 │ Test Rechangeability; only for DOS 3.x │ │ 11 │ set conflict of sharing conflicts; only DOS 3.x │ └ - ─ ──────────── ──────────── ┘int (* Ssignal (int SiG, int (* action) ()) () executes software signals (unnecessary) int Gsignal (int SIG) executes software signals (no Useful

INT _OPEN (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 │ │ ├──────────────────────────── │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 handleable file │ │O_Denywrite │ Allows from any other open file read │ │O_DENYREAD │ Allows from any other open file │ │O_DENYNONE │ allows other shared files │ └─────────────────────── ───────────── ─ ┘int open (char * pathname, int access [, int permiss]) For read or write open a file, press Access to confirm is a read file or write files, Access See the table below - ─ ────────────── ─ ─ │ACCESS │ Significance │ ├───────── ───────── ─ ┤ │O_RDONLY│T reading file │ │O_WRONLY│Wick file │ │O_RDWR │ │ │O_NDELAY│No; Neix System Compatibility │ │O_APpend│ 即 读 也 写, but each time you write always 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 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 for the 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 to open the file number INT getftime (int Handle, Struct FTIME * ftime) Read the file number of the file number. In the FTIME structure, the file time is saved, and 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; / * year -1980 * / │ │ │ └─ ───────────────── ─ ┘int setftime (int Handle, Struct ftime * ftime) Reword file number is the file time of Handle, the new time is in the structure ftime. Successful returns 0. Structure The ftime 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;

/ * 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 │ │ Text │ Open Old File │ │W │ 写 │ │ │ │ │ │ 文 文 │ │R │ Read / write │ │ │ │ │ │ │ │ │ │ Build new file │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │A │ Read / Add │ No limit │ Open Improvement to Built │ └ - ┴───────────────────────── ┘ 加 的 suffix is ​​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 chint getw (file * stream) from the stream stream into an integer, error Returns EOFINT PUTW (INT W, File * Stream) Writing to stream Stream An integer int ungetc (char C, file * stream) returns the character C back to the stream stream, the next read character will be Cint Fgetc (File * Stream) to read a character from the stream stream,

And return this character int FPUTC (int CH, File * Stream) to read the character ch write into the stream stream CHAR * FGETS (CHAR * STRING, INT N, FILE * STREAM) N characters from the stream Stream into the string Int FPUTS (Char * String, File * Stream) Write strings String Write the stream Stream INT FREAD (Void * Ptr, Int size, int Nitems, file * stream) reads NITEMS lengths from the stream stream from the stream SIZE Store int FWRITE (Void * PTR, int size, int nitems, file * stream) to write NITEMS lengths of Size, string in PTR in PTR, in PTR, Format [, argument, ...]) Reads a string int vfscanf (File * Stream, Char * Format, Valist Param) in formatted form to format a string, parameter from the stream stream in formatting. Get int FPRINTF (File * Stream, Char * Format [, Argument, ...] from Valist Param to format a string to the specified stream Streamint Vfprintf (File * Stream, Char * Format, Valist Param) The format forms writes a string to the specified stream stream. The parameters take the int FSeek (File * Stream, long offset, int.comwhere) function from the Valist Param to move the file pointer to the back Offset byte by the location of FROMWHERE. At the point of the following values: seek_set file switch seek_cur Current location seek_end file tail long ftell (file * stream) function Returns the current file pointer position in Stream, indicating int Rewind (File * Strea M) Map the current file pointer Stream to the file start INT feof (file * stream) detection streaming file pointer on the end position int fileno (file * stream) to process the file processing on the stream, and return to the file processing INT Ferror (File * stream) Check if there is a read and write error on Stream,

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 set to one of the following constants, FA_RDOONLY read-only FA_HIDDEN hide the FA_SYSTEM system.

Interface subroutine, the library is: dos.h, bios.hunsigned sleep (unsigned seconds) Pause Seconds microseconds (one percent) Int unlink (char * filename) delete file filenameunsigned fp_off (Void Far * Farptr) this The function used to take far pointer Farptr's offset unsigned fp_seg (Void Far * Farptr) This function is used to set the value Void FAR * mk_fp (unsigned seg, unsigned off) according to segment SEG and offset OFF according to segment SEG and offset OFF Construct a FAR pointer unsigned getPSP () section address of the sequence sequence prefix, and return this address char * PARSFNM (CHAR * CMDLINE, STRUCT FCB * FCBPTR, INT OPTION) Function Analysis of a string, usually, for a file name It is a command line referred to by cmdline. The file name is put in a 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 DRID * BUFFER) This function function is read to read a specific disk sector, Drive is the driver number (0 = a, 1 = b, etc.), NSECTS is the number of sectors to read. SectNO starts logo area 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 fan area number, buffer is the space of the Save the space Void getDFree (int Drive, Struct Dfree * DFreeP) this The function is used to take the free space of the disk, and 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 byout the number * / │ unsigned df_sclus; / * The number of sectors per cluster * / │ │ │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Char Far * getdta () Take the disk conversion address DTAVOID SETDTA (CHAR FAR * DTA) Set Disk Transformation Address DTAVOID GETFAT (INT Drive, Fatinfo * Fatblkp) This function returns the specified drive Drive (0 = Current, 1 = A, 2 = B The file allocation table information is stored in FATBLKP, the 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;

/ * Each sector byout the number * / │ │} │ └ --───────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─te The MSDOS system is called, and DOSDX is the value of the register DX. Dosal is the value of the register Al, and the dosfun is called the function number INT BDOSPTR (INT DOSFUN, VOID * ARGUMENT, UNSIIGNED DOSAL) This function is called, and argument is the value of the register DX. , DOSAL is the value of the register Al, DOSFUN is executed in the function number int inru, the INTR_NUM number is interrupted, and the user-defined register value is stored in the structure inregs, and will return after execution. The register value is stored in the structure Outregs. Int INT86X (INT INTR_NUM, UNION REGS * INREGS, Union Regs * OUTREGS, STRUCT SREGS * SegRegs) Execute the INTR_NUM number interrupt, and the user-defined register value is stored in the structure inregs and the structure Segregs, execute Follow the returned register values ​​in Outregs. InTdos (Union Regs * INREGS, UNION REGS * OUTREGS) This function performs the DOS interrupt 0x21 to call a specified DOS function, and the user-defined register value exists in INREGS. After the function is executed, the return register 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, user-defined The register value is stored in the structure inRegs and Segregs, and the function is executed to save the returned register value in the structure of Void INTR (int INTR_NUM, STRUCT Regpack * preg). The 8086 software interrupt interface can produce a 8086 software interrupt specified by the parameter INTR_NUM. The function replicates the user-defined register value to each register before executing the software interrupt. After the software is broken, the function will currently have the current registers. The value is copied to the structure preg. The parameter is as follows: INTR_NUM executed interrupt number preg is the structure of saving user-defined register values ​​- ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ ┐ │STRUCT Regpa │ │ {│ │ unsigned R_ax, R_BX, R_CX, R_DX; │ │ Unsigned R_BP, R_SI, R_DI, R_DS, R_ES, R_FLAGS;

│ │} │ └ - ───────────────────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ Size returns to MSDOS in Status, but the program remains in memory, the occupied space is determined by Size .void CtrlBRK (int (* fptr) ()) Set the interrupt handler after the interrupt. VOID Disable () is disabled. An interrupt VOID enable () allows interrupt VOID GENINTERRUPT (INT INTR_NUM) to execute the software displayed by INTR_NUM (* getvect (int INTR_NUM)) () returns an interrupt handler for INTR_NUM, for example: OLD_INT_10H = GetVect (0x10); Void setVect (int INTR_NUM, VOID INTERRUPT (* ISR) ()) Set the interrupt code INTR_NUM is ISR, for example: setVect (0x10, new_int_10h); Void Harderr (int (* fptr) )) Define a hardware error handler, whenever an error occurs, calling the program void hardresume (int tent "hardware error handle processing function void hardretn hardware error handler Int Inport (int prot) from the specified Enter a word in the input port and return this word int inportb (int port) to read a byte from the specified input port, and return this byte void output (int port, int Word) Word Word write the specified output port portvoid outportb (int port, char byte) write the byte to the specified output port portint peek (int segment, unsigned offset) function returns the segment: char offset word at a peekb (int segment, unsigned offset) function returns the segment : A byte Void Poke (int segment, int offset, char value) at the Offset Write the word value to segment: offset Void Pokeb (int segment, int offset, int value) Write byte value to segment: offset INT randbrd (struct fcb * fcbptr, int RECCNT) function is written to the FCB of the FCBWR (Struct) function referring to the FCBWR (Struct) function referred to in the FCBPTR to write the RECCNT record in the FCB referred to in FCBPTR to disk. The Void Segread (STRUCT SREGS * SEGTBL) function puts the current value of the segment register into the structure of the int GETVERIFY () to take the inspection mark (0 = inspection, 1 = verification Open) Void setVerify (int value) settings Inspection status, Value is 0 indicates a closing test, and the current setting of the Open Test INT getcBRK () This function returns the current setting of the control interrupt detection for setting the control interrupt detection to turn it on or disconnects when Value = 0, for disconnection. When value = 1, for the detection

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; / * Extension error * / │ │ │ │ │ │ 错 错 错 类 * / │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ar * Error / │ │} │ └───────────────────────────────── This function is responsible for the communication of data, 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, Port = 1 When the communication port For COM2, the parameters when transmitting or receiving data is to transmit or receive data, and the combination of the following bit: ┌ - ─ ───────────────────────── ┐ │BYTE Value │ meaning │BYTE Value │ meaning │BYTE Value │ Significance │ │ ├─ ──────────────────────────────────── ┤ │0x02 │7 data │0x03 │8 data │0x00 │1 stop │ │ │0X04 │2 stop │0x00 │ 无 奇 │0x08 │ odd parity │ │ │0X18 │ 数 奇性 │0x00 │ 110 baud │0x20 │150 Baud │ │ │0x40 │ 300 baud │0x60 │600 baud │0x80 │1200 baud │ │ │0xa0 │2400 baud │0xc0 │4800 baud │0XE0 │9600 Baud │ │ └ - ┴─────────────────────────────────── ─ ┴──────────────── ┘, for example: 0xE0 | 0x08 | 0x00 | 0x03 means that the communication port is 9600 baud, odd parity, 1 stop bit, 8 data bits. Function The return value is a 16-bit integer, defined as follows: 15th time timeout 14th transfer shift register empty line 13 Interrupt Detection of the 11th frame error 10th parity Error 9th overload operation Error 8th Data Ready Section 7 Receive Line Signal Detection of the 6th Ring Indicator Fifth Bit Data Setting Ready 4th Clear Send The third bit δ receiving line signal detector The second bit falling edge ring detector No. 1 Δ Data Setting Ready 0th Bit δ Clear Send

INT BiosDisk (int CMD, int DRIVE, INT NSECTS, VOID * BUFFER) This function is used to make 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 is forced the drive controller to perform hard reset. Ignore all other parameters. 1 Return the last hard disk Operating status. Ignore all other parameters 2 read one or more disk sectors to memory. The sector read is 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 lookup failed 0x80 response connection failed 0XBB unfained error 0xFF read operation failed

INT biodquip () checks the device, the function returns a byte, which represents a message, as follows: 15th printer number 14th printer number 13th unworthoped game I / O No. 11 The 8th bit of the RS232 port number did not use the seventh-bit soft disk number sixth-bit soft disk number, 00 is No. 1 driver, 01 is 2 drivers, 10 is driven, 11 is the 5th digit of the No. 4 driver. 4th Display mode 00 is not used, 01 is 40x25bw color display card 10 is 80x25bw color display card, 11 is 80x25bw monochrome display card 3rd mother hose second random memory capacity, 00 is 16K, 01 is 32K, 10 is 48K, 11 is 64K First Pointers to Point Shared Processors 0 bits From Soft Disk Guide INT Bioskey (int CMD) This function is used to perform various keyboard operations, determined by 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 recognition 0x80 is not busy

INT Biostime (int cmd, long newtime) control, cmd is functional number, can return the current value of the timer for the following value 0 Function 1 Set the timer to a new value NewTIMESTRUCT Country * Country (int COUNTRYCMODE, STRUCTRY * Countryp This function is used to control information about a country, such as date, time, currency, etc. If countryp = -1, the current country is set to countrycode value (must be non-0). Otherwise, the country pointed to by Countryp The structure is filled with the following national related information: (1) Current country (if countrycode is 0 or 2) by Countrycode, the country is given. Structure country defines the following: ┌ --──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ───────┐ │struct country │ │ {│ │ int co_date; / * date format * / │ │ char co_curr [5]; / * currency symbols * / │ │ char co_thsep [2]; / * number Delivery * / │ │ / * Decan points * / │ │ CHAR CO_DTSEP [2]; / * Date Separator * / │ │ CHAR CO_TMSEP [2]; / * Time Delivery * / │ │ Char CO_CURRSTYLE; / * Monetary Form * / │ │ CHAR CO_DIGITS; / * Valid Number * / │ │ INT (FAR * CO_CASE) (); / * Event Processing Function * / │ │ CHAR CO_DASEP; / * Data Separator * / │ │ Char CO_FILL [10]; / * Supplemental Character * / │ │} │ └ - ───────────── ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ^ The currency display is 0 currency symbols before the value, the middle spaceless 1 currency symbol After the value, the middle spaceless 2 currency symbols in front of the value, there is a space 3 currency symbol After the value, there is a space in the middle

Operating function, 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 MemicMP (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, arrays are n words. Different. MeMCPY Copys a n-byte block to Destin from Source. If the source block and the target block are overlapped, select the copy direction, and correctly copy the overlay byte. MEMMOVE is the same. MEMSET All. MEMSET The byte is placed 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 comparing bytes, so MEMCMP (" 0xFF "," / x7f ", 1) The return value is greater than 0.MEMICMP compares the first n bytes of S1 and S2, regardless of the character override or lowercase .Memccpy Copy byte from Source Copy bytes to Destin. Copying the following one Situation: (1) Character CH Preferred Copy to Destin. (2) N-byte The first n bytes of the destin.Memchr Retrieve the S array in the character CH. Return Value: Memmove and Memcpy Return to Destin Memset Returns S Value Memcmp and Memicmp─ ┬─ If S1 S2 return value greater than 0 MEMCCPY If CH is copied, then return directly to CH in Destin One pointer of the byte; otherwise returning NULL MEMCHR Returns a pointer to CH in S; if you do not in the S array Now CH, return NULL.void MoveData (int SEGSRC, INT OFFSRC, int SEGDEST, INT OFFDEST, Unsigned Numbytes) This function is copied to the NumBytes bytes at the source address (segsrc: offsrc) to the target address (segdest: offest) Void MoveMem (Void * Source, Void * Destin, Unsigned LEN) This function is replicated from Source to Destin. If the source address and destination address string are overlap, select the replication direction in order to copy correctly 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 Destchar STRCAT (CHAR * DEST, Const Char * src) Add a string src to Dest end char STRCHR (const char * S, INT C) Retrieves and returns the position INT strcmp (const char * s1, const char * s2) comparing the character string S1 and S2 in the first occurrence of the character 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 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) comparison strings S1 and S2, and return to S1-S2Size_t strlen (const char * s) returns string S Length CHAR STRLWR (CHAR * S) converts 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) to set the string SRC Maxlen characters Copy to string dest in int stand (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) Replicates the former Maxlen characters in the SRC to dest in int STRNICMP (Const Char * S1, Const Char * S2, SIZE_T MAXLEN) Compare Strings S1 and S2 in front Max in S2 LEN character char strnset (Char * s, INT CH, SIZE_T N) Place the first n characters of strings S in CHAR STRPBRK (const char * s1, const char * s2) Scan string S1, and returns The number of characters in S1 and S2 CHAR STRRCHR (Const Char * S, INT C) Scan Last A String StrRrev (Char * S) of a given character C will reverse the characters in the string S Rearrange, and return the arranged string char strs (CHAR * S, INT CH) to place all characters in a string S in a given character chsize_t strspn (Const Char * S1, Const Char * S2) Scan String S1, and returns a character number of characters in S1 and S2, a string S2, and returns the position of the first appearance of S1 position char STRTOK (CHAR * S1 , Const Char * S2) Retrieve string S1, which is partitioned by CHAR STRUPR (CHAR * S) in the delimiter defined in the string S2 into uppercase letters into uppercase letters, and Returns the converted string

Storage distribution subroutine, the function library is dos.h, alloc.h, malloc.h, stdlib.h, process.hint allocmem (unsigned size, unsigned * seg) using DOS assignment of idle memory, size is allocated memory size , SEG is allocated memory pointer int freemem (unsigned seg) release 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 to which the memory has been allocated, newsize is the new length INT BRK (Void * endds) This function is used to change the space of the data segment assigned to the calling program, and the new space end address is enddschar * sbrk (int inCr) this function Used to increase the number of spaces spaced to the data segment of the calling program, increase the space of the INCR byte

Unsigned long coreleft () This function returns the length of the unused storage area, assigns the NELEM length of ELSIZE in bytes in bytes and returns the pointer Void * malloc to the allocated memory. (unsigned size) allocated the memory space of the Size, and returns the pointer Void free (void * ptr) allocated in the allocated memory release the memory allocated, the memory to be released is Ptrvoid * Realloc (Void * PTR, unsigned Newsize) Change the size of the allocated memory, PTR is a pointer that has been assigned with memory area, and NewSIze is a new length, returns a hidden memory pointer.

LONG FARCOREFT () This function returns the length of the unused storage area in the distortion, with bytes VOID FAR * FARCALLOC (UNSIGNED Long Units, Unsigned Long Units) Saves Units Units Units from the far, and Returns the pointer void * farmalloc (unsigned long size) assigned the SIZE byte, and returns the allocated memory pointer Void Farfree (Void Far * Block) Release the memory space that is previously assigned from the far, what to release The pointer of the long stack of memory changes the size of the allocated far-memory, the block is the pointer assigned by the memory area, and the newzie is a new length, and Newzie is a new length. Memory pointer

The time date function, the function library is Time.h, DOS.H In the time date function, the mainly used structure has the following: Total time date Storage structure TM ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ───────── ─ ┐│StructTM ││ {││ INTTM_SEC; / * Second, 0-59 * / ││ INTTM_MIN; / * Score, 0-59 * / ││ IntTM_HOUR; / * When 0-23 * / │ │ int TM_MDAY; / * Number, 1-31 * / │ │ INTTM_MON; / * Month, 0-11 * / │ │ │;; / * Since 1900's number * / ││ int TM_WDAY; / * Since Sunday 0-6 * / ││ INTTM_YDAY; / * Since January 1st, 0-365 * / ││ IntTm_isdst; / * Do you have a summer time system, The positive number * / ││} │ └─────────────────────────────────────────────────────────────────────────────── ─ ─ ─ ┐│Struct Date ││ {│ │ Int Da_Year; / * Since 1900 Number * / │ Char Da_DAY; / * Number * / ││CHAR Da_MON; / * Month 1 = Jan * / ││││ } └───────────────────────────────────────────── ─ ┐│truct time ││ {││ unsigned CHAR TI_MIN; / * Minute * / ││ UNSIGNED Char Ti_HOUR; / * Hours * / ││ unsigned char Ti_hund; ││ UNSIGNED CHAR TI_SEC

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

New Post(0)