C Runtime Functions

Besides the large number of graphics- or GUI-specific functions in FilterMeister, a large number of the standard C runtime functions are available to the developer. Almost all of the functions defined in the C99 standard are provided and even some common extensions are at your disposal.

The most notable omissions are the well-known gets and scanf. Since these require some sort of console-based input, which FilterMeister currently does not support, these cannot be implemented.

File I/O and file manipulation functions

clearerr - Clears the error indicator for a stream

fclose - Closes a stream

fcloseall - Closes all open streams

feof - Tests for end of file on a stream

ferror - Tests for error on a stream

fflush - Flushes a stream

fgetc - Reads a character from a stream

fgetpos - Get file position

fgets - Reads a string from a stream

flushall - Flushes all streams

fopen - Opens a stream

(fprintf)? - Writes formatted data to a stream

fputc - Writes a character to a stream

fputs - Writes a string to a stream

fread - Reads unformatted data from a stream

(freopen)? - Reassigns a FILE pointer to a new file

(fscanf)? - Reads formatted data from a stream

fseek - Moves file position to a given location

fsetpos - Sets the position indicator of a stream

ftell - Gets current file position

fwrite - Writes unformatted data to a stream

getc - Reads a character from a stream

printf - Writes formatted data to a message box.

putc - Writes a character to a stream

remove - Deletes a file

rename - Renames a file

rewind - Moves file pointer to beginning of stream

snprintf - Writes formatted data to string up to a specified length

sprintf - Writes formatted data to string

(sscanf)? - Reads formatted data from a string

tmpfile - Creates a temporary file

tmpnam - Creates a temporary file name

(ungetc)? - Removes a character from a stream

Data conversion functions

abs - Absolute value of integer

strtod - Converts string to double

strtol - Converts string to long

strtoul - Converts string to unsigned long

Memory management functions

calloc - Allocate memory block with zero fill

expand - Expands a memory block in place

free - Free memory block

malloc - Allocate memory block

msize - Returns the size of a memory block in bytes. (Microsoft-specific function)

realloc - Re-size memory block

sizeof - Returns the size of an object type in bytes

Memory manipulation functions

memcpy - Copies characters until character or number of characters has been copied

memchr - Return a pointer to the first occurrence, within a specified number of characters

memcmp - Compare a specified number of characters from two memory locations

memicmp - Compare a specified number of characters from two memory locations without regard to case (Unix-specific function)

memmove - Copy a specified number of characters from one memory location to another

memset - Set a region of memory to a specified character

String manipulation functions

(_strerror)?

strcat - Concatenate two strings

strchr - Find the first occurrence of a given character in a string

strcmp - Compare two strings

strcoll - Compare two strings using the current locale

strcpy - Copy one string to another

strcspn - Find any one of a set of characters in a string

strdup - Duplicate a string

strerror - Return string describing error code

stricmp - Compare two strings without regard to case. (Microsoft-specific function)

stricoll - Compare two strings using the current locale and without regard to case

strlen - Get the length of a string

strlwr - Convert a string to lower case. (Microsoft-specific function)

strncat - Concatenate the specified number of characters from one string to another

strncmp - Compare the specified number of characters in two strings

strncoll - Compare the specified number of characters in two strings using the current locale. (Microsoft-specific function)

strncpy - Copy the specified number of characters from one string to another

strnicmp - Compare the specified number of characters in two strings without regard to case. (Microsoft-specific function)

strnicoll - Compare the specified number of characters in two strings using the current locale and without regard to case. (Microsoft-specific function)

strnset - Set the specified number of characters in a string to a given character

strpbrk - Find the first occurrence of a character from one string in another

strrchr - Find the last occurrence of a character in a string

strrev - Reverse a string

strset - Set all characters in a string to a given character

strspn - Find the first substring from a given character set in a string

strstr - Find the first occurrence of a string in another string

strtok - Find the next token in a string

strupr - Convert a string to upper case. (Microsoft-specific function)

strxfrm - Transforms a string according to the current locale

Floating-point math

(acos)? - Floating point arc cosine(x)

(asin)? - Floating point arc sine(x)

(atan)? - Floating point arc tangent(x)

(atan2)? - Floating point arc tangent(y/x)

ceil - Floating point ceiling(x)

chop - Truncate floating point value towards 0.0.

cos - Implemented as (fcos)?.

(cosh)? - Floating point hyperbolic cosine(x)

exp - Floating point exponent(x)

fabs - Floating point absolute value(x)

(fcos)? - Floating point cosine(x)

floor - Floating point floor(x)

fmax - Find the maximum of two floating point numbers

fmin - Find the minimum of two floating point numbers

fmod - Floating point remainder(x/y)

fsin - Floating point sine(x)

(ftan)? - Floating point tangent(x)

hypot - Euclidean distance function, calculate the hypotenuse of a right-angled triangle.

ldexp - The value of x * 2**n

log - Natural log(x)

log10 - Log base 10 of x

max - Max of(a, b)

min - Min of(a, b)

modf - Split x into integral and fractional parts, each with the same sign as x.

pow - The value of x**y

rand - Generate a pseudo random number

round - Round floating point value to nearest or even integral value. (Not yet implemented.)

sin - Implemented as fsin.

(sinh)? - Floating point hyperbolic sine(x)

sqr - Integer square root(x)

sqrt - Floating point square root(x)

srand - Set random number seed

tan - Implemented as (ftan)?.

(tanh)? - Floating point hyperbolic tangent(x)

Process management and control

abort - Abort the current process

Time and date functions

clock - Returns the processor time since the beginning of execution

time - Returns the current calendar time

strdate - Converts the current date to a string

strtime - Converts the current time to a string

See Also

Command Reference, Dialog Functions, Image Functions, System Functions