Up: Classes   [Index]


CFunction

CFunction Class

Ctalk uses the CFunction class internally to represent C function calls. Ctalk installs the CFunction methods library templates in CLASSLIBDIR/libc and CLASSLIBDIR/libctalk.

Note that this class does not, at this time, provide methods for all C99 library function calls. If you want to add C library templates, look at the templates in classes/libc and at the API documentation. See Templates. Refer to the README file in the Ctalk distribution for instructions on submitting source code contributions.

Class Methods

cAbs (int i)

Return the result object of an abs(3) library call.

cAcos (double d)

Return the result object of an acos(3) library call.

cAcosh (double d)

Return the result object of an acosh(3) library call.

cAscTime (struct tm *tm)

Return the result object of an asctime(3) library call. The value of tm is the result of a gmtime(3) or localtime(3) call.

cAsin (double d)

Return the result object of an asin(3) library call.

cAsinh (double d)

Return the result object of an asinh(3) library call.

cAtof (char *s)

Return the result object of an atof(3) library call.

cAtoi (char *s)

Return the result object of an atoi(3) library call.

cAtol (char *s)

Return the result object of an atol(3) library call.

cAtoll (char *s)

Return the result object of an atoll(3) library call.

cCbrt (double d)

Return the result object of a cbrt(3) library call.

cCeil (double d)

Return the result object of a ceil(3) library call.

cChdir (char *s)

Change the working directory to s. Returns 0 on success, -1 on error, and sets the system error number.

cClearErr (OBJECT * FILECLASSOBJECT)

Perform a clearerr(3) library call on the file stream of the argument.

cClock (void)

Return the result object of a clock(3) library call.

cCopySign (double d, double s)

Return the result object of a copysign(3) library call.

cCos (double d)

Return the result object of a cos(3) library call.

cCosh (double d)

Return the result object of a cosh(3) library call.

cCTime (int *t)

Return the result object of a ctime(3) library call.

Note: Because ctime(3) uses a pointer to int as its argument, arguments to cCTime should be of class Symbol. See Objects in Function Arguments.

cDiffTime (int time1, int time2)

Return the result object of a difftime(3) library call.

cErf (double d)

Return the result object of an erf(3) library call.

cErfc (double d)

Return the result object of an erfc(3) library call.

cExp (double d)

Return the result object of an exp(3) library call.

cExpm1 (double d)

Return the result object of an expm1(3) library call.

cFabs (double d)

Return the result object of a fabs(3) library call.

Note: The functions fabsf(3) and fabsl(3) functions are not supported on Solaris systems that don’t have math_c99.h. Use fabs(3) or cFabs instead.

cGetchar (void)

Return an object of class Integer from the standard input.

cGetCwd (void)

Return the current directory as a String object.

Return a String object with the result of a getenv(3) C library function call.

cGetPID (void)

Return an Integer object with the result of a getpid(3) C library function call.

cLrint (double)
cLrintf (float)
cLrintl (long double)
cLlrint (double)
cLlrint (float)
cLlrint (long double)

Return an Integer or LongInteger object that is the result of a lrint(3), lrintf(3), lrintl(3), llrint(3), llrintf(3), or llrintf(3) library call.

cStrcat (char *s1, char *s2)

Return the result of a strcat(3) library function call.

cStrcasecmp (char *s1, char *s2)

Return the result of a strcasecmp(3) library call.

cStrcmp (char *s1, char *s2)

Return the result of a strcmp(3) library call.

cStrlen (char *s)

Return the result of a strlen(3) library call.

cStrncat (char *s1, char *s2, int n)

Return the result of a strncat(3) library call.

cStrncasecmp (char *s1, char *s2, int n)

Return the result of a strncasecmp(3) library call.

cStrncmp (char *s1, char *s2, int n)

Return the result of a strncmp(3) library call.

cStrncpy (char *s1, char *s2, int n)

Return the result of a strncpy(3) library call.

cRand (void)

Return the result of a rand(3) library call.

This class is not complete. The use of C library functions is described later in this manual. See C library functions.


Up: Classes   [Index]