JunkBox_Lib  1.10.2
jbxl_state_func.c File Reference

エラーメッセージ用ライブラリ More...

#include "tlist.h"
#include "jbxl_state.h"
Include dependency graph for jbxl_state_func.c:

Go to the source code of this file.

Functions

void jbxl_fprint_state (FILE *fp, int no)
 
void jbxl_fprint_state_jp (FILE *fp, int no)
 
void jbxl_init_state_info (void)
 
void jbxl_add_state (int id, const char *smb, const char *str)
 

Variables

tList_jbxl_state_list = NULL
 
tList_jbxl_state_pointer = NULL
 

Detailed Description

Author
Fumi.Iseki (C)

Definition in file jbxl_state_func.c.

Function Documentation

◆ jbxl_add_state()

void jbxl_add_state ( int  id,
const char *  smb,
const char *  str 
)

Definition at line 79 of file jbxl_state_func.c.

80 {
82 }
tList * _jbxl_state_pointer
tList * add_tList_node_bystr(tList *pp, int id, int lv, const char *key, const char *val, void *ptr, int sz)
文字列データからリスト用ノードを生成し(new),それをリストに追加.
Definition: tlist.c:462

References _jbxl_state_pointer, and add_tList_node_bystr().

Referenced by jbxl_init_state_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jbxl_fprint_state()

void jbxl_fprint_state ( FILE *  fp,
int  no 
)

void jbxl_fprint_state(FILE* fp, int no)

JBXLライブラリの state の情報を表示する. デバッグ用.

Parameters
fp出力先のファイル識別子
noJBXLライブラリの state番号

Definition at line 24 of file jbxl_state_func.c.

25 {
26  if (fp==NULL) fp = stderr;
28 
30  if (lt==NULL) {
31  fprintf(fp, "JBXL_STATE: %d: Error Message is not exist!\n", no);
32  }
33  else {
34  fprintf(fp, "JBXL_STATE: %s: %d\n", lt->ldat.key.buf, no);
35  }
36 }
tList * _jbxl_state_list
void jbxl_init_state_info(void)
tList * search_id_tList(tList *pl, int id, int no)
リストの中から no番目の idノード(ldat.id)を探し出し,tListのポインタを返す.
Definition: tlist.c:1541

References _jbxl_state_list, jbxl_init_state_info(), and search_id_tList().

Here is the call graph for this function:

◆ jbxl_fprint_state_jp()

void jbxl_fprint_state_jp ( FILE *  fp,
int  no 
)

void jbxl_fprint_state_jp(FILE* fp, int no)

JBXLライブラリの state の詳細情報(日本語)を表示する. デバッグ用.

Parameters
fp出力先のファイル識別子
noJBXLライブラリの state番号

Definition at line 48 of file jbxl_state_func.c.

49 {
50  if (fp==NULL) fp = stderr;
52 
54  if (lt==NULL) {
55  fprintf(fp, "JBXL_STATE: %d: Error Message is not exist!\n", no);
56  }
57  else {
58  fprintf(fp, "JBXL_STATE: %s: %d: %s\n", lt->ldat.key.buf, no, lt->ldat.val.buf);
59  }
60 }

References _jbxl_state_list, jbxl_init_state_info(), and search_id_tList().

Here is the call graph for this function:

◆ jbxl_init_state_info()

void jbxl_init_state_info ( void  )

Definition at line 66 of file jbxl_state_func.c.

67 {
68  if (_jbxl_state_list!=NULL) {
70  _jbxl_state_pointer = NULL;
71  }
72 
73  jbxl_add_state(JBXL_STATE_ANCHOR, "JBXL_STATE_ANCHOR", "アンカー");
76 }
void jbxl_add_all_states(void)
#define JBXL_STATE_ANCHOR
アンカーノード
Definition: jbxl_state.h:30
void jbxl_add_state(int id, const char *smb, const char *str)
tList * del_tList(tList **pp)
指定したリストノード以降のリストを削除.
Definition: tlist.c:735

References _jbxl_state_list, _jbxl_state_pointer, del_tList(), jbxl_add_all_states(), jbxl_add_state(), and JBXL_STATE_ANCHOR.

Referenced by jbxl_fprint_state(), and jbxl_fprint_state_jp().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _jbxl_state_list

tList* _jbxl_state_list = NULL

Definition at line 11 of file jbxl_state_func.c.

Referenced by jbxl_fprint_state(), jbxl_fprint_state_jp(), and jbxl_init_state_info().

◆ _jbxl_state_pointer

tList* _jbxl_state_pointer = NULL

Definition at line 12 of file jbxl_state_func.c.

Referenced by jbxl_add_state(), and jbxl_init_state_info().