YACASL2
Loading...
Searching...
No Matches
cerr.h
Go to the documentation of this file.
1#ifndef YACASL2_CERR_H_INCLUDED
2#define YACASL2_CERR_H_INCLUDED
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7#include <assert.h>
8#include <stdbool.h>
9#include "cmem.h"
10
14typedef struct _CERR {
15 int num;
16 char *msg;
18
22extern CERR *cerr;
23
27typedef struct _CERRLIST {
28 struct _CERRLIST *next;
31
35extern CERRLIST *cerrlist;
36
37enum {
40};
41
46void cerr_init();
47
55void addcerrlist(int cerrc, CERR cerrv[]);
56
61void printcerrlist();
62
69void setcerr(int num, const char *str);
70
78char *getcerrmsg(int num);
79
84void freecerr();
85#endif
CERR * cerr
現在のエラー
Definition cerr.c:9
@ CERRSTRSIZE
Definition cerr.h:38
@ CERRMSGSIZE
Definition cerr.h:39
struct _CERR CERR
エラーを表すデータ型
void addcerrlist(int cerrc, CERR cerrv[])
エラーリストを作成・追加する
Definition cerr.c:13
void freecerr()
エラーリストと現在のエラーを解放する
Definition cerr.c:72
void printcerrlist()
エラーリストを表示する
Definition cerr.c:32
CERRLIST * cerrlist
エラーリスト
Definition cerr.c:11
char * getcerrmsg(int num)
エラー番号に対応するエラーメッセージを返す
Definition cerr.c:58
void cerr_init()
エラーを初期化する
Definition cerr.c:3
void setcerr(int num, const char *str)
現在のエラーを設定する
Definition cerr.c:45
struct _CERRLIST CERRLIST
エラーリストのデータ型
エラーを表すデータ型
Definition cerr.h:14
char * msg
Definition cerr.h:16
int num
Definition cerr.h:15
エラーリストのデータ型
Definition cerr.h:27
CERR * cerr
Definition cerr.h:29
struct _CERRLIST * next
Definition cerr.h:28