Previous | Contents | Index |
Indicates if a wide character is classed as a lowercase character in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswlower (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If a lowercase character. 0 If not a lowercase character.
Indicates if a wide character is classed as a printing character in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswprint (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If a printing character. 0 If not a printing character.
Indicates if a wide character is classed as a punctuation character in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswpunct (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If a punctuation character. 0 If not a punctuation character.
Indicates if a wide character is classed as a space character in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswspace (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If a white-space character. 0 If not a white-space character.
Indicates if a wide character is classed as an uppercase character in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswupper (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If an uppercase character. 0 If not an uppercase character.
Indicates if a wide character is a hexadecimal digit (0 to 9, A to F, or a to f) in the program's current locale.
#include <wctype.h> (ISO C)#include <wchar.h> (XPG4)
int iswxdigit (wint_t wc);
wc
An object of type wint_t . The value of wc must be representable as a wchar_t in the current locale, or must equal the value of the macro WEOF. If it has any other value, the behavior is undefined.
nonzero If a hexadecimal digit. 0 If not a hexadecimal digit.
Indicates if a character is a hexadecimal digit (0 to 9, A to F, or a to f) in the program's current locale.
#include <ctype.h>int isxdigit (int character);
character
An object of type int . The value of character must be representable as an unsigned char in the current locale, or must equal the value of the macro EOF. If it has any other value, the behavior is undefined.
nonzero If a hexadecimal digit. 0 If not a hexadecimal digit.
Compute Bessel functions of the first kind.
#include <math.h>double j0 (double x);
float j0f (float x);
long double j0l (long double x);
double j1 (double x);
float j1f (float x);
long double j1l (long double x);
double jn (int n, double x);
float jnf (int n, float x);
long double jnl (int n, long double x);
x
A real value.n
An integer.
The j0 functions return the value of the Bessel function of the first kind of order 0.The j1 functions return the value of the Bessel function of the first kind of order 1.
The jn functions return the value of the Bessel function of the first kind of order n.
The j1 and jn functions can result in an underflow as x gets small. The largest value of x for which this occurs is a function of n.
x The relevant Bessel value of x of the first kind. 0 The value of the x argument is too large, or underflow occurred; errno is set to ERANGE. NaN x is NaN; errno is set to EDOM.
Generates uniformly distributed pseudorandom-number sequences. Returns 48-bit signed, long integers.
#include <stdlib.h>long int jrand48 (unsigned short int xsubi[3]);
xsubi
An array of three short int s that form a 48-bit integer when concatentated together.
The jrand48 function generates pseudorandom numbers using the linear congruential algorithm and 48-bit integer arithmetic.The function returns signed long integers uniformly distributed over the range of y values, such that -231 <= y < 231 .
The function works by generating a sequence of 48-bit integer values, Xi, according to the linear congruential formula:
Xn+1 = (aXn+c)mod m n >= 0The argument m equals 248 , so 48-bit integer arithmetic is performed. Unless you invoke the lcong48 function, the multiplier value a and the addend value c are:
a = 5DEECE66D16 = 2736731631558 c = B16 = 138The jrand48 function requires that the calling program pass an array as the xsubi argument, which for the first call must be initialized to the initial value of the pseudorandom-number sequence. Unlike the drand48 function, it is not necessary to call an initialization function prior to the first call.
By using different arguments, jrand48 allows separate modules of a large program to generate several independent sequences of pseudorandom numbers. For example, the sequence of numbers that one module generates does not depend upon how many times the function is called by other modules.
n Signed, long integers uniformly distributed over the range -2 31 <= y < 2 31 .
Sends a signal to the process specified by a process ID.
#include <signal.h>int kill (int pid, int sig);
pid
The process ID.sig
The signal code.
The kill function is restricted to C and C++ programs that include the main function.The kill function sends a signal to a process, as if the process had called raise . If the signal is not trapped or ignored by the target program, the program exits.
OpenVMS VAX and Alpha implement different rules about what process you are allowed to send signals to. A program always has privileges to send a signal to a child started with vfork / exec . For other processes, the results are determined by the OpenVMS security model for your system.
Because of an OpenVMS restriction, the kill function cannot deliver a signal to a target process that runs an image installed with privileges.
Unless you have system privileges, the sending and receiving processes must have the same user identification code (UIC).
On OpenVMS systems before Version 7.0, kill treats a signal value of 0 as if SIGKILL were specified.
For OpenVMS Version 7.0 and higher systems, if you include <stdlib.h> and compile with the _POSIX_EXIT feature-test macro set, then:
- If the signal value is 0, kill validates the process ID but does not send any signals.
- If the process ID is not valid, kill returns - 1 and sets errno to ESRCH.
0 Indicates that kill was successfully queued. - 1 Indicates errors. The receiving process may have a different UIC and you are not a system user, or the receiving process does not exist.
Converts a long integer to a character string.
#include <stdlib.h>char *l64a (long l);
l
A long integer that is to be converted to a character string.
The a64l and l64a functions are used to maintain numbers stored in base-64 ASCII characters:
- a64l converts a character string to a long integer.
- l64a converts a long integer to a character string.
Each character used to store a long integer represents a numeric value from 0 through 63. Up to six characters can be used to represent a long integer.
The characters are translated as follows:
- A period (.) represents 0.
- A slash (/) represents 1.
- The numbers 0 through 9 represent 2 through 11.
- Uppercase letters A through Z represent 12 through 37.
- Lowercase letters a through z represent 38 through 63.
The l64a function takes a long integer and returns a pointer to a corresponding base-64 notation of the least significant 32 bits.
The value returned by l64a is a pointer to a thread-specific buffer whose contents are overwritten on subsequent calls from the same
See also a64l .
x Upon successful completion, a pointer to the corresponding base-64 ASCII character-string notation. If the l parameter is 0, l64a returns a pointer to an empty string.
Returns the absolute value of an integer as a long int .
#include <stdlib.h>long int labs (long int j);
j
A value of type long int .
Changes the user and group ownership of the specified file.
#include <unistd.h>int lchown (const char *file_path, uid_t file_owner, gid_t file_group);
file_path
The name of the file for which you want to change the owner and group IDs.file_owner
The new user ID for the file.file_group
The new group ID for the file.
The lchown function changes the owner and/or group of the specified file (file_path). If the file is a symbolic link, the owner of the symbolic link is modified (in contrast to chown which would modify the file that the symbolic link points to).See also symlink , unlink , readlink , realpath , and lstat .
0 Successful completion. -1 Indicates an error. errno is set to any errno value returned by chown .
Initializes a 48-bit uniformly distributed pseudorandom-number sequence.
#include <stdlib.h>void lcong48 (unsigned short int param[7]);
param
An array that in turn specifies the initial Xi, the multiplier value a, and the addend value c.
The lcong48 function generates pseudorandom numbers using the linear congruential algorithm and 48-bit integer arithmetic.You can use lcong48 to initialize the random number generator before you call any of the following functions:
drand48
lrand48
mrand48The lcong48 function specifies the initial Xi value, the multiplier value a, and the addend value c. The param array elements specify the following:
param[0-2] X i param[3-5] Multiplier a value param[6] 16-bit addend c value After lcong48 has been called, a subsequent call to either srand48 or seed48 restores the standard a and c as specified previously.
The lcong48 function does not return a value.
See also drand48 , lrand48 , mrand48 , srand48 , and seed48 .
Returns its first argument multiplied by 2 raised to the power of its second argument; that is, x(2n) .
#include <math.h>double ldexp (double x, int n);
float ldexp (float x, int n); (ALPHA, I64)
long double ldexp (long double x, int n); (ALPHA, I64)
x
A base value of type double , float , or long double that is to be multiplied by 2n .n
The integer exponent value to which 2 is raised.
x(2 n) The first argument multiplied by 2 raised to the power of the second argument. 0 Underflow occurred; errno is set to ERANGE. HUGE_VAL Overflow occurred; errno is set to ERANGE. NaN x is NaN; errno is set to EDOM.
Returns the quotient and the remainder after the division of its arguments.
#include <stdlib.h>ldiv_t ldiv (long int numer, long int denom);
numer
A numerator of type long int .denom
A denominator of type long int .
The type ldiv_t is defined in the <stdlib.h> header file as follows:
typedef struct { long quot, rem; } ldiv_t;See also div .
Signals Curses to leave the cursor at the current coordinates after an update to the window.
#include <curses.h>leaveok (WINDOW *win, bool boolf);
win
A pointer to the window.boolf
A Boolean TRUE or FALSE value. If boolf is TRUE, the cursor remains in place after the last update and the coordinate setting on win changes accordingly. If boolf is FALSE, the cursor moves to the currently specified (y,x) coordinates of win.
The leaveok function defaults to moving the cursor to the current coordinates of win. The bool type is defined in the <curses.h> header file as follows:
#define bool int
Previous | Next | Contents | Index |