8. Language-Specific Services for the C Programming Language Manager#

8.1. Introduction#

The language-specific services for the C programming language manager is …

The directives provided by the language-specific services for the C programming language manager are:

  • setlocale - Set the Current Locale

  • fileno - Obtain File Descriptor Number for this File

  • fdopen - Associate Stream with File Descriptor

  • flockfile - Acquire Ownership of File Stream

  • ftrylockfile - Poll to Acquire Ownership of File Stream

  • funlockfile - Release Ownership of File Stream

  • getc_unlocked - Get Character without Locking

  • getchar_unlocked - Get Character from stdin without Locking

  • putc_unlocked - Put Character without Locking

  • putchar_unlocked - Put Character to stdin without Locking

  • setjmp - Save Context for Non-Local Goto

  • longjmp - Non-Local Jump to a Saved Context

  • sigsetjmp - Save Context with Signal Status for Non-Local Goto

  • siglongjmp - Non-Local Jump with Signal Status to a Saved Context

  • tzset - Initialize Time Conversion Information

  • strtok_r - Reentrant Extract Token from String

  • asctime_r - Reentrant struct tm to ASCII Time Conversion

  • ctime_r - Reentrant time_t to ASCII Time Conversion

  • gmtime_r - Reentrant UTC Time Conversion

  • localtime_r - Reentrant Local Time Conversion

  • rand_r - Reentrant Random Number Generation

8.2. Background#

There is currently no text in this section.

8.3. Operations#

There is currently no text in this section.

8.4. Directives#

This section details the language-specific services for the C programming language manager’s directives. A subsection is dedicated to each of this manager’s directives and describes the calling sequence, related constants, usage, and status codes.

8.4.1. setlocale - Set the Current Locale#

CALLING SEQUENCE:

#include <locale.h>
char *setlocale(int category, const char *locale);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.2. fileno - Obtain File Descriptor Number for this File#

CALLING SEQUENCE:

#include <stdio.h>
int fileno(FILE *stream);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.3. fdopen - Associate Stream with File Descriptor#

CALLING SEQUENCE:

#include <stdio.h>
FILE *fdopen(int fildes, const char *mode);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.4. flockfile - Acquire Ownership of File Stream#

CALLING SEQUENCE:

#include <stdio.h>
void flockfile(FILE *file);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.5. ftrylockfile - Poll to Acquire Ownership of File Stream#

CALLING SEQUENCE:

#include <stdio.h>
int ftrylockfile(FILE *file);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.6. funlockfile - Release Ownership of File Stream#

CALLING SEQUENCE:

#include <stdio.h>
void funlockfile(FILE *file);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.7. getc_unlocked - Get Character without Locking#

CALLING SEQUENCE:

#include <stdio.h>
int getc_unlocked(FILE *stream);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.8. getchar_unlocked - Get Character from stdin without Locking#

CALLING SEQUENCE:

#include <stdio.h>
int getchar_unlocked(void);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.9. putc_unlocked - Put Character without Locking#

CALLING SEQUENCE:

#include <stdio.h>
int putc_unlocked(int c, FILE *stream);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.10. putchar_unlocked - Put Character to stdin without Locking#

CALLING SEQUENCE:

#include <stdio.h>
int putchar_unlocked(int c);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.11. setjmp - Save Context for Non-Local Goto#

CALLING SEQUENCE:

#include <setjmp.h>
int setjmp(jmp_buf env);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.12. longjmp - Non-Local Jump to a Saved Context#

CALLING SEQUENCE:

#include <setjmp.h>
void longjmp(jmp_buf env, int val);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.13. sigsetjmp - Save Context with Signal Status for Non-Local Goto#

CALLING SEQUENCE:

#include <setjmp.h>
int sigsetjmp(sigjmp_buf env, int savemask);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.14. siglongjmp - Non-Local Jump with Signal Status to a Saved Context#

CALLING SEQUENCE:

#include <setjmp.h>
void siglongjmp(sigjmp_buf env, int val);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.15. tzset - Initialize Time Conversion Information#

CALLING SEQUENCE:

#include <time.h>
extern int daylight;
extern long timezone;
extern char *tzname[2];
void tzset(void);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.16. strtok_r - Reentrant Extract Token from String#

CALLING SEQUENCE:

#include <string.h>
char *strtok_r(char *restrict s, const char *restrict sep,
char **restrict state);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.17. asctime_r - Reentrant struct tm to ASCII Time Conversion#

CALLING SEQUENCE:

#include <time.h>
char *asctime_r(const struct tm *restrict tm, char *restrict buf);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.18. ctime_r - Reentrant time_t to ASCII Time Conversion#

CALLING SEQUENCE:

#include <time.h>
char *ctime_r(const time_t *clock, char *buf);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.19. gmtime_r - Reentrant UTC Time Conversion#

CALLING SEQUENCE:

#include <time.h>
struct tm *gmtime_r(const time_t *restrict timer,
struct tm *restrict result);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.20. localtime_r - Reentrant Local Time Conversion#

CALLING SEQUENCE:

#include <time.h>
struct tm *localtime_r(const time_t *restrict timer,
struct tm *restrict result);

STATUS CODES:

E

The

DESCRIPTION:

NOTES:

8.4.21. rand_r - Reentrant Random Number Generation#

CALLING SEQUENCE:

#include <stdlib.h>
int rand_r(unsigned *seed);

STATUS CODES:

E

The

DESCRIPTION:

NOTES: