Page 134 - Programming Microcontrollers in C
P. 134

Miscellaneous Functions     119

                            void free(void *p);
                            void abort(void);
                            int atexit(void(*fcn)(void));
                            void exit(int status);
                            int system(const char *name);

                          Non-local Jumps—in setjmp.h

                            int setjmp(env);
                            int longjmp(env,int);

                          Diagnostics—in assert.h

                            The macro assert() is defined in assert.h

                          Signals— in signal.h
                            void (*signal(int sig, void (*sighandler)(int)))(int);
                            int raise(int sig);

                          Date and Time Functions —in time.h
                            char *asctime(struct tm *timeptr);
                            clock_t  clock(void);
                            char *ctime(time_t *timer);
                            double difftime(time_t time2, time_t time1);
                            struct tm *gmtime(time_t *timer);
                            struct tm *localtime(time_t *timer);
                            time_t mktime(struct tm *timeptr);
                            size_t strftime(char *buffer, size_t bufsize, char *format,
                                struct tm *timeptr);
                            time_t time(time_t *timer);
                          Standard input and output—in stdio.h

                            void          clearerr(FILE *fp);
                            int           fclose(FILE *fp);
                            int           feof(FILE *fp);
                            int           ferror(FILE *fp);
                            int           fflush(FILE *fp);
                            int           fgetc(FILE *fp);
                            int           fgetpos(FILE *fp, fpos_t *pos);
                            char          *fgets(char *buffer, int n, FILE *fp);
                            FILE          *fopen(char *filename, char *access);
   129   130   131   132   133   134   135   136   137   138   139