#include "form.priv.h"Go to the source code of this file.
Defines | |
| #define | A_SIZE (sizeof(request_names)/sizeof(request_names[0])) |
Functions | |
| form_request_name (int request) | |
| form_request_by_name (const char *str) | |
Variables | |
| static const char * | request_names [MAX_FORM_COMMAND-MIN_FORM_COMMAND+1] |
|
|
Definition at line 107 of file frm_req_name.c. Referenced by form_request_by_name(), and menu_request_by_name(). |
|
|
Definition at line 142 of file frm_req_name.c. References _nc_visbuf(), A_SIZE, buf, E_NO_MATCH, MIN_FORM_COMMAND, request_names, RETURN, returnCode, T, and T_CALLED. 00143 { 00144 /* because the table is so small, it doesn't really hurt 00145 to run sequentially through it. 00146 */ 00147 unsigned int i = 0; 00148 char buf[16]; 00149 00150 T((T_CALLED("form_request_by_name(%s)"), _nc_visbuf(str))); 00151 00152 if (str) 00153 { 00154 strncpy(buf, str, sizeof(buf)); 00155 while ((i < sizeof(buf)) && (buf[i] != '\0')) 00156 { 00157 buf[i] = toupper(buf[i]); 00158 i++; 00159 } 00160 00161 for (i = 0; i < A_SIZE; i++) 00162 { 00163 if (strncmp(request_names[i], buf, sizeof(buf)) == 0) 00164 returnCode(MIN_FORM_COMMAND + (int) i); 00165 } 00166 } 00167 RETURN(E_NO_MATCH); 00168 }
|
|
|
Definition at line 119 of file frm_req_name.c. References E_BAD_ARGUMENT, MAX_FORM_COMMAND, MIN_FORM_COMMAND, request_names, returnCPtr, SET_ERROR, T, and T_CALLED. 00120 { 00121 T((T_CALLED("form_request_name(%d)"), request)); 00122 00123 if ((request < MIN_FORM_COMMAND) || (request > MAX_FORM_COMMAND)) 00124 { 00125 SET_ERROR(E_BAD_ARGUMENT); 00126 returnCPtr((const char *)0); 00127 } 00128 else 00129 returnCPtr(request_names[request - MIN_FORM_COMMAND]); 00130 }
|
|
|
Definition at line 42 of file frm_req_name.c. Referenced by form_request_by_name(), form_request_name(), menu_request_by_name(), and menu_request_name(). |