abort
Sends the signal SIGABRT that terminates the process. Syntax: #include <stdlib.h> void abort(void);abs
Returns the absolute value of an integer. Syntax: #include <stdlib.h> int abs(int integer);access
Checks a file to see if a specified access mode is allowed. Syntax: #include <unistd.h> int access(const char *file_spec, int mode); The mode is interpreted as follows: F_OK -- Test to see if the file exists X_OK -- Execute W_OK -- Write (implies delete access) R_OK -- Readacos
Returns a value in the range 0 to pi, which is the arc cosine of its radian argument. Syntax: #include <math.h> double acos(double x);[w]addch
Curses Screen Management function and macro that add the character ch to the window at the current position of the cursor. The addch macro operates on the stdscr window. Syntax: #include <curses.h> int addch(char ch); int waddch(WINDOW *win, char ch);[w]addstr
Curses Screen management function and macro that add the string pointed to by str to the window at the current position of the cursor. The addstr macro operates on the stdscr window. Syntax: #include <curses.h> int addstr(char *str); int waddstr(WINDOW *win, char *str);alarm
Sends the signal SIGALRM to the invoking process after the number of seconds indicated by its argument has elapsed. This function is nonreentrant. Syntax: #include <unistd.h> unsigned int alarm(unsigned int seconds); (POSIX-1) int alarm(unsigned int seconds); (Compatibility)asctime, asctime_r
Converts a broken-down time into a 26-character string in the following form: Sun Sep 16 01:03:52 1984\n\0 All fields have a constant width. asctime_r puts the result into a user-specified buffer. asctime puts the result into thread-specific static memory allocated by the Compaq C RTL, which can be overwritten by subsequent calls to ctime or asctime; you must make a copy if you want to save it. Syntax: #include <time.h> char *asctime(const struct tm *timeptr); char *asctime_r(const struct tm *timeptr, char *buffer); [posix1]asin
Returns a value in the range -pi/2 to pi/2, which is the arc sine of its radian argument. Syntax: #include <math.h> double asin(double x);assert
Used to implement run-time diagnostics in programs. Syntax: #include <assert.h> void assert(int expression);atan
Returns a value in the range -pi/2 to pi/2, which is the arc tangent of its radian argument. Syntax: #include <math.h> double atan(double x);atan2
Returns a value in the range -pi to pi, which is the arc tangent of x/y, where x and y are the two arguments. Syntax: #include <math.h> double atan2(double x, double y);atexit
Registers a function that is called without arguments at program termination. Syntax: #include <stdlib.h> int atexit(void (*func) (void));atof
Converts a character string to a double-precision number. The character string has the following form: [white-spaces][+|-]digits[radix-character][digits][e|E[+|-]integer] Where radix-character is defined in the current locale. The first unrecognized character ends the conversion. The string is interpreted by the same rules that are used to interpret floating constants. Syntax: #include <stdlib.h> double atof(const char *nptr);atoi
Converts strings of ASCII characters to the appropriate numeric values. The ASCII string has the following form: [white-spaces][+|-]digits This function does not account for overflow resulting from the conversion. Syntax: #include <stdlib.h> int atoi(const char *nptr);atol
Converts strings of ASCII characters to the appropriate numeric values. The ASCII string has the following form: [white-spaces][+|-]digits The function does not account for overflow resulting from the conversion. Syntax: #include <stdlib.h> long int atol(const char *nptr);basename
Returns the last component of a path name. Syntax: #include <libgen.h> char *basename (char *path);bcmp
Compares byte strings. Syntax: #include <strings.h> void bcmp (const void *string1, const void *string2, size_t length);bcopy
Copies byte strings. Syntax: #include <strings.h> void bcopy (const void *source, void *destination, size_t length);box
Curses Screen Management function that draws a box around the window using the character vert as the character for drawing the vertical lines of the rectangle, and hor for drawing the horizontal lines of the rectangle. Syntax: #include <curses.h> int box(WINDOW *win, char vert, char hor);brk
Determines the lowest virtual address that is not used with the program. Syntax: #include <stdlib.h> void *brk(unsigned long int addr);bsearch
Performs a binary search. It searches an array of sorted objects for a specified object. Syntax: #include <stdlib.h> void *bsearch (const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *));btowc
Converts one-byte multibyte character to a wide character in the initial shift state. Syntax: #include <wchar.h> wint_t btowc (int c);bzero
Copies nulls into byte strings. Syntax: #include <strings.h> void bzero (void *string, size_t length);cabs
Computes the Euclidean distance between two points as the square root of their respective squares. This function returns sqrt(x*x + y*y). Syntax: #include <math.h> double cabs(cabs_t z);calloc
Allocates an area of zeroed memory. This function is AST-reentrant. Syntax: #include <stdlib.h> void *calloc(size_t number, size_t size);catclose
Closes a message catalog. Syntax: #include <nl_types.h> int catclose (nl_catd catd);catgets
Retrieves a message from a message catalog. The message identified by set_id and msg_id, in the message catalog catd, is retrieved The message is stored in a message buffer in the nl_catd structure which is overwritten by subsequent calls to catgets. If a message string needs to be preserved, it should be copied to another location by the program. Syntax: #include <nl_types.h> char *catgets (nl_catd catd, int set_id, int msg_id, const char *s);catopen
Opens a message catalog. Syntax: #include <nl_types.h> nl_catd catopen (const char *name, int oflag);ceil
Returns (as a double) the smallest integer that is greater than or equal to its argument. Syntax: #include <math.h> double ceil(double x);cfree
Makes available for reallocation the area allocated by a previous calloc, malloc, or realloc call. This function is AST-reentrant. Syntax: #include <stdlib.h> void cfree(void *pointer);chdir
Changes the default directory. Syntax: #include <unistd.h> int chdir(const char *dir_spec); (POSIX-1) int chdir(const char *dir_spec, ...); (Compaq C Extension) where the ... is an optional flag, available in all compilation modes except strict ANSI C mode (/STANDARD=ANSI89). This flag is significant only when calling chdir from USER mode. If the value of the flag is 1, the new directory is effective across images. If the value is not 1, the original default directory is restored when the image exits.chmod
Changes the file protection of a file. Syntax: #include <stat.h> int chmod(const char *file_spec, mode_t mode);chown
Changes the owner UIC of a file. Syntax: #include <unistd.h> int chown(const char *file_spec, uid_t owner, gid_t group); (POSIX-1) int chown(const char *file_spec, unsigned int owner, unsigned int group); (Compatibility)[w]clear
Curses Screen Management function and macro that erase the contents of the specified window and reset the cursor to coordinates (0,0). The clear macro acts on the stdscr window. Syntax: #include <curses.h> int clear(); int wclear(WINDOW *win);clearerr
Resets the error and end-of-file indicators for a file (so that ferror and feof will not return a nonzero value). Syntax: #include <stdio.h> void clearerr(FILE *file_pointer);clearok
Sets the clear flag for the window. Syntax: #include <curses.h> clearok(WINDOW *win, bool boolf);clock
Determines the amount of CPU time (in 10-millisecond units) used since the beginning of program execution. The time reported is the sum of the user and system times of the calling process and any terminated child processes for which the calling process has executed wait or system. This function is nonreentrant. Syntax: #include <time.h> clock_t clock(void);close
Closes the file associated with a file descriptor. Syntax: #include <unistd.h> int close(int file_descriptor);closedir
Closes directories. Syntax: #include <dirent.h> int closedir (DIR *dir_pointer);[w]clrattr
Curses Screen Management function and macro that deactivate the video display attributes boldface, blinking, reverse video, and underlining within a specified window on the terminal screen. The attributes are represented by _BOLD, _BLINK, _REVERSE, and _UNDERLINE. The clrattr macro operates on the stdscr window. Syntax: #include <curses.h> int clrattr(int attr); int wclrattr(WINDOW *win, int attr);[w]clrtobot
Curses Screen Management function and macro that erase the contents of the window from the current position of the cursor to the bottom of the window. The clrtobot macro acts on the stdscr window. Syntax: #include <curses.h> int clrtobot(); int wclrtobot(WINDOW *win);[w]clrtoeol
Curses Screen Management function and macro that erase the contents of the window from the current cursor position to the end of the line on the specified window. The clrtoeol macro acts on the stdscr window. Syntax: #include <curses.h> int clrtoeol(); int wclrtoeol(WINDOW *win);confstr
Determines the current value of a specified system variable defined by a string value. Syntax: #include <unisted.h> size_t confstr (int name, char *buf, size_t len);cos
Returns the cosine of its radian argument. Syntax: #include <math.h> double cos(double x);cosh
Returns the hyperbolic cosine of its argument. Syntax: #include <math.h> double cosh(double x);cot
Returns the cotangent of its radian argument. Syntax: #include <math.h> double cot(double x);creat
Creates a new file. Syntax: #include <fcntl.h> int creat(const char *file_spec, mode_t mode); (POSIX-1) int creat(const char *file_spec, mode_t mode,...); (Compaq C Extension) where the ... is an optional argument list of character strings of the following form: "keyword = value",...,"keyword = value" Or in the case of "acc" or "err", this form: "keyword" The keyword is an RMS field in the file access block (FAB) or record access block (RAB), and the value is valid for assignment to that field. Some fields permit you to specify more than one value. In these cases, the values are separated by commas.[no]crmode
Curses Screen Management macros that set and unset the terminal from cbreak mode. This mode of single-character input is only supported with the Curses input routine getch. Syntax: #include <curses.h> crmode() nocrmode()ctermid
Returns a character string giving the equivalence string of SYS$COMMAND. This is the name of the controlling terminal. This function is nonreentrant. Syntax: #include <unistd.h> char *ctermid(char *str);ctime, ctime_r
Converts a time, in seconds, to the following form: Sun Sep 16 01:03:52 1984\n\0 All fields have a constant width. ctime_r puts the result into a user-specified buffer. ctime puts the result into thread-specific static memory allocated by the Compaq C RTL, which can be overwritten by subsequent calls to ctime or asctime; you must make a copy if you want to save it. Syntax: #include <time.h> char *ctime(const time_t *bintim); char *ctime_r(const time_t *bintim, char *buffer); [posix1]Curses
Curses, the Compaq C Screen Management Package, is comprised of RTL functions that create and modify defined sections of the terminal screen, and optimize cursor movement. Using a screen management package, you can develop a user interface that is both visually attractive and easy to use. Curses allows you to manipulate the screen without worrying about the intricacies of various types of terminals, the difficulties of moving data to and from sections of the screen, or the problems of efficient cursor movement. Using Curses, the terminal screen may be divided into a number of rectangular regions called windows. The size and location of each window is given in terms of the number of lines, the number of columns, and the starting position -- the upper left corner of the window. A window must fit completely on the terminal screen, being as small as a single character or as large as the entire terminal screen. When modifying windows, changes will not appear on the terminal screen until the window is refreshed. When a window is refreshed, the updated window is placed onto the terminal screen leaving the rest of the terminal screen unaltered.cuserid
Returns a pointer to a character string containing the name of the user initiating the current process. This function is nonreentrant. Syntax: #include <unistd.h> char *cuserid(char *str);DECC$CRTL_INIT
Allows you to call the Compaq C RTL from other languages. It initializes the run-time environment and establishes both an exit and condition handler. VAXC$CRTL_INIT is a synonym for DECC$CRTL_INIT. Either name invokes the same routine. Syntax: #include <signal.h> void DECC$CRTL_INIT(void);decc$fix_time
Converts OpenVMS binary system times to UNIX binary times. Syntax: #include <unixlib.h> unsigned int decc$fix_time(void *vms_time);decc$from_vms
Converts OpenVMS file specifications to UNIX style file specifications. Syntax: #include <unixlib.h> int decc$from_vms(const char *vms_filespec, int action_routine, int wild_flag);decc$match_wild
Matches a string to a pattern. Syntax: #include <unixlib.h> int decc$match_wild(char *test_string, char *string_pattern);decc$to_vms
Converts UNIX style file specifications to OpenVMS file specifications. Syntax: #include <unixlib.h> int decc$to_vms(const char *unix_style_filespec, int (*action_rtn)(char *unix_style_filespec, int type_of_file), int allow_wild, int no_directory);decc$record_read
Provides additional flexibility in manipulating and observing RMS structures on a per-read basis. This function is inherently specific to OpenVMS systems and should not be used when writing portable applications. Syntax: #include <stdio.h> int decc$record_read(FILE *fp, void *buffer, int nbytes);decc$record_write
Provides additional flexibility in manipulating and observing RMS structures on a per-write basis. Syntax: #include <stdio.h> int decc$record_write(FILE *fp, void *buffer, int nbytes);decc$set_child_standard_streams
For a child spawned by a function from the exec family of functions, associates specified file descriptors with a child's standard streams: stdin, stdout, and stderr. Syntax: #include <unistd.h> int decc$set_child_standard_streams(int fd1, int fd2, int fd3);decc$set_reentrancy
Controls the type of reentrancy that reentrant Compaq C RTL routines will exhibit. Syntax: #include <reentrancy.h> int decc$set_reentrancy(int type); Use one of the following values for type: o C$C_AST (AST) Uses the _BBSSI builtin to perform simple locking around critical sections of RTL code, and it may additionally disable asynchronous system traps (AST)s in locked regions of code. This type of locking should be used when AST code contains calls to Compaq C RTL I/O routines. o C$C_MULTITHREAD (multithread) Designed to be used in conjunction with the DECthreads product. It performs DECthreads locking and never disables ASTs. DECthreads must be available on your system to use this form of reentrancy. o C$C_TOLERANT (tolerant) Uses the _BBSSI builtin to perform simple locking around critical sections of RTL code, but ASTs are not disabled. This type of locking should be used when ASTs are used and must be delivered immediately. TOLERANT is the default reentrancy type. o C$C_NONE (none) Gives optimal performance in the Compaq C RTL, but does absolutely no locking around critical sections of RTL code. It should only be used in a single-threaded environment when there is no chance that the thread of execution will be interrupted by an AST that would call the Compaq C RTL.decc$translate_vms
Translates OpenVMS file specifications to UNIX style file specifications. Syntax: #include <unixlib.h> char *decc$translate_vms(const char *vms_filespec);decc$validate_wchar
Validates its argument as a valid wide character in the current program's locale. Syntax: #include <wchar.h> int decc$validate_wchar(wchar_t wc);decc$write_eof_to_mbx
Writes an end-of-file message to the mailbox. Syntax: #include <unistd.h> int decc$write_eof_to_mbx(int fd);[w]delch
Curses Screen Management function and macro that delete the character on the specified window at the current position of the cursor. The delch macro operates on the stdscr window. Syntax: #include <curses.h> int delch(); int wdelch(WINDOW *win);delete
Deletes a file. Syntax: #include <unixio.h> int delete(const char *file_spec);[w]deleteln
Curses Screen Management function and macro that delete the line at the current position of the cursor. The deleteln macro acts on the stdscr window. Syntax: #include <curses.h> int deleteln(); int wdeleteln(WINDOW *win);delwin
Deletes the specified window from memory. Syntax: #include <curses.h> int delwin(WINDOW *win);difftime
Computes the difference, in seconds, between the two times specified by the time1 and time2 arguments. Syntax: #include <time.h> double difftime (time_t time2, time_t time_1);dirname
Reports the parent directory name of a file path name. Syntax: #include <libgen.h> char *dirname (char *path);div
Returns the quotient and remainder after the division of its arguments. Syntax: #include <stdlib.h> div_t div(int numer, int denom);dlclose
deallocates the address space allocated by the Compaq C RTL for the handle. There is no way on OpenVMS systems to "unload" a shareable image that was dynamically loaded by the LIB$FIND_IMAGE_SYMBOL routine, which is the routine called by the dlsym function. In other words, there is no way on OpenVMS systems to release the address space occupied by the shareable image brought into memory by dlsym. Syntax: #include <stdio.h> void dlclose(void *handle);derror
Returns a string describing the last error that occurred from a call to dlopen, dlclose, or dlsym. Syntax: #include <stdio.h> char *dlerror(void);dlopen
Provides an interface to the dynamic library loader to allow shareable images to be loaded and called at run time. The dlopen function does not load a shareable image but rather saves its pathname argument for subsequent use by the dlsym function, which actually loads the shareable image through a call to LIB$FIND_IMAGE_SYMBOL. Syntax: #include <stdio.h> void *dlopen(char *pathname, int mode);dlsym
Returns the address of the symbol name found in a shareable image. If the symbol is not found, a NULL pointer is returned. Syntax: #include <stdio.h> void *dlsym(void *handle, char *name);drand48
Generate uniformly distributed pseudorandom number sequences. Returns 48-bit, nonnegative, double-precision floating-point values. Syntax: #include <stdlib.h> double drand48 (void);dup
Allocates a new file descriptor that refers to a file specified by a file descriptor returned by open, creat, or pipe. Syntax: #include <unistd.h> int dup(int file_desc1);dup2
Makes file_descriptor_2 point to the same file as file_descriptor_1. Syntax: #include <unixio.h> int dup2(int file_descriptor_1, int file_descriptor_2);[no]echo
Curses Screen Management macros that set the terminal so that characters may or may not be echoed on the terminal screen. This mode of single-character input is only supported with Curses. Syntax: #include <curses.h> echo() noecho()ecvt
Converts its value argument to a null-terminated string of ASCII digits and returns the address of the string. The string is stored in a memory location created by the function. Syntax: #include <stdlib.h> char *ecvt(double value, int ndigit, int *decpt, int *sign);endwin
Curses Screen Management function that clears the terminal screen and frees any virtual memory allocated to Curses data structures. Syntax: #include <curses.h> void endwin(void);erand48
Generate uniformly distributed pseudorandom number sequences. Returns 48-bit nonnegative, double-precision, floating-point values. Syntax: #include <stdlib.h> double erand48 (unsigned short int xsubi[3]);[w]erase
Curses Screen Management function and macro that erase the window by painting it with blanks. The erase macro acts on the stdscr window. Syntax: #include <curses.h> int erase(); int werase(WINDOW *win);execl
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execl (const char *file-spec, const char *arg0,..., (char *)0; (POSIX-1) int execl (char *file-spec,...); (Compatibility) where the ... is a sequence of pointers to strings. At least one pointer must exist to terminate the list. This pointer must be the null pointer.execle
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execle (char *file-spec, char *argn,..., (char *)0, char *envp[]); (POSIX-1) int execle (char *file-spec,...); (Compatibility)execlp
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execlp (const char *file-spec, const char *arg0,...,(char *)0); (POSIX-1) int execlp (char *file-spec,...); (Compatibility)execv
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execv (char *file-spec, char *argv[]);execve
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execve (const char *file-spec, char *argv[], char *envp[]);execvp
Passes the name of an image to be activated on a child process. This function is nonreentrant. Syntax: #include <unistd.h> int execvp (const char *file-spec, char *argv[]);exit, _exit
Terminate execution of the program from which they are called. These functions are nonreentrant. They are also identical; the _exit function is retained for reasons of compatibility with VAX C. The status argument corresponds with an errno value if exiting from a child process using vfork and/or an exec function, or with an OpenVMS condition value if exiting from a process invoked by DCL. The errno values are defined in the <errno.h> header file. A status value of 0 or EXIT_SUCCESS is translated to the OpenVMS SS$_NORMAL status code to return the OpenVMS success value. Any other status value is left the same. The status value is passed to the parent process. A status value of EXIT_FAILURE is translated to an error-level exit status. If the process was invoked by the DIGITAL Command Language (DCL), the status is interpreted by DCL and a message is displayed. If the process was a child process created using vfork or an exec function, then the child process is executed and control returns to the parent. The exit and _exit functions make use of the $EXIT system service. If your process is being invoked by the RUN command using any of the hibernation and scheduled wakeup qualifiers, the process might not correctly return to hibernation state when an exit or _exit call is made. Syntax: #include <stdlib.h> void exit(int status) #include <unistd.h> void _exit(int status);exp
Returns the base e raised to the power of the argument. Syntax: #include <math.h> double exp(double x);fabs
Returns the absolute value of a floating-point value. Syntax: #include <math.h> double fabs(double x);fchown
Changes the owner and group of a file. Syntax: #include <unistd.h> int fchown(int fildes, uid_t owner, gid_t group);fclose
Closes a file by flushing any buffers associated with the file control block and freeing the file control block and buffers previously associated with the file pointer. Syntax: #include <stdio.h> int fclose(FILE *file_pointer);fcntl
Performs controlling operations on an open file specified by the file_desc parameter. The values for the request parameter are defined in the <fcntl.h> header file. Syntax: #include <sys/types.h> #include <unistd.h> #include <fcntl.h> int fcntl(int file_desc, int request [, int file_desc2]);fcvt
Converts its value argument to a null-terminated string of ASCII digits and returns the address of the string. Syntax: #include <stdlib.h> char *fcvt(double value, int ndigit, int *decpt, int *sign);fdopen
Associates a file pointer with a file descriptor returned by an open, creat, dup, dup2, or pipe function. Syntax: #include <stdio.h> FILE *fdopen(int file_descriptor, char *a_mode);feof
Tests a file to see if the end-of-file has been reached. Syntax: #include <stdio.h> int feof(FILE *file_pointer);ferror
Returns a nonzero integer if an error occurred while reading or writing to a file. Syntax: #include <stdio.h> int ferror(FILE *file_pointer);fflush
Writes out any buffered information for the specified file. Syntax: #include <stdio.h> int fflush(FILE *file_pointer);ffs
Finds the index of the first bit in a string. Syntax: #include <strings.h> int ffs (int integer);fgetc
Returns the next character from a specified file. Syntax: #include <stdio.h> int fgetc(FILE *file_pointer);fgetname
Returns the file specification associated with a file pointer. Syntax: #include <stdio.h> char *fgetname(FILE *file_pointer, char *buffer,...); where the ... is an optional additional argument that can be either 1 or 0. If you specify 1, fgetname returns the file specification in OpenVMS format. If you specify 0, fgetname returns the file specification in UNIX style format. If this argument is omitted, fgetname returns the file name according to your current command language interpreter.fgetpos
Stores the current value of the file position indicator for the stream pointed to by the stream into the object pointed to by pos. Syntax: #include <stdio.h> int fgetpos(FILE *stream, fpos_t *pos);fgets
Reads a line from a specified file, up to one less than the specified maximum number of characters or up to and including the new-line character, whichever comes first. The string is stored in the argument str. Syntax: #include <stdio.h> char *fgets(char *str, int maxchar, FILE *file_ptr);fgetwc
Reads the next character from a specified file, and converts it to a wide-character code. Syntax: #include <wchar.h> wint_t fgetwc (FILE *file_ptr);fgetws
Reads a line of wide characters from a specified file. and stores them in an array pointed to by wstr. The function reads up to maxchar - 1 characters or until the newline character is encountered. The function terminates the line with a null wide character. Syntax: #include <wchar.h> wchar_t *fgetws (wchar_t *wstr, int maxchar, FILE *file_ptr);fileno
Returns the file descriptor associated with the specified file pointer. Syntax: #include <stdio.h> int fileno(FILE *file_pointer);floor
Returns (as a double) the largest integer that is less than or equal to its argument. Syntax: #include <math.h> double floor(double x);fmod
Computes the floating-point remainder of the first argument divided by the second. If the second argument is zero, the fuction returns zero. Syntax: #include <math.h> double fmod (double x, double y);fopen
Opens a file by returning the address of a FILE structure. Syntax: #include <stdio.h> FILE *fopen(const char *file_spec, const char *a_mode); (ANSI C) FILE *fopen(const char *file_spec, const char *a_mode ,...); (Compaq C Extension) where the ... represents optional file attribute arguments. The file attribute arguments are the same as those used in the creat function.fpathconf
Retrieves file implementation characteristics. Syntax: #include <unistd.h> long int fpathconf (int filedes, int name);fprintf
Performs formatted output to a specified file. Syntax: #include <stdio.h> int fprintf(FILE *file_pointer, const char *format_string,...); The ... represents optional expressions whose resultant types correspond to conversion specifications given in the format_string. If no conversion specifications are given, you can omit the output sources. Otherwise, the function calls must have exactly as many output sources as there are conversion specifications, and the conversion specifications must match the types of the output sources. Conversion specifications are matched to output sources in left-to-right order. The format string for the output of information can contain two kinds of items: o Ordinary characters, which are copied to the output. o Conversion specifications, each of which causes the conversion of a corresponding output source to a character string in a particular format. Conversion specifications are matched to output sources in left-to-right order. A conversion specification consists of a % (or a %n$), followed by one or more optional characters, and concluding with a conversion specifier.
Additional Information on:
fputc
Writes a character to a specified file. Syntax: #include <stdio.h> int fputc(int character, FILE *file_pointer);fputs
Writes a character string to a file without copying the string's null terminator. Syntax: #include <stdio.h> int fputs(const char *string, FILE *file_pointer);fputwc
Converts a wide character to its corresponding multibyte value, returns the result, and writes the result to the specified file. Syntax: #include <wchar.h> wint_t fputwc (wint_t wc, FILE *file_ptr);fputws
Converts a wide-character string to a to a multibyte character string and writes it to the specified file. The function does not append a terminating null byte, corresponding to the null wide-character, to the output string. Syntax: #include <wchar.h> int fputws (const wchar_t *wstr, FILE *file_ptr);fread
Reads a specified number of items from a file. Syntax: #include <stdio.h> size_t fread(void *pointer, size_t size_of_item, size_t number_of_items, FILE *file_pointer);free
Makes available for reallocation the area allocated by a previous calloc, malloc, or realloc call. This function is AST-reentrant. Syntax: #include <stdlib.h> void free(void *pointer);freopen
Substitutes the file, named by a file specification, for the open file addressed by a file pointer. The latter file is closed. Syntax: #include <stdio.h> FILE *freopen(const char *file_spec, const char *access_mode, FILE *file_pointer,...); Where the ... represents optional file attribute arguments. The file attribute arguments are the same as those used in the creat function.frexp
Calculates the fractional and exponent parts of a double value. The fractional part is returned as the return value; the exponent is placed in the integer variable pointed to by eptr. Syntax: #include <math.h> double frexp(double value, int *eptr);fscanf
Performs formatted input from a specified file. Syntax: #include <stdio.h> fscanf(FILE *file_pointer, const char *format_string,...); The ... represents optional expressions that are pointers to objects whose results correspond to conversion specifications given in the format_string. If no conversion specifications are given, you can omit the input pointers. Otherwise, the function calls must have exactly as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers. Conversion specifications are matched to input sources in left-to-right order. The format_string for the input of information can include three kinds of items: o White-space characters (spaces, tabs, and new-line characters), which match optional white-space characters in the input field. o Ordinary characters (not %), which must match the next nonwhite-space character in the input. o Conversion specifications, which govern the conversion of the characters in an input field and their assignment to an object indicated by a corresponding input pointer. A conversion specification consists of the following characters, in the order listed: o A percent character (%) or the sequence %n$ (where n is an integer). The sequence %n$ denotes that the conversion is applied to the nth input pointer listed, where n is a decimal integer between [1, NL_ARGMAX] (see the <limits.h> header file). For example, a conversion specification beginning %5$ means that the conversion will be applied to the 5th input pointer listed after the format specification. The sequence %$ is invalid. If the conversion specification does not begin with the sequence %n$ the conversion specification is matched to its input pointer in left-to-right order. You should only use one type of conversion specification (% or %n$) in a format specification. o One or more optional characters o A conversion specifier.
Additional Information on:
fseek
Positions the file to the specified byte offset in the file. Syntax: #include <stdio.h> int fseek(FILE *file_pointer, long int offset, int direction);fsetpos
Sets the file position indicator for the stream according to the value of the object pointed to by pos. Syntax: #include <stdio.h> int fsetpos (FILE *stream, const fpos_t *pos);fstat
Accesses information about the file descriptor or the file specification. Syntax: #include <stat.h> int fstat(int file_descriptor, struct stat *buffer);fsync
Flushes data all the way to the disk. Syntax: #include <unistd.h> int fsync(int file_descriptor);ftell
Returns the current byte offset to the specified file. Syntax: #include <stdio.h> long int ftell(FILE *file_pointer);ftime
Returns the time elasped since 00:00:00 January 1, 1970, in the structure pointed at by timeptr. Syntax: #include <timeb.h> int ftime(struct timeb *timeptr);ftruncate
Truncates a file to a specified length. Syntax: #include <unistd.h> int ftruncate (int filedes, off_t length);ftw
Walks a file tree. Syntax: #include <ftw.h> int ftw (const char *path, int(*function)(cont char *,const struct stat *,int) int depth);fwait
Is used to wait for I/O on a specific file to complete. Syntax: #include <stdio.h> int fwait(FILE *fp);fwide
Determines and sets the orientation of a stream. Syntax: #include <wchar.h> int fwide (FILE *stream, int mode);fwprintf
Prints formatted output to a stream based on specified arguments. Syntax: #include <wchar.h> int fwprintf (FILE *stream, const wchar_t *format, ...);fwrite
Writes a specified number of items to the file. Syntax: #include <stdio.h> size_t fwrite(const void *pointer, size_t size_of_item, size_t number_items, FILE *file_pointer);fwscanf
Performs formatted input from a stream based on specified arguments. Syntax: #include <wchar.h> int fwscanf (FILE *stream, const wchar_t *format, ...);gcvt
Converts its value argument to a null-terminated string of ASCII digits and returns the address of the string. The strings are stored in a memory location created by the function. Syntax: #include <stdlib.h> char *gcvt(double value, int ndigit, char *buf);getc
Returns characters from a specified file. Syntax: #include <stdio.h> int getc(FILE *file_pointer);[w]getch
Curses Screen Management function and macro that get a character from the terminal screen and echo it on the specified window. The getch macro echos the character on stdscr. Syntax: #include <curses.h> char getch(); char wgetch(WINDOW *win);getchar
Reads a single character from the standard input (stdin). Syntax: #include <stdio.h> int getchar(void);getclock
Gets current value of system-wide clock. Syntax: #include <timers.h> int getclock (int clktyp, struct timespec *tp);getcwd
Returns a pointer to the file specification for the current working directory. Syntax: #include <unistd.h> char *getcwd (char *buffer, size_t size); (POSIX-1) char *getcwd (char *buffer, unsigned int size,...); (Compaq C Extension) where the ... is an optional argument that can be either 1 or 0. If you specify 1, getcwd returns the directory specification in OpenVMS format. If you specify 0, getcwd returns the directory specification (path name) in UNIX style format. If you do not specify this argument, getcwd returns the file name according to your current command-language interpreter.getdtablesize
Gets the total number of file descriptors that a process can have open simultaneously. Syntax: #include <unistd.h> int getdtablesize (void);getegid
Returns, in OpenVMS terms, the group number from the user identification code (UIC). For example, if the UIC is [313,031], 313 is the group number. Syntax: #include <unistd.h> gid_t getegid(void);getenv
Searches the environment array for the current process and returns the value associated with the environment name. Syntax: #include <stdlib.h> char *getenv(const char *name);geteuid
Returns, in OpenVMS terms, the member number from the user identification code (UIC). For example, if the UIC is [313,031], 313 is the member number. Syntax: #include <unistd.h> uid_t geteuid(void)getgid
Returns, in OpenVMS terms, the group number from the user identification code (UIC). For example, if the UIC is [313,031], 313 is the group number. Syntax: #include <unistd.h> gid_t getgid(void);getitimer
Returns the value of interval timers. Syntax: #include <time.h> #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 int getitimer (int which, struct itimerval *value);getlogin
Gets login name. Syntax: #include <unistd.h> char *getlogin (void);getname
Returns the file specification associated with a file descriptor. Syntax: #include <unixio.h> char *getname(int file_descriptor, char *buffer,...); where the ... is an optional argument that can be either 1 or 0. If you specify 1, getname returns the directory specification in OpenVMS format. If you specify 0, getname returns the directory specification (path name) in UNIX style format. If you do not specify this argument, getname returns the file name according to your current command-language interpreter.getopt
The getopt function is a command-line parser that can be used by applications that follow Utility Syntax Guidelines 3,4,5,6,7,9, and 10 in Section 10.2 of the XBD specification. The remaining guidelines are not addressed by getopt and are the responsibility of the application. Syntax: #include <unistd.h> (X/Open, POSIX-2) #include <stdio.h> (X/Open, POSIX-1) int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt;getpagesize
Gets the system page size. Syntax: #include <unistd.h> int getpagesize (void);getpid
Returns the process ID of the current process. Syntax: #include <unistd.h> pid_t getpid(void);getppid
Returns the parent process ID of the calling process. Syntax: #include <unistd.h> pid_t getppid (void);getpwnam
Accesses user name information in the user database. Syntax: #include <pwd.h> struct passwd *getpwnam (const char name);getpwuid
Accesses user ID information in the user database. Syntax: #include <pwd.h> struct passwd *getpwuid (uid_t uid);gets
Reads a line from the standard input (stdin). Syntax: #include <stdio.h> char *gets(char *string);[w]getstr
Curses Screen Management function and macro that get a string from the terminal screen, store it in the variable str, and echo it on the specified window. The getstr macro works on the stdscr window. Syntax: #include <curses.h> int getstr(char *str); int wgetstr(WINDOW *win, char *str);gettimeofday
Gets date and time. The tpz argument must be the NULL pointer. Otherwise, the argument is ignored. Syntax: #include <time.h> int gettimeofday (struct timeval *tp, void *tpz);getuid
Returns, in OpenVMS terms, the member number from the user identification code (UIC). For example, if the UIC is [313,031], 313 is the member number. Syntax: #include <unistd.h> uid_t getuid(void);getw
Returns characters from a specified file. Syntax: #include <stdio.h> int getw(FILE *file_pointer);getwc
Reads the next character from a specified file, and converts it to a wide-character code. Syntax: #include <wchar.h> wint_t getwc (FILE *file_ptr);getwchar
Reads a single wide character from the standard input (stdin). The getwchar function is identical to fgetwc(stdin). Syntax: #include <wchar.h> wint_t getwchar (void);getyx
Curses Screen Management function that puts the (y,x) coordinates of the current cursor position on win in the variables y and x. Syntax: #include <curses.h> getyx(WINDOW *win, int y, int x);gmtime, gmtime_r
Converts the time (in seconds since the Epoch) pointed to by timer into a broken-down time, expressed as Coordinated Universal Time (UTC). Note: The name of this function was originally defined to return the time expressed as GMT (Greenwich Mean Time); its definition was changed to reflect current technical standard terminology. gmtime_r puts the result into a user-specified buffer. gmtime puts the result into thread-specific static memory allocated by the Compaq C RTL, which can be overwritten by subsequent calls to gmtime; you must make a copy if you want to save it. Syntax: #include <time.h> struct tm *gmtime (const time_t *timer); struct tm *gmtime_r(const time_t *timer, struct tm *result); [posix1]gsignal
Generates a specified software signal. Generating a signal causes the action routine established by the signal, ssignal, or sigvec function to be invoked. Syntax: #include <signal.h> int gsignal(int sig [, int sigcode]);hypot
Returns the square root of the sum of two squares of two arguments. For example: sqrt(x*x + y*y). Syntax: #include <math.h> double hypot(double x, double y);iconv
Converts characters coded in one codeset into another codeset. Characters in the buffer pointed to by inbuf are converted to characters in another code set. The resulting characters are stored in the buffer pointed to by outbuf. The conversion type is specified by the conversion descriptor cd. This descriptor is returned from a successful call to iconv_open. If an invalid character is found in the input buffer, the conversion stops after the last successful conversion. The variable pointed to by inbytesleft is updated to reflect the number of bytes in the input buffer that are not converted. The variable pointed to by outbytesleft is updated to reflect the number of bytes available in the output buffer. Syntax: #include <iconv.h> size_t iconv (iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);iconv_close
Deallocates a specified conversion descriptor and the resources allocated to it. Syntax: #include <iconv.h> int iconv_close (iconv_t cd);iconv_open
Allocates a conversion descriptor for a specified codeset conversion. Syntax: #include <iconv.h> iconv_t iconv_open (const char *tocode, const char *fromcode);[w]inch
Curses Screen Management function and macro that return the character at the current cursor position on the specified window without making changes to the window. The inch macro acts on the stdscr window. Syntax: #include <curses.h> char inch(); char winch(WINDOW *win);index
Search for a character in a string. Syntax: #include <strings.h> char *index (const char *s, int c);initscr
Curses Screen Management function that initializes the terminal-type data and all screen functions. You must call initscr before using any of the Curses functions or macros. Syntax: #include <curses.h> void initscr(void);initstate
Initializes, restarts, and changes random number generators. Syntax: #include <stdlib.h> char *initstate (unsigned int seed, char *state, int size);[w]insch
Curses Screen Management function and macro that insert the character ch at the current cursor position in the specified window. The insch macro acts on the stdscr window. Syntax: #include <curses.h> int insch(char ch); int winsch(WINDOW *win, char ch);[w]insertln
Curses Screen Management function and macro that insert a line above the line containing the current cusor position. The insertln macro acts on the stdscr window. Syntax: #include <curses.h> int insertln(); int winsertln(WINDOW *win);[w]insstr
Curses Screen Management function and macro that insert a string at the current cursor position on the specified window. The insstr macro acts on the stdscr window. Syntax: #include <curses.h> int insstr(char *str); int winsstr(WINDOW *win, char *str);isalnum
Returns a nonzero integer if its argument is classed as alphabetic or as a digit in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isalnum(int character);isalpha
Returns a nonzero integer if its argument is classed as an alphabetic character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isalpha(int character);isapipe
Returns 1 if the specified file descriptor is associated with a pipe, and 0 if it is not. Syntax: #include <unixio.h> int isapipe(int file_descriptor);isascii
Returns a nonzero integer if its argument is any ASCII character. Otherwise, it returns 0. Syntax: #include <ctype.h> int isascii(int character);isatty
Returns 1 if the specified file descriptor is associated with a terminal, and 0 if it is not. Syntax: #include <unistd.h> int isatty(int file_descriptor);iscntrl
Returns a nonzero integer if its argument is classed as a control character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int iscntrl(int character);isdigit
Returns a nonzero integer if its argument is classed as a digit in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isdigit(int character);isgraph
Returns a nonzero integer if its argument is classed as a graphic character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isgraph(int character);islower
Returns a nonzero integer if its argument is classed as a lowercase character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int islower(int character);isprint
Returns a nonzero integer if its argument is classed as a printing character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isprint(int character);ispunct
Returns a nonzero integer if its argument is classed as a punctuation character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int ispunct(int character);isspace
Returns a nonzero integer if its argument is classed as a space character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isspace(int character);isupper
Returns a nonzero integer if its argument is classed as an uppercase character in the program's current locale. Otherwise, it returns 0. Syntax: #include <ctype.h> int isupper(int character);iswalnum
Returns a nonzero integer if its wide-character argument is classed as alphabetic or as a digit in the program's current locale. Otherwise, it returns 0. Syntax: #include <wchar.h> int iswalnum (wint_t wc);iswalpha
Returns a nonzero integer if its wide-character argument is classed as an alphabetic character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswalpha (wint_t wc);iswcntrl
Returns a nonzero integer if its wide-character argument is classed as a control character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswcntrl (wint_t wc);iswctype
Returns a nonzero integer if its wide-character argument has a specified property. Otherwise, it returns 0. The specified property (wc_prop) is set by calling the wctype routine. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswctype (wint_t wc, wctype_t wc_prop);iswdigit
Returns a nonzero integer if its wide-character argument is classed as a digit in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswdigit (wint_t wc);iswgraph
Returns a nonzero integer if its wide-character argument is classed as a graphic character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswgraph (wint_t wc);iswprint
Returns a nonzero integer if its wide-character argument is classed as a printing character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswprint (wint_t wc);iswpunct
Returns a nonzero integer if its wide-character argument is classed as a punctuation character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswpunct (wint_t wc);iswspace
Returns a nonzero integer if its wide-character argument is classed as a space character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswspace (wint_t wc);iswupper
Returns a nonzero integer if its wide-character argument is classed as an upppercase character in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswupper (wint_t wc);iswxdigit
Returns a nonzero integer if its wide-character argument is a hexadecimal digit (0 to 9, A to F, or a to f) in the program's current locale. Otherwise, it returns 0. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int iswxdigit (wint_t wc);isxdigit
Returns a nonzero integer if its argument is a hexadecimal digit (0 to 9, A to F, or a to f) in the program's current locale. Syntax: #include <ctype.h> int isxdigit(int character);jrand48
Generate uniformly distributed pseudorandom number sequences. Returns 48-bit signed, long integers. Syntax: #include <stdlib.h> long int jrand48 (unsigned short int xsubi[3]);kill
Sends a signal to a process specified by a process ID (PID). This function does not support the same functionality supported by UNIX* systems. This function is restricted to C and C++ programs that include the main() function. * UNIX is a trademark of The Open Group. Syntax: #include <signal.h> int kill(int pid, int sig);labs
Returns the absolute value of an integer as a long int. Syntax: #include <stdlib.h> long int labs(long int j);lcong48
Initializes a 48-bit uniformly distributed pseudorandom number sequences. Syntax: #include <stdlib.h> void lcong48 (unsigned short int param[7]);ldexp
Returns its first argument multiplied by 2 raised to the power of its second argument. Syntax: #include <math.h> double ldexp(double x, int e);ldiv
Returns the quotient and remainder after the division of its arguments. Syntax: #include <stdlib.h> ldiv_t ldiv(long int numer, long int denom);leaveok
Curses Screen Management macro that signals Curses to leave the cursor at the current coordinates after an update to the window. Syntax: #include <curses.h> leaveok(WINDOW *win, bool boolf);link
Creates a new link (directory entry) for an existing file. Syntax: #include <unistd.h> link(const char *path1, const char *path2);localeconv
Sets the members of a structure of type struct lconv with values appropriate for formatting numeric quantities according to the rules of the current locale. Syntax: #include <locale.h> struct lconv *localeconv(void);localtime, localtime_r
Converts a time (expressed as the number of seconds elapsed since 00:00:00, January 1, 1970) into hours, minutes, seconds, and so on. This function is nonreentrant. localtime_r puts the result into a user-specified tm structure. localtime stores the result into thread-specific static memory allocated by the Compaq C RTL, and which is overwritten by subsequent calls to localtime; you must make a copy if you want to save it. Syntax: #include <time.h> struct tm *localtime(const time_t *timer); struct tm *localtime_r(const time_t *timer, struct tm *result); [posix1]log
Returns the natural (base-e) logarithm of its argument. Syntax: #include <math.h> double log(double x);log10
Returns the base-10 logarithm of its argument. Syntax: #include <math.h> double log10(double x);longjmp
Provides a way to transfer control from a nested series of function invocations back to a predefined point without returning normally; that is, by not using a series of return statements. The longjmp function restores the context of the environment buffer. Syntax: #include <setjmp.h> void longjmp(jmp_buf env, int val);longname
Returns the full name of the terminal. The name parameter is a character-string buffer with a minimum length of 64 characters, and must be large enough to hold the name. Syntax: #include <curses.h> void longname(char *termbuf, char *name);lrand48
Generates uniformly distributed pseudorandom number sequences. Returns 48-bit signed long integers. Syntax: #include <stdlib.h> long int lrand48 (void);lseek
Positions a file to an arbitrary byte position and returns the new position as an int. Syntax: #include <unistd.h> off_t lseek(int file_descriptor, off_t offset, int direction);lwait
Is used to wait for I/O on a specific file to complete. Syntax: #include <stdio.h> int lwait(int fd);malloc
Allocates an area of memory. This function is AST-reentrant. This function allocates a contiguous area of memory whose size, in bytes, is supplied as an argument. The space is not initialized. Syntax: #include <stdlib.h> void *malloc(size_t size); Note: The malloc routines calls the system routine LIB$VM_MALLOC. Because LIB$VM_MALLOC is designed as a general purpose routine to allocate memory, it is called upon in a wide array of scenarios to allocate and reallocate blocks efficiently. The most common usage is the management of smaller blocks of memory, and the most important aspect of memory allocation under these circumstances is efficiency. LIB$VM_MALLOC makes use of its own free space to satisfy requests, once the heap storage is consumed by splitting large blocks and merging adjacent blocks. Memory can still become fragmented, leaving unused blocks. Once heap storage is consumed, LIB$VM_MALLOC manages its own free space and merged blocks to satisfy requests, but varying sizes of memory allocations can cause blocks to be left unused. Because LIB$VM_MALLOC cannot be made to satisfy all situations in the best possible manner, you should perform your own memory management if you have special memory usage needs. This assures the best use of memory for your particular application. The OpenVMS Programming Concepts Manual explains the several memory allocation routines that are available. They are grouped into 3 levels of hierarchy: o At the highest level are the RTL Heap Management Routines LIB$GET_VM and LIB$FREE_VM, which provide a mechanism for allocating and freeing blocks of memory of arbitrary size. Also at this level are the routines based on the concept of zones, such as LIB$CREATE_VM_ZONE, and so on. o At the next level are the RTL Page Management routines LIB$GET_VM_PAGE and LIB$FREE_VM_PAGE, which allocate a specified number of contiguous pages. o At the lowest level are the Memory Management System Services such as $CRETVA and $EXPREG that provide extensive control over address space allocation. Note that at the this level, you must manage the allocation precisely.mblen
Determines the number of bytes comprising a multibyte character. Syntax: #include <stdlib.h> int mblen(const char *s, size_t n);mbstowcs
Converts a sequence of multibyte characters into a sequence of corresponding wide-character codes. Syntax: #include <stdlib.h> size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n);mbtowc
Converts a multibyte character to its wide-character equivalent. Syntax: #include <stdlib.h> int mbtowc(wchar_t *pwc, const char *s, size_t n);mbrlen
Returns the number of multibyte characters in a multibyte character sequence. Syntax: #include <wchar.h> size_t mbrlen (const char *s, size_t n, mbstate_t *ps);mbrtowc
Determines the number of bytes needed to complete the next multibyte character, including shift sequences. Syntax: #include <wchar.h> size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);mbsinit
Determines an initial state conversion. Syntax: #include <wchar.h> int mbsinit (const mbstate_t *ps);mbsrtowcs
Converts a multibyte character sequence to a corresponding wide character sequence. Syntax: #include <wchar.h> size_t mbsrtowcs (wchar_t *dst, const char **src, size_t len, mbstate_t *ps);memccpy
Copies characters sequentially between strings in memory areas. Syntax: #include <string.h> void *memccpy (void *destination_str, void *source_str, int c, size_t n);memchr
Locates the first occurrence of the specified byte within the initial size bytes of a given object. Syntax: #include <string.h> void *memchr (const void *s1, int c, size_t size);memcmp
Compares two objects, byte by byte. The compare operation starts with the first byte in each object. It returns an integer less than, equal to, or greater than 0, depending on whether the lexical value of the first object is less than, equal to, or greater than that of the second object. Syntax: #include <string.h> int memcmp (const void *s1, const void *s2, size_t size);memcpy
Copies a specified number of bytes from one object to another. Use memmove rather than memcpy if the area pointed to by the destination string could overlap the area pointed to by the source string; memmove safely handle copies between overlapping objects; memcpy gives undefined behavior. Syntax: #include <string.h> void *memcpy (void *destination_str, const void *source_str, size_t size);memmove
Copies a specified number of bytes from one object to another. Use memmove rather than memcpy if the area pointed to by the destination string could overlap the area pointed to by the source string; memmove safely handle copies between overlapping objects; memcpy gives undefined behavior. Syntax: #include <string.h> void *memmove(void *destination_str, const void *source_str, size_t size);memset
Sets a specified number of bytes in a given object to a given value. memset copies value (converted to an unsigned char) into each of the first size characters of the object pointed to by s. Syntax: #include <string.h> void *memset (void *s, int value, size_t size);mkdir
Creates a directory. Syntax: #include <stat.h> int mkdir(const char *dir_spec, mode_t mode); (POSIX-1) int mkdir(const char *dir_spec, mode_t mode,...); (Compaq C Extension) where the ... represents the following optional arguments. These arguments have fixed position in the argument list, and cannot be arbitrarily placed. o unsigned int uic o unsigned short max_versions o unsigned short r_v_numbermkstemp
Constructs a unique filename. Syntax: #include <stdlib.h> int mkstemp (char *template);mktemp
Creates a unique file name from a template that you supply. Syntax: #include <stdlib.h> char *mktemp(char *template);mktime
Converts the local time structure to a calendar time value. Syntax: #include <time.h> time_t mktime(struct tm *timeptr);mmap
Maps a file system object into virtual memory. Syntax: #include <types.h> #include <mman.h> void mmap (void *addr, size_t len, int prot, int flags, int filedes, off_t off); [xopen/posix-1] size_t len, int prot, int flags, int filedes, off_t off...); [Compaq C extension]modf
Returns the positive fractional part of its first argument and assigns the integer part, expressed as an object of type double, to the object whose address is specified by the second argument. Syntax: #include <math.h> double modf(double value, double *iptr);[w]move
Curses Screen Management function and macro that change the current cursor position on the specified window to the coordinates (y,x). The move macro acts on the stdscr window. Syntax: #include <curses.h> int move(int y, int x); int wmove(WINDOW *win, int y, int x);mprotect
Modifies access protections of memory mapping. Syntax: #include <mman.h> int mprotect (void *addr, size_t len, int prot);mrand48
Generate uniformly distributed pseudorandom number sequences. Returns 48-bit signed long integers. Syntax: #include <stdlib.h> long int mrand48 (void);msync
Synchronizes a mapped file. Syntax: #include <mman.h> int msync (void *addr, size_t len, int flags);munmap
Unmaps a mapped region. Syntax: #include <mman.h> int munmap (void *addr,size_t len);mv[w]addch
Curses Screen Management macros that move the cursor to coordinates (y,x) and add the character ch to the specified window. The mvaddch macro acts on the stdscr window. Syntax: #include <curses.h> int mvaddch(int y, int x, char ch); int mvwaddch(WINDOW *win, int y, int x, char ch);mv[w]addstr
Curses Screen Management macros that move the cursor to coordinates (y,x) and add the specified string, to which str points, to the specified window. The mvaddstr macro acts on the stdscr window. Syntax: #include <curses.h> int mvaddstr(int y, int x, char *str); int mvwaddstr(WINDOW *win, int y, int x, char *str);mvcur
Curses Screen Management macro that moves the terminal's cursor from (lasty,lastx) to (newy,newx). Syntax: #include <curses.h> int mvcur(int lasty, int lastx, int newy, int newx);mv[w]delch
Curses Screen Management macros that move the cursor to coordinates (y,x) and delete the character on the specified window. The mvdelch macro acts on the stdscr window. Syntax: #include <curses.h> int mvdelch(int y, int x); int mvwdelch(WINDOW *win, int y, int x);mv[w]getch
Curses Screen Management macros that move the cursor to coordinates (y,x), get a character from the terminal screen, and echo it on the specified window. The mvgetch macro works on the stdscr window. Syntax: #include <curses.h> int mvgetch(int y, int x); int mvwgetch(WINDOW *win, int y, int x);mv[w]getstr
Curses Screen Management macros that move the cursor to coordinates (y,x), get a string from the terminal screen, and echo it on the specified window. The mvgetstr macro acts on the stdscr window. Syntax: #include <curses.h> int mvgetstr(int y, int x, char *str); int mvwgetstr(WINDOW *win, int y, int x, char *str);mv[w]inch
Curses Screen Management macros that move the cursor to coordinates (y,x) and return the character on the specified window without making changes to the window. The mvinch macro acts on the stdscr window. Syntax: #include <curses.h> int mvinch(int y, int x); int mvwinch(WINDOW *win, int y, int x);mv[w]insch
Curses Screen Management macros that move the cursor to coordinates (y,x) and insert the character ch in the specified window. The mvinsch macro acts on the stdscr window. Syntax: #include <curses.h> int mvinsch(int y, int x, char ch); int mvwinsch(WINDOW *win, int y, int x, char ch);mv[w]insstr
Curses Screen Management macros that move the cursor to coordinates (y,x) and insert a string on the specified window. The mvinsstr macro acts on the stdscr window. Syntax: #include <curses.h> int mvinsstr(int y, int x, char *str); int mvwinsstr(WINDOW *win, int y, int x, char *str);mvwin
Curses Screen Management macro that moves the starting position of the window to the specified (y,x) coordinates. Syntax: #include <curses.h> int wvwin(WINDOW *win, int y, int x);newwin
Curses Screen Management routine that creates a new window with numlines lines and numcols columns starting at the coordinates (begin_y, begin_x) on the terminal screen. Syntax: #include <curses.h> WINDOW *newwin(int numlines, int numcols, int begin_y, int begin_x);nice
Increments or decrements the process priority relative to the process current priority by the amount of the argument. A negative argument increments the priority; a positive argument decrements it. Issuing nice(0) restores the base priority. The resulting priority cannot be less than 1, or greater than the process's base priority. This function is nonreentrant. Syntax: #include <unistd.h> nice(int increment);[no]nl
This function and macro are provided for UNIX* software compability and have no OpenVMS function. ---------- * UNIX is a trademark of The Open Group.nl_langinfo
Returns a pointer to a string that contains information obtained from the program's current locale. Syntax: #include <langinfo.h> char *nl_langinfo (nl_item item);nrand48
Generate uniformly distributed pseudorandom number sequences. Returns 48-bit signed long integers. Syntax: #include <stdlib.h> long int nrand48 (unsigned short int xsub[3]);open
Opens a file for reading, writing, or editing. It positions the file at its beginning (byte 0). Syntax: #include <fcntl.h> int open(const char *file_spec, int flags, mode_t mode); (ANSI C) int open(const char *file_spec, int flags,...); (CEC C Extension) where the ... represents optional file attribute arguments. The file attribute arguments are the same as those used in the creat function.opendir
Opens a specified directory. Syntax: #include <dirent.h> DIR *opendir (const char *dir_name);overlay
Curses Screen Management routine that superimposes win1 on win2. The function writes the contents of win1 that will fit onto win2 beginning at the starting coordinates of both windows. Blanks on win1 leave the contents of the corresponding space on win2 unaltered. The overlay function copies as much of the window's box as possible. Syntax: #include <curses.h> int overlay(WINDOW *win1, WINDOW *win2);overwrite
Curses Screen Management routine that destructively overwrites the contents of win1 on win2. Syntax: #include <curses.h> int overwrite(WINDOW *win1, WINDOW *win2);pause
Suspends the calling process until delivery of a signal whose action is either to execute a signal-catching function or to terminate the process. Syntax: #include <unistd.h> int pause(void)pathconf
Retrieves file implementation characteristics. Syntax: #include <unistd.h> long int pathconf (const char *path, int name);pclose
Closes a pipe to a process. Syntax: #include <stdio.h> int pclose (FILE *stream);perror
Writes a short message to stderr describing the last error encountered during a call to the Compaq C RTL from a C program. Syntax: #include <stdio.h> void perror(const char *string);pipe
Creates a temporary mailbox. You must use a mailbox to read and write data between the parent and child. The channels through which the processes communicate are called a pipe. Syntax: #include <unistd.h> int pipe(int file_descriptor[2]); (POSIX-1) int pipe(int file_descriptor[2],...); (Compaq C Extension) where: file_descriptor[2] - is an array of file descriptors. A pipe is implemented as an array of file descriptors associated with a mailbox. These mailbox descriptors are special in that these are the only file descriptors which, when passed to the isapipe function, will return 1. Element 0 of the file_descriptor array contains the descriptor for reading; element 1 contains the descriptor for writing. .. represents two optional arguments: flags - If either the O_NDELAY or O_NONBLOCK bit is set, the I/O operations to the mailbox through the specified file descriptors will terminate immediately, rather than waiting for another process. If, for example, the O_NDELAY bit is set and the child issues a read request to the mailbox before the parent has put any data into it, the read terminates immediately with zero status. If neither the O_NDELAY nor O_NONBLOCK bit is set, the child will be waiting on the read until the parent writes any data into the mailbox. This is the default behavior if no flag argument is specified. The values of O_NDELAY and O_NONBLOCK are defined in the <fcntl.h> header file. Any other bits in the flag argument are ignored. You must specify this argument if the second optional, positional argument bufsize is specified. If the flag argument is needed only to allow specification of the bufsize argument, specify flag as zero. bufsize -- specifies the size of the mailbox, in bytes. If you do not specify this argument, a mailbox is created with a default size of 512 bytes.popen
Initiates a pipe to a process. Syntax: #include <stdio.h> FILE *popen (const char *command, const char *type);pow
Returns the first argument raised to the power of the second argument. Syntax: #include <math.h> double pow(double base, double exp);printf
Performs formatted output to the standard output (stdout). Syntax: #include <stdio.h> int printf(const char *format_string,...); where the ... represents optional expressions whose resultant types correspond to conversion specifications given in the format specification. If no conversion specifications are given, you may omit the output sources. Otherwise, the function call must have exactly as many output sources as there are conversion specifications, and the conversion specifications must match the types of the output sources. Conversion specifications are matched to output sources in left-to-right order. The format string for the output of information can contain two kinds of items: o Ordinary characters, which are copied to the output. o Conversion specifications, each of which causes the conversion of a corresponding output source to a character string in a particular format. Conversion specifications are matched to output sources in left-to-right order. A conversion specification consists of a % (or a %n$), followed by one or more optional characters, and concluding with a conversion specifier.
Additional Information on:
[w]printw
Curses Screen Management function and macro that perform a printf in the specified window starting at the current position of the cursor. The printw macro acts on the stdscr window. Syntax: #include <curses.h> printw(char *format_string,...); int wprintw(WINDOW *win, char *format_string,...); where the ... represents optional expressions whose resultant types correspond to conversion specifications given in the format specification. If no conversion specifications are given, you may omit the output sources. Otherwise, the function call must have exactly as many output sources as there are conversion specifications, and the conversion specifications must match the types of the output sources. Conversion specifications are matched to output sources in left-to-right order. The format string for the output of information can contain two kinds of items: o Ordinary characters, which are copied to the output. o Conversion specifications, each of which causes the conversion of a corresponding output source to a character string in a particular format. Conversion specifications are matched to output sources in left-to-right order. A conversion specification consists of a % (or a %n$), followed by one or more optional characters, and concluding with a conversion specifier.
Additional Information on:
putc
Writes characters to a specified file. Syntax: #include <stdio.h> int putc(int character, FILE *file_pointer);putchar
Writes a single character to the standard output (stdout) and returns the character. Syntax: #include <stdio.h> int putchar(int character);putenv
Set an environmental variable. Syntax: #include <stdlib.h> int putenv (const char *string);puts
Writes a character string to the standard output (stdout) followed by a new-line. Syntax: #include <stdio.h> int puts(const char *string);putw
Writes characters to a specified file. Syntax: #include <stdio.h> int putw(int integer, FILE *file_pointer);putwc
Converts a wide character to its corresponding multibyte value, and writes the result to a specified file. Syntax: #include <wchar.h> wint_t putwc(wint_t wc FILE *file_pointer);putwchar
Writes a wide character to the standard output (stdout) and returns the character. Syntax: #include <wchar.h> wint_t putwchar(wint_t wc);qsort
Sorts an array of objects in place. It implements the quick-sort algorithm. Syntax: #include <stdlib.h> void qsort (void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *));raise
Generates a specified software signal. Generating a signal causes the action routine established by the signal, ssignal, or sigvec function to be invoked. Syntax: #include <signal.h> int raise(int sig); (ANSI C) int raise(int sig[, int sigcode]); (Compaq C Extension)rand
Returns pseudorandom numbers in the range 0 to (2**31-1). Syntax: #include <math.h> int rand(void);random
Generates pseudorandom numbers in a more random sequence. Syntax: #include <stdlib.h> long int random (void);[no]raw
Curses Screen Management macros that set and unset the terminal to and from raw mode. The raw function performs the same task as the crmode macro except that raw does not imply nonl. These macros only work with [w]getch and [w]getstr. Syntax: #include <curses.h> raw() noraw()read
Reads bytes from a file and places them in a buffer. Syntax: #include <unistd.h> ssize_t read(int file_descriptor, void *buffer, size_t nbytes); (POSIX-1) int read(int file_descriptor, void *buffer, int nbytes); (Compatibility)readdir
Finds entries in a directory. Syntax: #include <dirent.h> struct dirent *readdir (DIR *dir_pointer);realloc
Changes the size of the area pointed to by the first argument to the number of bytes given by the second argument. This function is AST-reentrant. Syntax: #include <stdlib.h> void *realloc(void *pointer, size_t size);[w]refresh
Curses Screen Management function and macro that repaint the specified window on the terminal screen. The refresh macro acts on the stdscr window. Syntax: #include <curses.h> int refresh(); int wrefresh(WINDOW *win);remove
Deletes a file. Syntax: #include <stdio.h> int remove (const char *file-spec);rename
Gives a new name to an existing file. Syntax: #include <stdio.h> int rename (const char *old_file_spec, const char *new_file_spec);rewind
Sets the file to its beginning. Syntax: #include <stdio.h> void rewind(FILE *file_pointer); (POSIX-1) int rewind(FILE *file_pointer); (Compaq C Extension)rewinddir
Resets the position of the specified directory stream to the beginning. Syntax: #include <dirent.h> void rewinddir (DIR *dir_pointer);rindex
Searches for character in string. Syntax: #include <strings.h> char *rindex (const char *s, int c);rmdir
Removes a directory file. Syntax: #include <unistd.h> int rmdir (const char *path);sbrk
Determines the lowest virtual address that is not used with the program. Syntax: #include <unistd.h> void *sbrk(long int incr);scanf
Performs formatted input from the standard input (stdin). Syntax: #include <stdio.h> int scanf(const char *format_string,...); where the ... represents optional expressions that are pointers to objects whose resultant types correspond to conversion specifications given in the format_string. If no conversion specifications are given, you may omit these input pointers. Otherwise, the function call must have at least as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers. Conversion specifications are matched to input sources in left-to-right order. Excess input pointers, if any, are ignored. The format string for the input of information can include three kinds of items: o White-space characters (spaces, tabs, and new-line characters), which match optional white-space characters in the input field. o Ordinary characters (not %), which must match the next nonwhite-space character in the input. o Conversion specifications, which govern the conversion of the characters in an input field and their assignment to an object indicated by a corresponding input pointer. A conversion specification consists of the following characters, in the order listed: o A percent character (%) or the sequence %n$ (where n is an integer). The sequence %n$ denotes that the conversion is applied to the nth input pointer listed, where n is a decimal integer between [1, NL_ARGMAX] (see the <limits.h> header file). For example, a conversion specification beginning %5$ means that the conversion will be applied to the 5th input pointer listed after the format specification. The sequence %$ is invalid. If the conversion specification does not begin with the sequence %n$ the conversion specification is matched to its input pointer in left-to-right order. You should only use one type of conversion specification (% or %n$) in a format specification. o One or more optional characters o A conversion specifier.
Additional Information on:
[w]scanw
Curses Screen Management function and macro that perform a scanf on the window. The scanw macro acts on the stdscr window. Syntax: #include <curses.h> int scanw(char *format_string,...); int wscanw(WINDOW *win, char *format_string,...); where the ... represents optional expressions that are pointers to objects whose resultant types correspond to conversion specifications given in the format specification. If no conversion specifications are given, you may omit these input pointers. Otherwise, the function call must have at least as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers. Conversion specifications are matched to input sources in left-to-right order. Excess input pointers, if any, are ignored. The format string for the input of information can include three kinds of items: o White-space characters (spaces, tabs, and new-line characters), which match optional white-space characters in the input field. o Ordinary characters (not %), which must match the next nonwhite-space character in the input. o Conversion specifications, which govern the conversion of the characters in an input field and their assignment to an object indicated by a corresponding input pointer. Each input pointer is an address expression indicating an object whose type matches that of a corresponding conversion specification. Conversion specifications form part of the format string. The indicated object is the target that receives the input value. There must be as many input pointers as there are conversion specifications, and the addressed objects must match the types of the conversion specifications. A conversion specification consists of the following characters, in the order listed: o A percent character (%) or the sequence %n$ (where n is an integer). The sequence %n$ denotes that the conversion is applied to the nth input pointer listed, where n is a decimal integer between [1, NL_ARGMAX] (see the <limits.h> header file). For example, a conversion specification beginning %5$ means that the conversion will be applied to the 5th input pointer listed after the format specification. The sequence %$ is invalid. If the conversion specification does not begin with the sequence %n$ the conversion specification is matched to its input pointer in left-to-right order. You should only use one type of conversion specification (% or %n$) in a format specification. o One or more optional characters o A conversion specifier.
Additional Information on:
scroll
Curses Screen Management routine that moves all the lines on the window up one line. The top line scrolls off the window and the bottom line becomes blank. Syntax: #include <curses.h> int scroll(WINDOW *win);scrollok
Curses Screen Management macro that sets the scroll flag for the specified window. Syntax: #include <curses.h> scrollok(WINDOW *win, bool boolf);seed48
Initializes a 48-bit random number generator. Syntax: #include <stdlib.h> unsigned short *seed48 (unsigned short seed_16v[3]);seekdir
Sets the position in a directory to a specified directory entry. Performs operations on directories. Syntax: #include <dirent.h> void seekdir (DIR *dir_pointer, long int location);[w]setattr
Curses Screen Management function and macro that activate the video display attributes boldface, blinking, reverse video, and underlining within the window. The attributes are represented by _BOLD, _BLINK, _REVERSE, and _UNDERLINE. The setattr macro acts on the stdscr window. Syntax: #include <curses.h> int setattr(int attr); wsetattr(WINDOW *win, int attr);setbuf
Associates a buffer with an input or output file. Syntax: #include <stdio.h> void setbuf(FILE *file_pointer, char *buffer);setenv
Inserts or resets the environment variable name in the current environment list. Syntax: #include <stdlib.h> int setenv (const char *name, const char *value, int overwrite);setgid
Implemented for program portability and serves no function. It returns 0 (to indicate success). Syntax: #include <unistd.h> _DECC_V4_SOURCE defined: int setgid(__gid_t group_number); _DECC_V4_SOURCE not defined: gid_t setgid(gid_t group_number);setitimer
Sets the value of interval timers. Syntax: #include <time.h> #define ITIMER_REAL 0 #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 int setitimer (int which, struct itimerval *value, struct itimerval *ovalue);setjmp
Provides a way to transfer control from a nested series of function invocations back to a predefined point without returning normally; that is, by not using a series of return statements. The setjmp function saves the context of the environment buffer. Syntax: #include <setjmp.h> int setjmp(jmp_buf env);setlocale
Selects the appropriate portion of the program's locale as specified by the category and locale arguments. This function can be used to change or query one category or the program's entire current locale. Syntax: #include <locale.h> char *setlocale(int category, const char *locale);setstate
Restarts, and changes random number generators. Syntax: char *setstate (char *state);setuid
Implemented for program portability and serves no function. It returns 0 (to indicate success). Syntax: #include <unistd.h> _DECC_V4_SOURCE defined: int setuid(__uid_t member_number); _DECC_V4_SOURCE not defined: uid_t setuid(uid_t member_number);setvbuf
Associates a buffer with an input or output file. Syntax: #include <stdio.h> int setvbuf (FILE *file_ptr, char *buffer, int type, size_t size);sigaction
Specifies the action to take upon delivery of a signal. Syntax: #include <signal.h> int sigaction (int signal, const struct sigaction *action, struct sigaction *o_action);sigaddset
Adds the specified individual signal. Syntax: #include <signal.h> int sigaddset (sigset_t *set, int sig_number);sigblock
Causes the signals designated in a mask to be added to the current set of signals being blocked from delivery. Syntax: #include <signal.h> int sigblock(int mask);sigdelset
Deletes a specified individual signal. Syntax: #include <signal.h> int sigdelset (sigset_t *set, int sig_number);sigemptyset
Initializes the signal set to exclude all signals. Syntax: #include <signal.h> int sigemptyset (sigset_t *set);sigfillset
Initializes the signal set to include all signals. Syntax: #include <signal.h> int sigfillset (sigset_t *set);sigismember
Tests whether a specified signal is a member of the signal set. Syntax: #include <signal.h> int sigismember (const sigset_t *set, int sig_number);siglongjmp
Nonlocal goto with signal handling. Syntax: #include <signal.h> void siglongjmp (sigjmp_buf env, int value);sigmask
Constructs the mask for a given signal number. Syntax: #include <signal.h> int sigmask (signum)signal
Allows you to specify the way in which the signal sig is to be handled: use the default handling for the signal, ignore the signal, or call the signal handler at the address specified. Syntax: #include <signal.h> void (*signal(int sig, void (*func) (int))) (int);sigpause
Assigns mask to the current set of masked signals and then waits for a signal. Syntax: #include <signal.h> int sigpause(int mask);sigpending
Examines pending signals. Syntax: #include <signal.h> int sigpending (sigset_t *set);sigprocmask
Sets the current signal mask. Syntax: #include <signal.h> int sigprocmask (int how, const sigset_t *set, sigset_t *o_set);sigsetjmp
Sets jump point for a nonlocal goto. Syntax: #include <signal.h> int sigsetjmp (sigjmp_buf env, int savemask);sigsetmask
Establishes those signals that are blocked from delivery. Syntax: #include <signal.h> int sigsetmask(int mask);sigstack
Defines an alternate stack on which to process signals. This allows the processing of signals in a separate environment from that of the current process. This function is nonreentrant. Syntax: #include <signal.h> int sigstack(struct sigstack *ss, struct sigstack *oss);sigsuspend
Atomically changes the set of blocked signals and waits for a signal. Syntax: #include <signal.h> int sigsuspend (const sigset_t *signal_mask);sigvec
Permanently assigns a handler for a specific signal. Syntax: #include <signal.h> int sigvec(int sigint, struct sigvec *sv, struct sigvec *osv);sin
Returns the sine of its radian argument. Syntax: #include <math.h> double sin(double x);sinh
Returns the hyperbolic sine of its argument. Syntax: #include <math.h> double sinh(double x);sleep
Suspends the execution of the current process for at least the number of seconds indicated by its argument. Syntax: #include <unistd.h> _DECC_V4_SOURCE defined: unsigned int sleep(unsigned seconds); _DECC_V4_SOURCE not defined: int sleep(unsigned seconds);sprintf
Performs formatted output to a string in memory. Syntax: #include <stdio.h> int sprintf(char *string, const char *format_string,...); where the ... represents optional expressions whose resultant types correspond to conversion specifications given in the format specification. If no conversion specifications are given, you may omit the output sources. Otherwise, the function calls must have at least as many output sources as there are conversion specifications, and the conversion specifications must match the types of the output sources. Conversion specifications are matched to output sources in left-to-right order. The format string for the output of information can contain two kinds of items: o Ordinary characters, which are copied to the output. o Conversion specifications, each of which causes the conversion of a corresponding output source to a character string in a particular format. Conversion specifications are matched to output sources in left-to-right order. A conversion specification consists of a % (or a %n$), followed by one or more optional characters, and concluding with a conversion specifier.
Additional Information on:
sqrt
Returns the square root of its argument. Syntax: #include <math.h> double sqrt(double x);srand
Initializes the pseudorandom number generator. Syntax: #include <math.h> void srand(unsigned int seed);srand48
Initializes a 48-bit random number generator. Syntax: #include <stdlib.h> void srand48 (long int seed_val);srandom
Uses its argument as a seed for a new sequence of pseudorandom numbers to be returned by subsequent calls to the random function. Syntax: int srandom (unsigned seed);sscanf
Performs formatted input from a character string in memory. Syntax: #include <stdio.h> int sscanf(const char *string, const char *format_string,...); where the ... represents optional expressions that are pointers to objects whose resultant types correspond to conversion specifications given in the format_string. If no conversion specifications are given, you can omit the input pointers. Otherwise, the function calls must have at least as many input pointers as there are conversion specifications, and the conversion specifications must match the types of the input pointers. Conversion specifications are matched to input sources in left-to-right order. The format string for the input of information can include three kinds of items: o White-space characters (spaces, tabs, and new-line characters), which match optional white-space characters in the input field. o Ordinary characters (not %), which must match the next nonwhite-space character in the input. o Conversion specifications, which govern the conversion of the characters in an input field and their assignment to an object indicated by a corresponding input pointer. A conversion specification consists of the following characters, in the order listed: o A percent character (%) or the sequence %n$ (where n is an integer). The sequence %n$ denotes that the conversion is applied to the nth input pointer listed, where n is a decimal integer between [1, NL_ARGMAX] (see the <limits.h> header file). For example, a conversion specification beginning %5$ means that the conversion will be applied to the 5th input pointer listed after the format specification. The sequence %$ is invalid. If the conversion specification does not begin with the sequence %n$ the conversion specification is matched to its input pointer in left-to-right order. You should only use one type of conversion specification (% or %n$) in a format specification. o One or more optional characters o A conversion specifier.
Additional Information on:
ssignal
Allows you to specify the action to take when a particular signal is raised. Syntax: #include <signal.h> void (*ssignal (int sig, void (*func) (int,...))) (int,...);[w]standend
Curses Screen Management function and macro that deactivate the boldface attribute for the specified window. The standend macro acts on the stdscr window. Syntax: #include <curses.h> int standend(void); int wstandend(WINDOW *win);[w]standout
Curses Screen Management function and macro that activate the boldface attribute of the specified window. The standout macro acts on the stdscr window. Syntax: #include <curses.h> int standout(void); int wstandout(WINDOW *win);stat
Accesses information about the file descriptor or the file specification. Syntax: #include <stat.h> int stat(const char *file_spec, struct stat *buffer); (POSIX-1) int stat(const char *file_spec, struct stat *buffer,...); (Compaq C Extension)strcasecmp
Compares two 7 bit ASCII strings with the case insensitive. Syntax: #include <strings.h> int strcasecmp (const char *s1, const char *s2);strcat
Concatenates str_2, including the terminating null character, to the end of str_1. Syntax: #include <string.h> char *strcat(char *str_1, const char *str_2);strchr
Returns the address of the first occurrence of a given character in a null-terminated string. The terminating null character is considered to be part of the string. Syntax: #include <string.h> char *strchr(const char *string, int character);strcoll
Compares two strings and returns an integer that indicates if the strings differ and how they differ. The function uses the collating information in the LC_COLLATE category of the current locale to determine how the comparison is performed. Syntax: #include <string.h> int strcoll(const char *str_1, const char *str_2);strcmp
Compares two ASCII character strings and returns a negative, 0, or positive integer, indicating that the ASCII values of the individual characters in the first string are less then, equal to, or greater than the values in the second string. Syntax: #include <string.h> int strcmp(const char *str_1, const char *str_2);strcpy
Copies all of source_str, including the terminating null character, into destination_str. Syntax: #include <string.h> char *strcpy(char *destination_str, const char *source_str);strcspn
Returns the length of the prefix of a string that consists entirely of characters that are not in a specified set of characters. Syntax: #include <string.h> size_t strcspn(const char *str, const char *charset);strdup
Finds and points to a duplicate string. Syntax: #include <string.h> char *strdup (const char *s1);strerror
Maps the error number in error_code to a locale-dependent error message string. Syntax: #include <string.h> char *strerror (int error_code); (ANSI C) char *strerror (int error_code [,int vms_error_code]); (Compaq C Extension) {Relaxed ANSI and VAXC modes only} This function uses the error number in error_code to retrieve the appropriate locale-dependent error message. The contents of the error message strings are determined by the LC_MESSAGES category of the program's current locale. For Compaq C (not Compaq C++) in relaxed ANSI mode or VAXC mode, strerror has a second argument (vms_error_code), which is used in the following way: o If error_code is EVMSERR and there is a second argument, then that second argument is used as the VAXC$ERRNO value. o If error_code is EVMSERR and there is no second argument, look at VAXC$ERRNO to get the OpenVMS error condition. Use of the second argument is not included in the ANSI C definition of strerror and is, therefore, not portable.strfmon
Converts a number of monetary values into a string. The conversion is controlled by a format string. Syntax: #include <monetary.h> size_t strfmon (char *s, size_t maxsize, const char *format, ...);strftime
Uses date and time information stored in a tm structure to create an output string. The format of the output string is controlled by a format string. Syntax: #include <time.h> size_t strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr);strlen
Returns the length of a string of ASCII characters. The returned length does not include the terminating null character (\0). Syntax: #include <string.h> size_t strlen(const char *str);strncasecmp
Compares two 7 bit ASCII strings for case and size, with case insensitivity. Syntax: #include <strings.h> int strncasecmp (const char *s1, const char *s2, size_t n);strncat
Appends not more than maxchar characters from str_2 to the end of str_1. Syntax: #include <string.h> char *strncat(char *str_1, const char *str_2, size_t maxchar);strncmp
Compares not more than maxchar characters of two ASCII character strings and returns a negative, 0, or positive integer, indicating that the ASCII values of the individual characters in the first string are less than, equal to, or greater than the values in the second string. Syntax: #include <string.h> int strncmp(const char *str_1, const char *str_2, size_t maxchar);strncpy
Copies all or part of source_str into destination_str. Syntax: #include <string.h> char *strncpy(char *destination_str, const char *source_str, size_t maxchar);strnlen
Returns the number of bytes in the string pointed to by s. The string length value does not include the terminating null character. The strnlen function counts bytes until the first null byte or until n bytes have been examined. Syntax: #include <string.h> size_t strnlen(const char *s, size_t n);strpbrk
Searches a string for the occurrence of one of a specified set of characters. Syntax: #include <string.h> char *strpbrk(const char *str, const char *charset);strptime
Converts a character string into date and time values stored in a tm structure. Conversion is controlled by a format string. Syntax: #include <time.h> char *strptime (const char *buf, const char *format, struct tm *timeptr);strrchr
Returns the address of the last occurrence of a given character in a null-terminated string. The terminating null character is considered to be part of the string. Syntax: #include <string.h> char *strrchr(const char *string, int character);strsep
Separates strings. Syntax: #include <string.h> char *strsep (char **stringp, char *delim);strspn
Searches a string for the occurrence of a character that is not in a specified set of characters. Syntax: #include <string.h> size_t strspn(const char *str, const char *charset);strstr
Locates the first occurrence in the string pointed to by s1 of the sequence of characters in the string pointed to by s2. Syntax: #include <string.h> char *strstr(const char *s1, const char *s2);strtod
Converts a given string to a double-precision number. Syntax: #include <stdlib.h> double strtod (const char *nptr, char **endptr);strtok
Locates text tokens in a given string. Syntax: #include <string.h> char *strtok (char *s1, const char *s2);strtol
Converts strings of ASCII characters to the appropriate numeric values. Syntax: #include <stdlib.h> long int strtol (const char *nptr, char **endptr, int base);strtoul
Converts the initial portion of the string pointed to by nptr to an unsigned long integer. Syntax: #include <stdlib.h> unsigned long int strtoul (const char *nptr, char **endptr, int base);strxfrm
Changes a string such that the changed string can be passed to the strcmp function and produce the same result as passing the unchanged string to the strcoll function. Syntax: #include <string.h> size_t strxfrm(char *s1, const char *s2, size_t maxchar);subwin
Curses Screen Management routine that creates a new subwindow with numlines lines and numcols columns starting at the coordinates (begin_y, begin_x) on the terminal screen. Syntax: #include <curses.h> WINDOW *subwin(WINDOW *win, int numlines, int numcols, int begin_y, int begin_x);swab
Swaps bytes. Syntax: #include <unistd.h> void swab (const void *src, void *dest, ssize_t nbytes);swprintf
Formats output to an array of wide characters. Syntax: #include <wchar.h> int swprintf (wchar_t *s, size_t n, const wchar_t *format, ...);swscanf
Formats input to a wide string input. Syntax: #include <wchar.h> int swscanf (const wchar_t *s, const wchar_t *format, ...);sysconf
Gets configurable system variables. Syntax: #include <unistd.h> long int sysconf (int name);system
Passes a given string to the host environment to be executed by a command processor. This function is nonreentrant. Syntax: #include <stdlib.h> int system (const char *string);tan
Returns a double value that is the tangent of its radian argument. Syntax: #include <math.h> double tan(double x);tanh
Returns a double value that is the hyperbolic tangent of its double argument. Syntax: #include <math.h> double tanh(double x);telldir
Returns the current location associated with a specified directory stream. Performs operations on directories. Syntax: #include <dirent.h> long int telldir (DIR *dir_pointer);tempnam
Constructs the name for a temporary file. Syntax: #include <stdio.h> char *tempnam (const char *directory, const char *prefix);time
Returns the time elapsed on the system since 00:00:00 January 1, 1970, in seconds. Syntax: #include <time.h> time_t time(time_t *time_location);times
Passes back the accumulated times of the current process and its terminated child processes. This function is nonreentrant. Syntax: #include <times.h> clock_t times (struct tms *buffer); (POSIX-1) void times (tbuffer_t *buffer); (Compatibility)tmpfile
Creates a temporary file that is opened for update. Syntax: #include <stdio.h> FILE *tmpfile(void);tmpnam
Creates a character string that you can use in place of the file-name argument in other function calls. Syntax: #include <stdio.h> char *tmpnam(char *name);toascii
Converts its argument, an 8-bit ASCII character, to a 7-bit ASCII character. Syntax: #include <ctype.h> int toascii(char character);tolower, _tolower
Convert their argument, a character, to lowercase. If the argument is not an uppercase character, it is returned unchanged. Syntax: #include <ctype.h> int tolower(int character); int _tolower(int character);touchwin
Curses Screen Management routine that places the most recently edited version of the specified window on the terminal screen. Syntax: #include <curses.h> int touchwin(WINDOW *win);toupper, _toupper
Convert their argument, a character, to uppercase. If the argument is not a lowercase character, it is returned unchanged. Syntax: #include <ctype.h> int toupper(int character); int _toupper(int character);towctrans
Maps one wide character to another according to a specified mapping descriptor. Syntax: #include <wctype.h> wint_t towctrans (wint_t wc, wctrans_t desc);towlower
Converts the argument, a wide character, to lowercase. If the argument is not an uppercase character, it is returned unchanged. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int towlower(wint_t wc);towupper
Converts the argument, a wide character, to uppercase. If the argument is not a lowercase character, it is returned unchanged. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) int towupper(wint_t wc);truncate
Changes file length to a specified length in bytes. Syntax: #include <unistd.h> int truncate (const char *path, off_t length);ttyname
Returns a pointer to the null-terminated name of the terminal device associated with file descriptor 0, the default input device (stdin). Syntax: #include <unixio.h> char *ttyname(void);tzset
Sets and accesses timezone conversion. Syntax: #include <time.h> void tzset (void): extern int daylight; extern long timezone; extern char *tzname[];ualarm
Sets or changes the timeout of interval timers. Syntax: #include <unistd.h> useconds_t ualarm (useconds_t mseconds, useconds_t interval);umask
Creates a file protection mask that is used when a new file is created and returns the previous mask value. Syntax: #include <stat.h> mode_t umask(mode_t mode_complement);uname
Gets system identification information. Syntax: #include <utsname.h> int uname (struct utsname *name);ungetc
Pushes a character back into the input stream and leaves the stream positioned before the character. Syntax: #include <stdio.h> int ungetc(int character, FILE *file_pointer);ungetwc
Pushes a wide character back into the input stream and leaves the stream positioned before the character. Syntax: #include <wchar.h> wint_t ungetwc(wint_t wc, FILE *file_pointer);unsetenv
Deletes all instances of the variable name pointed to the name from the environment list. Syntax: #include <stdlib.h> void unsetenv (const char *name);usleep
Suspends execution for an interval. Syntax: #include <unistd.h> int usleep (unsigned int mseconds);utime
Sets file access and modification times. Syntax: #include <types.h> int utime (const char *path, const struct utimbuf *times);utimes
Sets file access and modification times. Syntax: #include <time.h> int utimes (const char *path, const struct timeval *times[2]);va_arg
Returns the next item in the argument list. Syntax: #include <stdarg.h> (ANSI C) #include <varargs.h> (Compaq C Extension) type va_arg(va_list ap, type);va_count (Compaq C Extension)
Returns the number of longwords in the argument list. Syntax: #include <stdarg.h> OR #include <varargs.h> (Compaq C Extension) void va_count(int *count);va_end
Finishes the varargs or stdarg session. Syntax: #include <stdarg.h> (ANSI C) #include <varargs.h> (Compaq C Extension) void va_end(va_list ap);va_start
Initializes a variable to the beginning of the argument list. Syntax: Nonportable format: #include <varargs.h> (Compaq C Extension) void va_start(va_list ap); Portable format: #include <stdarg.h> (ANSI C) void va_start(va_list ap, parmN);va_start_1
Initializes a variable to the beginning of the argument list. Syntax: #include <varargs.h> (Compaq C Extension) void va_start_1(va_list ap, int offset);VAXC$CRTL_INIT
Allows you to call the Compaq C RTL from other languages. It initializes the run-time environment and establishes both an exit and condition handler. VAXC$CRTL_INIT is a synonym for decc$crtl_init. Either name invokes the same routine. Syntax: #include <signal.h> void VAXC$CRTL_INIT();vaxc$establish
Used to establish an OpenVMS exception handler for a particular routine. This function establishes a special Compaq C RTL exception handler in the routine that called it. This special handler catches all RTL-related exceptions that occur in later routines, and passes on all other exceptions to your handler. Syntax: #include <signal.h> void vaxc$establish(unsigned int (*exception_handler)(void *sigarr, void *mecharr));vfork
Creates an independent child process. This function is nonreentrant. Syntax: #include <unistd.h> _DECC_V4_SOURCE defined: int vfork(void); _DECC_V4_SOURCE not defined: pid_t vfork(void);vfprintf
Prints formatted output based on an argument list. This function is the same as the fprintf function except that instead of being called with a variable number of arguments, it is called with an argument list that has been initialized by the macro va_start (and possibly subsequent va_arg calls). Syntax: #include <stdio.h> int vfprintf (FILE *file_ptr, const char *format, va_list arg);vfwprintf
Writes output to a specified file in wide character format. Syntax: #include <wchar.h> int vfwprintf (FILE *stream, const wchar_t *format, va_list arg);vprintf
Prints formatted output based on an argument list. This function is the same as the printf function except that instead of being called with a variable number of arguments, it is called with an argument list that has been initialized by the macro va_start (and possibly subsequent va_arg calls). Syntax: #include <stdio.h> int vprintf (const char *format, va_list arg);vswprintf
Writes output to a specified file in wide character format. Syntax: #include <wchar.h> int vswprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg);vwprintf
Writes output to a specified file in wide character format. Syntax: #include <wchar.h> int vwprintf (const wchar_t *format, va_list arg);vsprintf
Prints formatted output based on an argument list. This function is the same as the sprintf function except that instead of being called with a variable number of arguments, it is called with an argument list that has been initialized by the macro va_start (and possibly subsequent va_arg calls). Syntax: #include <stdio.h> int vsprintf (char *str, const char *format, va_list arg);wait
Checks the status of the child process before exiting. A child process is terminated when the parent process terminates. This function is nonreentrant. Syntax: #include <wait.h> pid_t wait(int *status);wait3
Waits for a child process to stop or terminate. Syntax: #include <wait.h> pid_t wait3 (int *status_location, int options, struct rusage *resource_usage);wait4
Waits for a child process to stop or terminate. Syntax: #include <wait.h> pid_t wait4 (pid_t process_id, union wait *status_location, int options, struct rusage *resource_usage);waitpid
Waits for a child process to stop or terminate. Syntax: #include <wait.h> pid_t waitpid (pid_t process_id, int *status_location, int options);wcrtomb
Determines the number bytes needed to represent the multibyte character that corresponds to the specified wide character. Syntax: #include <wchar.h> size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);wcscat
Appends the wide character string wstr_2, including the terminating null character, to the end of wstr_1. Syntax: #include <wchar.h> wchar_t *wcscat (wchar_t *wstr_1, const wchar_t *wstr_2)wcschr
Returns the address of the first occurrence of a given wide character in a null-terminated, wide-character string. The terminating null character is considered to be part of the string. Syntax: #include <wchar.h> wchar_t *wcschr (const wchar_t *wstr, wchar_t wc);wcscmp
Compares two wide-character strings. The function returns an integer that indicates if the strings are different and how they differ. Unlike the wcscoll function, wcscmp compares the string based on the binary value of each wide character. Syntax: #include <wchar.h> int wcscmp (const wchar_t *wstr_1, const wchar_t wstr_2);wcscoll
Compares two wide-character strings. The function returns an integer that indicates if the strings differ and how they differ. The function uses the collating information in the LC_COLLATE category of the current locale to determine how the comparison is performed. Syntax: #include <wchar.h> int wcscoll (const wchar_t *ws1, const wchar_t *ws2);wcscpy
Copies the wide-character string source_str, including the terminating null character, into destination_str. Syntax: #include <wchar.h> wchar_t *wcscpy (wchar_t *destination_str, const wchar_t *source_str);wcscspn
Compares the characters in a wide-character string against a set of wide characters. The function returns the length of the initial substring comprised entirely of characters that are not in the set of wide characters. Syntax: #include <wchar.h> size_t wcscspn (const wchar_t *wstr1, const wchar_t *wstr2);wcsftime
Uses date and time information stored in a tm structure to create a wide character output string. The format of the output string is controlled by a format string. Syntax: #include <wchar.h> size_t wcsftime (wchar_t *wcs, size_t maxsize, const char *format, const struct tm *timeptr); (XPG4) size_t wcsftime (wchar_t *wcs, size_t maxsize, const wchar_t *format, const struct tm *timeptr); (ISO C)wcslen
Returns the number of wide characters in a wide-character string. The returned length does not include the terminating null character. Syntax: #include <wchar.h> size_t wcslen (const wchar_t *wstr);wcsncat
Appends wide characters from the wide-character string wstr_2 to the end of wstr_1. Up to a maximum of maxchar characters are appended to wstr_1. Syntax: #include <wchar.h> wchar_t *wcsncat (wchar_t *wstr_1, const wchar_t *wstr_2, size_t maxchar);wcsncmp
Compares no more than maxchar characters of two wide-character strings. The function returns an integer that indicates if the strings are different and how they differ. Syntax: #include <wchar.h> int wcsncmp (const wchar_t *wstr_1, const wchar_t *wstr_2, size_t maxchar);wcsncpy
Copies up to a maximum of maxchar wide characters from source_str into destination_str. Syntax: #include <wchar.h> wchar_t *wcsncpy (wchar_t *destination_str, const wchar_t *source_str, size_t maxchar);wcspbrk
Searches a wide-character string for the first occurrence of one of a specified set of wide characters. Syntax: #include <wchar.h> wchar_t *wcspbrk const wchar_t *wstr, const wchar_t *charset);wcsrchr
Returns the address of the last occurrence of a given wide character in a null-terminated, wide-character string. The terminating null character is considered to be part of the string. Syntax: #include <wchar.h> wchar_t *wcsrchr (const wchar_t *wstr, wchar_t wc);wcsrtombs
Converts a sequence of wide characters to a corresponding sequence of multibyte characters, including a terminating null character. Syntax: #include <wchar.h> size_t wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps);wcsspn
Compares the characters in a wide-character string against a set of wide characters. The function returns the length of the initial substring comprised entirely of characters in the set of wide characters. Syntax: #include <wchar.h> size_t wcsspn (const wchar_t *wstr1, const wchar_t *wstr2);wcsstr
Locates the first occurence of a wide character sequence specified in one string to wide character sequence in another string. Syntax: #include <wchar.h> wchar_t *wcsstr (const wchar_t *s1, const wchar_t *s2);wcstod
Converts a given wide-character string to a double-precision number. Syntax: #include <wchar.h> double wcstod (const wchar_t *nptr, wchar_t **endptr);wcstok
Locates text tokens in a given wide-character string. The text tokens are delimited by one or more wide characters from a specified separator string. This function keeps track of its position in the wide-character string between calls and, as successive calls are made, the function works through the wide-character string, identifying the text token following the one identified by the previous call. The ptr argument is used only with the ISO C format. It is a caller-provided w_char pointer into which wcstok stores information necessary for it to continue scanning the same wide string. When ws1 is NULL, ptr is used. When ws1 is not NULL, ptr is ignored. Syntax: #include <wchar.h> wchar_t *wcstok wchar_t *ws1, const wchar_t *ws2); (XPG4 Standard) wchar_t *wcstok wchar_t *ws1, const wchar_t *ws2, wchar_t **ptr); (ISO C Standard)wcstol
Converts a wide character string, in a given base, to a long integer value. Syntax: #include <wchar.h> long int wcstol (const wchar_t *nptr, wchar_t **endptr, int base);wcstombs
Converts a sequence of wide-character codes to a sequence of multibyte characters. Syntax: #include <stdlib.h> size_t wcstombs(char *s, const wchar_t *pwcs, size_t n);wcstoul
Converts the initial portion of the wide-character string pointed to by nptr to an unsigned long integer. Syntax: #include <wchar.h> unsigned long int wcstoul(const wchar_t *nptr, wchar_t **endptr, int base);wcswcs
Locates the first occurrence in the string pointed to by wstr1 of the sequence of wide characters in the string pointed to by wstr2. Syntax: #include <wchar.h> wchar_t *wcswcs (const wchar_t *wstr1, const wchar_t *wstr2);wcswidth
Determines the number of printing positions on a display device that are required for a wide-character string. Syntax: #include <wchar.h> int wcswidth (const wchar_t *pwcs, size_t n);wcsxfrm
Changes a wide-character string such that the changed string can be passed to the wcscmp function and produce the same result as passing the unchanged string to the wcscoll function. Syntax: #include <wchar.h> size_t wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t maxchar);wctob
Determines if a character is a valid single byte multibyte character in the initial shift state. Syntax: #include <stdio.h> #include <wchar.h> int wctob (wint_t c);wctomb
Converts a wide character to its multibyte character representation. Syntax: #include <stdlib.h> int wctomb(char *s, wchar_t wchar);wctrans
Verifies that a specified string value has a valid wide character equivalent. Syntax: #include <wctype.h> wctrans_t wctrans (const char *property);wctype
Used to define a property. The value returned by this function is used in calls to the iswctype function. Syntax: #include <wctype.h> (ISO C Standard) #include <wchar.h> (XPG4 Standard) wctype_t wctype (const char *property);wcwidth
Determines the number of printing positions on a display device required for a wide character. Syntax: #include <wchar.h> int wcwidth (wchar_t wc);wmemchr
Finds the first occurence of wide characters in a given object. Syntax: #include <wchar.h> wchar_t wmemchr (const wchar_t *s, wchar_t c, size_t n);wmemcmp
Compares the first occurance of wide characters in two objects. Syntax: #include <wchar.h> int wmemcmp (const wchar_t *s1, const wchar_t *s2, size_t n);wmemcpy
Copies a specified number of wide characters from one array (source_str) to another (destination_str). Syntax: #include <wchar.h> wchar_t wmemcpy (wchar_t *destination_str, const wchar_t *source_str, size_t n);wmemmove
Copies a specified number of wide characters from one array to another, using a temporary array. Syntax: #include <wchar.h> wchar_t wmemmove (wchar_t *destination_str, const wchar_t *source_str, size_t n);wmemset
Sets a specified value to a specified number of wide characters in an object. Syntax: #include <wchar.h> wchar_t wmemset (wchar_t *s, wchar_t c, size_t n);wprintf
Performs formatted output from the standard output (stdout). See Chapter 2 for information on format specifiers. Syntax: #include <wchar.h> int wprintf (const wchar_t *format, ...);wrapok
Curses macro which, in the UNIX* system environment, allows the wrapping of a word from the right border of the window to the beginning of the next line. This macro is provided only for UNIX compatibility. Syntax: #include <curses.h> wrapok(WINDOW *win, bool boolf); ---------- * UNIX is a trademark of The Open Group.write
Writes a specified number of bytes from a buffer to a file. Syntax: #include <unistd.h> int write(int file_descriptor, void *buffer,int nbytes); (POSIX-1) int write(int file_descriptor, void *buffer,int nbytes); (Compatibility)writev
Writes to a file. Syntax: #include <unistd.h> ssize_t writev (int fildes, const struct iovec *iov, int iovcnt);wscanf
Performs formatted input from the standard input (stdin), interpreting it according to the format specification. See Chapter 2 for information on format specifiers. Syntax: #include <wchar.h> int wscanf (const wchar_t *format, ...);