Syntax:
#include stdlib
void abort(void);
abs
Returns the absolute value of an integer.
Syntax:
#include stdlib
int abs(int integer);
access
Checks a file to see if a specified access mode is allowed.
Syntax:
#include stdio
int access(char *name, int mode);
acos
Returns a value in the range 0 to pi, which is the arc cosine of
the radian argument.
Syntax:
#include math
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.
Syntax:
#include curses
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.
Syntax:
#include curses
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.
Syntax:
#include signal
int alarm(unsigned int seconds);
asctime
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.
Syntax:
#include time
char *asctime (const tm_t, *timeptr);
asin
Returns a value in the range -pi/2 to pi/2, which is the arc sine
of its radian argument.
Syntax:
#include math
double asin(double x);
assert
Puts diagnostics into programs.
Syntax:
#include assert
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
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
double atan2(double x, double y);
atexit
Registers a function that is called without arguments at program
termination.
Syntax:
#include stdlib
int atexit (void (*func) (void));
atof
Converts an ASCII string to a numeric value. The ASCII string has
the following form:
[white-spaces][+|-]digits[.digits][e|E[+|-]integer]
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
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.
atoi is the same as atol in VAX C.
Syntax:
#include stdlib
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.
atol is the same as atoi in VAX C.
Syntax:
#include stdlib
long int atol(const char *nptr);
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
box(WINDOW *win, char vert, char hor);
brk
Determines the lowest virtual address that is not used with the
program.
Syntax:
#include stdlib
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
void *bsearch (const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *));
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
double cabs(cabs_t z);
calloc
Allocates an area of memory.
Syntax:
#include stdlib
void *calloc(size_t number, size_t size);
ceil
Returns (as a double) the smallest integer that is greater than or
equal to its argument.
Syntax:
#include math
double ceil(double x);
cfree
Makes available for reallocation the area allocated by a previous
calloc, malloc, or realloc call.
Syntax:
#include stdlib
void cfree(char *pointer);
chdir
Changes the default directory.
Syntax:
#include stdlib
int chdir(char *name);
chmod
Changes the file protection of a file.
Syntax:
#include stdlib
int chmod(char *name, unsigned int mode);
chown
Changes the owner UIC of a file.
Syntax:
#include stdlib
int chown(char *name, unsigned int owner, unsigned int group);
[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
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
void clearerr(FILE *file_pointer);
clearok
Sets the clear flag for the window.
Syntax:
#include curses
#define bool int
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.
Syntax:
#include time
clock_t clock(void);
close
Closes the file associated with a file descriptor.
Syntax:
#include unixio
int close(int file_descriptor);
[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.
Syntax:
#include curses
clrattr(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
clrtobot(void); 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 wclrtoeol macro acts on the
stdscr window.
Syntax:
#include curses
clrtoeol(); int wclrtoeol(WINDOW *win);
cos
Returns the cosine of its radian argument.
Syntax:
#include math
double cos(double x);
cosh
Returns the hyperbolic cosine of its argument.
Syntax:
#include math
double cosh(double x);
creat
Creates a new file.
Syntax:
#include unixio
int creat(char *file_spec, unsigned int mode,...);
[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. It also applies to
any of the UNIX I/O, Terminal I/O, or Standard I/O routines.
Syntax:
#include curses
crmode() nocrmode();
---------- * UNIX is a registered trademark of American Telephone and Telegraph Company.
ctermid
Returns a character string giving the equivalence string of
SYS$COMMAND. This is the name of the controlling terminal.
Syntax:
#include stdlib
char *ctermid(char *str);
ctime
Converts a time in seconds to the following form:
wkd mmm dd hh:mm:ss 19yy\n\0
Syntax:
#include time
char *ctime(const long *bintim);
Curses
Curses, the VAX C Screen Management Package, is comprised of VAX C
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.
Syntax:
#include stdlib
char *cuserid(char *str);
[w]delch
Curses Screen Management function and macro that delete the
character on the specified window at the current position of the
cursor.
Syntax:
#include curses
delch() int wdelch(WINDOW *win);
delete
Causes a file to be deleted.
Syntax:
#include stdio
int delete(const char *file_spec);
[w]deleteln
Curses Screen Management function and macro that delete the line at
the end of the current position of the cursor. The deleteln macro
acts on the stdscr window.
Syntax:
#include curses
deleteln() int wdeleteln(WINDOW *win);
delwin
Deletes the specified window from memory.
Syntax:
#include curses
#define bool int
int delwin(WINDOW *win);
difftime
Computes the difference in seconds between the two times specified
by the time1 and time2 arguments.
Syntax:
#include time
double difftime (time_t time2, time_t time_1);
div
Returns the quotient and remainder after the division of its
arguments.
Syntax:
#include stdlib
div_t div(int numer, int denom);
dup
Allocates a new file descriptor that refers to a file specified by
a file descriptor returned by open, creat, or pipe.
Syntax:
#include unixio
int dup(int file_desc1);
dup2
Makes file_descriptor_2 point to the same file as
file_descriptor_1.
Syntax:
#include unixio
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
echo() noecho()
ecvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string. The strings are stored in a
memory location created by the functions.
Syntax:
#include unixlib
char *ecvt(double value, int ndigit,*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
#define bool int
void endwin(void);
[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
erase() int werase(WINDOW *win);
execl
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execl (char *file-spec, char *argn,...);
execle
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execle (char *file-spec, char *argn,..., char *envp[]);
execlp
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execlp (char *file-spec, char *argn,...);
execv
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execv (char *file-spec, char *argv[]);
execve
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execve (char *file-spec, char *argv[], char *envp[]);
execvp
Passes the name of an image to be activated on a child process.
Syntax:
#include processes
int execvp (char *file-spec, char *argv[]);
exit, _exit
Terminate the calling process. exit flushes and closes all open
files before terminating the process; _exit does not.
Syntax:
#include stdlib
void exit(int status) void _exit(int status);
exp
Returns the base e raised to the power of the argument.
Syntax:
#include math
double exp(double x);
fabs
Returns the absolute value of a floating-point value.
Syntax:
#include math
double fabs(double x);
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
int fclose(FILE *file_pointer);
fcvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string.
Syntax:
#include unixlib
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
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
int feof(FILE *file_pointer);
ferror
Returns a nonzero integer if an error occurred while reading or
writing to a file.
Syntax:
#include stdio
int ferror(FILE *file_pointer);
fflush
Writes out any buffered information for the specified file.
Syntax:
#include stdio
int fflush(FILE *file_pointer);
fgetc
Returns characters from a specified file.
Syntax:
#include stdio
int fgetc(FILE *file_pointer);
fgetname
Returns the file specification associated with a file pointer.
Syntax:
#include stdio
char *fgetname(FILE *file_pointer,char *buffer,...);
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
int fgetpos(FILE *stream, fpos_t *pos);
fgets
Reads a line from a specified file, up to a specified maximum
number of characters or up to and including the newline character,
whichever comes first. This function stores the string in the str
argument.
Syntax:
#include stdio
char *fgets(char *str, int maxchar, FILE *file_ptr);
fileno
Returns an integer file descriptor that identifies the specified
file.
Syntax:
#include stdio
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
double floor(double x);
fmod
Computes the floating-point remainder of the first argument to fmod
divided by the second. If the quotient cannot be represented, the
behavior is undefined.
Syntax:
#include math
double fmod (double x, double y);
fopen
Opens a file by returning the address of a FILE structure.
Syntax:
#include stdio
FILE *fopen(const char *file_spec, const char *a_mode ,...);
fprintf
Performs formatted output to a specified file.
Syntax:
#include stdio
int fprintf(FILE *pointer, const char *format_spec,...);
Additional Information on:
Syntax:
#include stdio
int fputc(int character, FILE *file_pointer);
fputs
Writes a character string to a file without copying the string's
null terminator (\0).
Syntax:
#include stdio
int fputs(const char *string, FILE *file_pointer);
fread
Reads a specified number of items from a file.
Syntax:
#include stdio
size_t fread(void *pointer, size_t length size_t nitems, FILE (*file_pointer);
free
Makes available for reallocation the area allocated by a previous
calloc, malloc, or realloc call.
Syntax:
#include stdlib
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
FILE *freopen(const char *spec, const char *access_mode,FILE *file_pointer,...);
frexp
Returns the mantissa of a double value.
Syntax:
#include math
double frexp(double value,int *eptr);
fscanf
Performs formatted input from a specified file.
Syntax:
#include stdio
fscanf(FILE *file_pointer, const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a conversion character and a number indicating the size of the field.
Additional Information on:
Syntax:
#include stdio
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
int fsetpos (FILE *stream, fpos_t *fpos);
fstat
Accesses information about the file descriptor or the file
specification.
Syntax:
#include stat
int fstat(int file_descriptor, stat_t *buffer);
ftell
Returns the current byte offset to the specified file.
Syntax:
#include stdio
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 time
void ftime(timeb_t *timeptr);
fwrite
Writes a specified number of items to the file.
Syntax:
#include stdio
size_t fwrite(void *pointer, size_t size_of_item, size_t number_items, FILE *file_pointer);
gcvt
Converts its argument to a NUL-terminated string of ASCII digits
and returns the address of the string. The strings are stored in a
memory location created by the functions.
Syntax:
#include unixlib
char *gcvt(double value, int ndigit, char *buf);
getc
Returns characters from a specified file.
Syntax:
#include stdio
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.
Syntax:
#include curses
getch() char wgetch(WINDOW *win);
getchar
Reads a single character from the standard input (stdin).
Syntax:
#include stdio
int getchar(void);
getcwd
Returns a pointer to the file specification for the current working
directory.
Syntax:
#include unixlib
char *getcwd (char *buffer, unsigned int size,...);
getegid
Returns, in VMS 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 unixlib
unsigned getegid();
getenv
Searches the environment array for the current process and returns
the value associated with the environment name.
Syntax:
#include unixlib char *getenv(const char *name);
geteuid
Returns, in VMS 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 unixlib
unsigned geteuid(void)
getgid
Returns, in VMS 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 unixlib
unsigned int getgid(void);
getname
Returns the file specification associated with a file descriptor.
Syntax:
#include unixio
char *getname(int file_descriptor,char *buffer,...);
getpid
Returns the process ID of the current process.
Syntax:
#include unixlib
int getpid(void);
getppid
Returns the parent process ID of the calling process.
Syntax:
#include unixlib
int getppid (void);
gets
Reads a line from the standard input (stdin).
Syntax:
#include stdio
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 string, and echo it
on the specified window. The getstr macro works on the stdscr
window.
Syntax:
#include curses
getstr(str); int wgetstr(WINDOW *win, char *str);
getuid
Returns, in VMS 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 unixlib
unsigned int getuid(void);
getw
Returns characters from a specified file.
Syntax:
#include stdio
int getw(FILE *file_pointer);
getyx
Curses Screen Management function that puts the (x,y) coordinates
of the current cursor position on win in the variables y and x.
Syntax:
#include curses
getyx(WINDOW *win, int y, int x);
gmtime
Converts a given calendar time into a broken-down time expressed in
Greenwich Mean Time (GMT).
Syntax:
#include time
struct tm *gmtime (const time_t *timer);
gsignal
Generates a specified software signal. Generating a signal causes
the action established by the ssignal function to be taken.
Syntax:
#include signal
int gsignal(int sig,...);
hypot
Returns the square root of the sum of two squares of two arguments.
For example: sqrt(x*x + y*y).
Syntax:
#include math
double hypot(double x, double y);
[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
inch() char winch(WINDOW *win);
initscr
Curses Screen Management function that initializes the
terminal-type data and all screen functions. You must call initscr
before using any of the screen functions or macros.
Syntax:
#include curses
void initscr(void);
[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
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
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
insstr(char *str); int winsstr(WINDOW *win, char *str);
isalnum
Returns a nonzero integer if its argument is one of the
alphanumeric ASCII characters. Otherwise, it returns 0.
Syntax:
#include ctype
int isalnum(int character);
isalpha
Returns a nonzero integer if its argument is one of the alphabetic
ASCII characters. Otherwise, it returns 0.
Syntax:
#include ctype
int isalpha(int character);
isapipe
Returns 1 if the specified file descriptor is associated with a
mailbox, and 0 if it is not.
Syntax:
#include unixio
int isapipe(int file_descriptor);
isascii
Returns a nonzero integer if its argument is any ASCII character.
Otherwise, it returns 0.
Syntax:
#include ctype
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 unixio
int isatty(int file_descriptor);
iscntrl
Returns a nonzero integer if its argument is an ASCII DEL character
(177 octal) or any nonprinting ASCII character (a code less than 40
octal). Otherwise, it returns 0.
Syntax:
#include ctype
int iscntrl(int character);
isdigit
Returns a nonzero integer if its argument is a decimal digit (0 to
9). Otherwise, it returns 0.
Syntax:
#include ctype
int isdigit(int character);
isgraph
Returns a nonzero integer if its argument is a graphic ASCII
character. Otherwise, it returns 0.
Syntax:
#include ctype
int isgraph(int character);
islower
Returns a nonzero integer if its argument is a lowercase alphabetic
ASCII character. Otherwise, it returns 0.
Syntax:
#include ctype
int islower(int character);
isprint
Returns a nonzero integer if its argument is any ASCII printing
character (ASCII codes from 40 octal to 176 octal). Otherwise, it
returns 0.
Syntax:
#include ctype
int isprint(int character);
ispunct
Returns a nonzero integer if its argument is an ASCII punctuation
character; that is, if it is nonalphanumeric and greater than 40
octal. Otherwise, it returns 0.
Syntax:
#include ctype
int ispunct(int character);
isspace
Returns a nonzero integer if its argument is a white space; that
is, if it is an ASCII space, tab (horizontal or vertical),
carriage-return, form-feed, or newline character. Otherwise, it
returns 0.
Syntax:
#include ctype
int isspace(int character);
isupper
Returns a nonzero integer if its argument is an uppercase
alphabetic ASCII character. Otherwise, it returns 0.
Syntax:
#include ctype
int isupper(int character);
isxdigit
Returns a nonzero integer if its argument is a hexadecimal digit (0
to 9, A to F, or a to f).
Syntax:
#include ctype
int isxdigit(int character);
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.
* UNIX is a registered trademark of American Telephone and Telegraph Company.
Syntax:
#include signal
int kill(int pid, int sig);
labs
Returns the absolute value of an integer as a long int.
Syntax:
#include stdlib
long int labs(long int j);
ldexp
Returns its first argument multiplied by 2 raised to the power of
its second argument.
Syntax:
#include math
double ldexp(double x, int e);
ldiv
Returns the quotient and remainder after the division of its
arguments.
Syntax:
#include stdlib
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
leaveok(WINDOW *win, bool boolf);
localtime
Converts a time (expressed as the number of seconds elapsed since
00:00:00, January 1, 1970) into hours, minutes, seconds, and so on.
Syntax:
#include time
struct tm *localtime(const time_t *bintim);
log
Returns the natural (base-e) logarithm of its argument.
Syntax:
#include math
double log(double x);
log10
Returns the base-10 logarithm of its argument.
Syntax:
#include math
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
void longjmp(jmp_buf env, int val);
longname
Assigns the full terminal name to name, which must be large enough
to hold the character string.
Syntax:
#include curses
void longname(char *termbuf, char *name);
lseek
Positions a file to an arbitrary byte position and returns the new
position as an int.
Syntax:
#include unixio
int lseek(int file_descriptor, int offset, int direction);
malloc
Allocates an area of memory.
Syntax:
#include stdlib
void *malloc(size_t size);
memchr
Locates the first occurrence of the specified byte within the
initial size bytes of a given object.
Syntax:
#include string
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
int memcmp (const void *s1, const void *s2, size_t size);
memcpy
Copies a specified number of bytes from one object to another.
Syntax:
#include string
void *memcpy (void *s1, const void *s2, size_t size);
memmove
Copies a specified number of bytes from one object to another.
Syntax:
#include string
void *memmove(void *s1, const void *s2, size_t size);
memset
Sets a specified number of bytes in a given object to a given
value.
Syntax:
#include string
void *memset (void *s, int value, size_t size);
mkdir
Creates a directory.
Syntax:
# include stdlib
int mkdir(char *dir_spec, unsigned mode,...);
mktemp
Creates a unique file name from a template that you supply.
Syntax:
#include unixio
char *mktemp(char *template);
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
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
move(y,x) int wmove(WINDOW *win, int y, int x);
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
mvaddch(int y, int x, char ch) mvwaddch(WINDOW *win, int y, int x, char ch);
mv[w]addstr
Curses Screen Management macros that move the cursor to the
specified string, to which str points, to the specified window.
The mvaddstr macro acts on the stdscr window.
Syntax:
#include curses
mvaddstr(int y, int x, char *str) 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
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
mvdelch(int y, int x); 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
mvgetch(int y, int x); 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
mvgetstr(int y, int x, char *str) 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
mvinch(int y, int x); 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
mvinsch(char ch, int y, int x); 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
mvinsstr(int y, int x, char *str) 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
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
WINDOW newwin(int numlines, int numcols, int begin_y, int begin_x);
nice
Increases or decreases process priority relative to the process
base priority by the amount of the argument.
Syntax:
#include stdlib
nice(int increment);
[no]nl
Curses Screen Management function and macro that unset and set the
terminal to and from newline mode (they start and stop the system
from mapping <RETURN> to <LINE-FEED>).
Syntax:
#include curses
nl() nonl()
open
Opens a file for reading, writing, or editing. It positions the
file at its beginning (byte 0).
Syntax:
#include unixio
int open(char *file_spec, int flags, unsigned int mode,...);
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
int overlay(WINDOW *win1, WINDOW *win2);
overwrite
Curses Screen Management routine that destructively overwrites the
contents of win1 on win2.
Syntax:
#include curses
int overwrite(WINDOW *win1, WINDOW *win2);
pause
Causes its calling process to stop (hibernate) until the process
receives a signal.
Syntax:
#include signal
int pause(void)
perror
Writes a short message to stderr describing the last error
encountered during a call to the VAX C RTL from a C program.
Syntax:
#include stdio
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 processes
int pipe(int file_descriptor[2],...);
pow
Returns the first argument raised to the power of the second
argument.
Syntax:
#include math
double pow(double base, double exp);
printf
Performs formatted output to the standard output (stdout).
Syntax:
#include stdio
int printf(const char *format_specification,...);
A format specification is a character string that states the output format. The string may contain ordinary characters that are copied to the output, or it may contain a format specification. Format specifications begin with a percent sign (%), and end with a conversion character that states the output format. Each format specification must be paired with an output source. Format specifications are matched to output sources in left-to-right order.
Additional Information on:
Syntax:
#include curses
printw(char *format_spec,...); int wprintw(WINDOW *win, char *format_spec,...);
putc
Writes characters to a specified file.
Syntax:
#include stdio
int putc(int character, FILE *file_pointer);
putchar
Writes a single character to the standard output (stdout) and
returns the character.
Syntax:
#include stdio
int putchar(int character);
puts
Writes a character string to the standard output (stdout) followed
by a newline.
Syntax:
#include stdio
int puts(char *string);
putw
Writes characters to a specified file.
Syntax:
#include stdio
int putw(int integer, FILE *file_pointer);
qsort
Sorts an array of objects in place. It implements the quick-sort
algorithm.
Syntax:
#include stdlib
void qsort (void *base, size_t nmemb, size_t size, int (*compar) const void *, const void *));
raise
Generates a specified software symbol.
Syntax:
#include signal
int raise(int sig,...);
rand
Returns pseudorandom numbers in the range 0 to (2**31-1).
Syntax:
#include stdlib
int rand(void)
[no]raw
Curses Screen Management functions and macros that set and unset
the terminal to and from raw mode. The RAW function performs the
same task as CRMODE except that it does not imply NONL. These
functions and macros are provided only for portability with
programs running on UNIX* systems. This routine is available only
on VMS Versions 5.0 and above.
Syntax:
#include curses
raw() noraw()
---------- * UNIX is a registered trademark of American Telephone and Telegraph Company.
read
Reads bytes from a file and places them in a buffer.
Syntax:
#include unixio
int read(int file_descriptor, char *buffer, int nbytes);
realloc
Changes the size of the area pointed to by the first argument to
the number of bytes given by the second argument.
Syntax:
#include stdlib
void *realloc(char *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
refresh() int wrefresh(WINDOW *win);
remove
Causes a file to be deleted.
Syntax:
#include stdio
int remove (const char *file-spec);
rename
Gives a new name to an existing file.
Syntax:
#include stdio
int rename (const char *old_file_spec, const char *new_file_spec);
rewind
Sets the file to its beginning.
Syntax:
#include stdio
int rewind(FILE *file_pointer);
sbrk
Determines the lowest virtual address that is not used with the
program.
Syntax:
void *sbrk(unsigned long int incr);
scanf
Performs formatted input from the standard input (stdin).
Syntax:
#include stdio
int scanf(const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a conversion character and a number indicating the size of the field.
Additional Information on:
Syntax:
#include curses
scanw(char *format_spec,...); int wscanw(WINDOW *win, char *format_spec,...);
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
int scroll(WINDOW *win);
scrollok
Curses Screen Management macro that sets the scroll flag for the
specified window.
Syntax:
#include curses
#define bool int
scrollok(WINDOW *win, bool boolf);
[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
setattr(attr); wsetattr(WINDOW *win, int attr);
setbuf
Associates a buffer with an input or output file.
Syntax:
#include stdio
int setbuf(FILE *file_pointer, char *buffer);
setgid
Implemented for program portability and serves no function. It
returns 0 (to indicate success).
Syntax:
#include unixlib
int setgid(unsigned int group_number);
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
int setjmp(jmp_buf env);
setuid
Implemented for program portability and serves no function. It
returns 0 (to indicate success).
Syntax:
#include unixlib
int setuid(unsigned int member_number);
setvbuf
Associates a buffer with an input or output file.
Syntax:
#include stdio
int setvbuf (FILE *file_ptr, char *buffer, int type, size_t size);
sigblock
Causes the signals designated in a mask to be added to the current
set of signals being blocked from delivery.
Syntax:
#include signal
int sigblock(int mask);
signal
Allows you to either catch or ignore a signal.
Syntax:
#include signal
int (*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
int sigpause(int mask);
sigsetmask
Establishes those signals that are blocked from delivery.
Syntax:
#include signal
int sigsetmask(int mask);
sigstack
Defines an alternate stack on which to process. This allows the
processing of signals in a separate environment from that of the
current process.
Syntax:
#include signal
int sigstack(struct sigstack *ss, struct sigstack *oss);
sigvec
Assigns a handler for a specific signal.
Syntax:
#include signal
int sigvec(int sigint, struct sigvec *sv, struct sigvec *osv);
sin
Returns the sine of its radian argument.
Syntax:
#include math
double sin(double x);
sinh
Returns the hyperbolic sine of its argument.
Syntax:
#include math
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 signal
int sleep(unsigned seconds);
sprintf
Performs formatted output to a string in memory.
Syntax:
#include stdio
int sprintf(char *string, const char *format_spec,...);
A format specification is a character string that states the output format. The string may contain ordinary characters that are copied to the output, or it may contain a format specification. Format specifications begin with a percent sign (%), and end with a conversion character that states the output format. Each format specification must be paired with an output source. Format specifications are matched to output sources in left-to-right order.
Additional Information on:
Syntax:
#include math
double sqrt(double x);
srand
Returns pseudorandom numbers in the range 0 to (2**31-1).
Syntax:
#include math
int srand(int seed);
sscanf
Performs formatted input from a character string in memory.
Syntax:
#include stdio
int sscanf(char *string, const char *format_spec,...);
Format specifications begin with a percent sign (%) followed by a conversion character and a number indicating the size of the field.
Additional Information on:
Syntax:
#include signal
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
standend() 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
standout() int wstandout(WINDOW *win);
stat
Accesses information about the file descriptor or the file
specification.
Syntax:
#include stat #include statbuf;
int stat(int *file_path, stat_t *buffer);
strcat
Concatenates str_2 to the end of str_1.
Syntax:
#include string
char *strcat(char *str_1, const char *str_2);
strchr
Returns the address of the first occurrence of a given character in
a NUL-terminated string.
Syntax:
#include string
char *strchr(const char *string, int character);
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
int strcmp(const char *str_1, const char *str_2);
strcpy
Copies all of str_2 into str_1.
Syntax:
#include string
char *strcpy(char *str_1, const char *str_2);
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
size_t strcspn(const char *str, const char *charset);
strerror
Maps the error number in error_code to an error message string.
Syntax:
#include string
char *strerror (int error_code [,int vms_error_code]);
strlen
Returns the length of a string of ASCII characters. The returned
length does not include the terminating null character (\0).
Syntax:
#include string
size_t strlen(const char *str);
strncat
Concatenates str_2 to the end of str_1.
Syntax:
#include string
char *strncat(char *str_1, const char *str_2, size_t maxchar);
strncmp
Compares two ASCII characters 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
int strncmp(const char *str_1, const char *str_2, size_t maxchar);
strncpy
Copies all or part of str_2 into str_1.
Syntax:
#include string
char *strncpy(char *str_1, const char *str_2, size_t maxchar);
strpbrk
Searches a string for the occurrence of one of a specified set of
characters.
Syntax:
#include string
char *strpbrk(const char *str, const char *charset);
strrchr
Returns the address of the last occurrence of a given character in
a NUL-terminated string.
Syntax:
#include string
char *strrchr(char *string, char character);
strspn
Searches a string for the occurrence of a character that is not in
a specified set of characters.
Syntax:
#include string
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
char *strstr(const char *s1, const char *s2);
strtod
Converts a given string to a double-precision number.
Syntax:
#include stdlib
double strtod (const char *nptr, char **endptr);
strtok
Locates text tokens in a given string.
Syntax:
#include string
char *strtok (char *s1, const char *s2);
strtol
Converts strings of ASCII characters to the appropriate numeric
values.
Syntax:
#include stdlib
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
unsigned long int strtoul (const char *nptr, char **endptr, int base);
strspn
Returns the length of the prefix of a string which consists
entirely of characters from a set of characters.
Syntax:
#include string
size_t strspn(const char *str, const char *charset);
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
WINDOW *subwin(WINDOW *win, int numlines, int numcols, int begin_y, int begin_x);
system
Passes a given string to the host environment to be executed by a
command processor.
Syntax:
#include processes
int system (const char *string);
tan
Returns a double value that is the tangent of its radian argument.
Syntax:
#include math
double tan(double x);
tanh
Returns a double value that is the hyperbolic tangent of its double
argument.
Syntax:
#include math
double tanh(double x);
time
Returns the time elasped on the system since 00:00:00 January 1,
1970 in seconds.
Syntax:
#include time
time_t time(time_t *time_location);
times
Passes back the accumulated times of the current process and its
terminated child processes.
Syntax:
#include time
void times (tbuffer_t *buffer);
tmpfile
Creates a temporary file that is opened for update.
Syntax:
#include stdio
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
char *tmpnam(char *name);
toascii
Converts its argument, an 8-bit ASCII character, to a 7-bit ASCII
character.
Syntax:
#include ctype
int toascii(char character);
tolower, _tolower
Convert their argument, an ASCII character, to lowercase. If the
argument is not an uppercase character, it is returned unchanged.
Syntax:
#include ctype
int tolower(char character); int _tolower(char character);
touchwin
Curses Screen Management routine that places the most recently
edited version of the specified window on the terminal screen.
Syntax:
#include curses
int touchwin(WINDOW *win);
toupper, _toupper
Convert their argument, an ASCII character, to uppercase. If the
argument is not a lowercase character, it is returned unchanged.
Syntax:
#include ctype
int toupper(char character); int _toupper(char character);
ttyname
Returns a pointer to the NUL-terminated name of the terminal device
associated with file descriptor 0, the default input device
(stdin).
Syntax:
#include unixio
char *ttyname(void);
umask
Creates a file protection mask that is used when a new file is
created and returns the previous mask value.
Syntax:
#include stdlib
int umask(unsigned int mode_complement);
ungetc
Pushes a character back into the input stream and leaves the stream
positioned before the character.
Syntax:
#include stdio
int ungetc(int character, FILE *file_pointer);
va_arg
Returns the next item in the argument list.
Syntax:
#include stdarg or #include varargs
type va_arg(va_list ap type);
va_count
Returns the number of longwords in the argument list.
Syntax:
#include varargs
void va_count(int count);
va_end
Finishes the varargs session.
Syntax:
#include stdarg or #include varargs
void va_end(va_list ap);
va_start
Initializes a variable to the beginning of the argument list.
Syntax:
#include varargs
void va_start(va_list ap);
va_start_1
Initializes a variable to the beginning of the argument list.
Syntax:
#include varargs
void va_start_1(va_list ap, int offset);
VAXC$CALLOC_OPT
Allocates an area memory.
Syntax:
#include stdlib
void *VAXC$CALLOC_OPT(size_t number, size_t size);
VAXC$CFREE_OPT
Makes available for reallocation the area allocated by a previous
VAXC$CALLOC_OPT, VAXC$MALLOC_OPT, or VAXC$REALLOC_OPT call.
Syntax:
#include stdlib
int VAXC$CFREE_OPT(void *pointer);
VAXC$CRT_INIT
Allows you to call the VAX C RTL from other languages. It
initializes the run-time environment and establishes both an exit
and condition handler.
VAXC$ESTABLISH
Establishes a special VAX C RTL exception handler that catches all
RTL-related exceptions and passes on all others to your handler.
Syntax:
#include signal
void VAXC$ESTABLISH(int (*exception_handler)(void *mecharr, void *sigarr));
VAXC$FREE_OPT
Makes available for reallocation the area allocated by a previous
VAXC$CALLOC_OPT, VAXC$MALLOC_OPT, or VAXC$REALLOC_OPT call.
Syntax:
#include stdlib
int VAXC$FREE_OPT(void *pointer);
VAXC$MALLOC_OPT
Allocates an area of memory.
Syntax:
#include stdlib
void *VAXC$MALLOC_OPT(size_t size);
VAXC$REALLOC_OPT
Changes the size of the area pointed to by the first argument to
the number of bytes given by the second argument.
Syntax:
#include stdlib
char *VAXC$REALLOC_OPT(void *pointer, size_t size);
vfork
Creates an independent child process.
Syntax:
#include processes
int vfork(void);
vprintf, vfprintf, vsprintf
Print formatted output based on an argument list. These functions
are the same as the printf functions except that instead of being
called with a variable number of arguments, they are called with an
argument list that has been initialized by the macro va_start.
Syntax:
#include stdio #include stdarg
int vprintf (const char *format, va_list *arg); int vfprintf (FILE *file_ptr, const char *format, va_list *arg); 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.
Syntax:
#include processes
int wait(int *status);
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
#define bool int
wrapok(WINDOW *win, bool boolf);
---------- * UNIX is a registered trademark of American Telephone and Telegraph Company.
Writes a specified number of bytes from a buffer to a file.
Syntax:
#include unixio
int write(int file_descriptor, void *buffer,int nbytes);