1 //====================================================================== 2 // script_parsing.h (FLDIGI) 3 // 4 // Author(s): 5 // 6 // Robert Stiles, KK5VD, Copyright (C) 2014 7 // 8 // This is free software; you can redistribute it and/or modify 9 // it under the terms of the GNU General Public License as published by 10 // the Free Software Foundation; either version 3 of the License, or 11 // (at your option) any later version. 12 // 13 // This software is distributed in the hope that it will be useful, 14 // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 // GNU General Public License for more details. 17 // 18 // You should have received a copy of the GNU General Public License 19 // along with this program. If not, see <http://www.gnu.org/licenses/>. 20 // ===================================================================== 21 22 #ifndef __script_parsing__ 23 #define __script_parsing__ 24 25 #include <string> 26 #include <stdio.h> 27 28 #ifdef __WIN32__ 29 #define PATH_SEPERATOR "\\" 30 #define PATH_CHAR_SEPERATOR '\\' 31 #include <direct.h> 32 #define get_current_dir _getcwd 33 #else 34 #define PATH_SEPERATOR "/" 35 #define PATH_CHAR_SEPERATOR '/' 36 #include <unistd.h> 37 #define get_current_dir getcwd 38 #endif 39 40 #define MAX_CMD_PARAMETERS 5 41 #define MAX_COMMAND_LENGTH 128 42 #define MAX_PARAMETER_LENGTH FILENAME_MAX 43 #define MAX_READLINE_LENGTH (FILENAME_MAX+FILENAME_MAX) 44 #define MAX_SUB_SCRIPTS 5 45 46 #define SCRIPT_FILE_TAG ((char *)"FLDIGI_CONFIG") 47 #define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) 48 49 #define RESET_ALL 0x01 50 #define RESET_PARTIAL 0X02 51 52 #undef __LOCALIZED_SCRIPT_COMMANDS 53 #ifdef __LOCALIZED_SCRIPT_COMMANDS 54 #pragma message ( \ 55 "\n" \ 56 "************************************************************************\n" \ 57 "* Defining __LOCALIZED_SCRIPT_COMMANDS breaks script compatibility. In *\n" \ 58 "* doing so, FLDIGI development team does not assume responsibility for *\n" \ 59 "* maintaining the code sections that are altered/effected as a result. *\n" \ 60 "************************************************************************\n" ) 61 #define F_LOC(a) _(a) 62 #else 63 #define F_LOC(a) a 64 #endif 65 66 #define CMD_OPERATOR F_LOC("OPERATOR") 67 #define CMD_CALLSIGN F_LOC("CALLSIGN") 68 #define CMD_NAME F_LOC("NAME") 69 #define CMD_QTH F_LOC("QTH") 70 #define CMD_LOCATOR F_LOC("LOC") 71 #define CMD_ANTENNA F_LOC("ANT") 72 73 #define CMD_AUDIO_DEVICE F_LOC("AUDIO DEVICE") 74 #define CMD_OSS_AUDIO F_LOC("OSS") 75 #define CMD_OSS_AUDIO_DEV_PATH F_LOC("OSS DEV") 76 #define CMD_PORT_AUDIO F_LOC("PA") 77 #define CMD_PORTA_CAP F_LOC("PA CAPTURE") 78 #define CMD_PORTA_PLAY F_LOC("PA PLAYBACK") 79 #define CMD_PULSEA F_LOC("PUA") 80 #define CMD_PULSEA_SERVER F_LOC("PUA SERVER") 81 82 #define CMD_AUDIO_SETTINGS F_LOC("AUDIO SETTINGS") 83 #define CMD_CAPTURE_SAMPLE_RATE F_LOC("CAPTURE") 84 #define CMD_PLAYBACK_SAMPLE_RATE F_LOC("PLAYBACK") 85 #define CMD_AUDIO_CONVERTER F_LOC("CONVERTER") 86 #define CMD_RX_PPM F_LOC("RX PPM") 87 #define CMD_TX_PPM F_LOC("TX PPM") 88 #define CMD_TX_OFFSET F_LOC("TX OFFSET") 89 90 #define CMD_AUDIO_RT_CHANNEL F_LOC("AUDIO RT CHANNEL") 91 #define CMD_MONO_AUDIO F_LOC("MONO AUDIO") 92 #define CMD_AUDIO_L_R F_LOC("MODEM LR") 93 #define CMD_AUDIO_REV_L_R F_LOC("REV LR") 94 #define CMD_PTT_RIGHT_CHAN F_LOC("PTT RT CHAN") 95 #define CMD_CW_QSK_RT_CHAN F_LOC("QSK RT CHAN") 96 #define CMD_PSEUDO_FSK_RT_CHAN F_LOC("FSK RT CHAN") 97 98 #define CMD_AUDIO_WAVE F_LOC("AUDIO WAVE") 99 #define CMD_WAVE_SR F_LOC("SRATE") 100 101 #define CMD_HRDWR_PTT F_LOC("RIG HRDWR PTT") 102 #define CMD_HPPT_PTT_RT F_LOC("PTT RT CHAN") 103 #define CMD_HPTT_SP2 F_LOC("SERIAL PORT") 104 #define CMD_HPTT_SP2_PATH F_LOC("DEVICE") 105 #define CMD_HPTT_SP2_RTS F_LOC("RTS") 106 #define CMD_HPTT_SP2_DTR F_LOC("DTR") 107 #define CMD_HPTT_SP2_RTS_V F_LOC("RTSV") 108 #define CMD_HPTT_SP2_DTR_V F_LOC("DTRV") 109 #define CMD_HPTT_SP2_START_DELAY F_LOC("START PTT DELAY") 110 #define CMD_HPTT_SP2_END_DELAY F_LOC("END PTT DELAY") 111 #define CMD_HPTT_UHROUTER F_LOC("UHROUTER") 112 #define CMD_HPTT_PARALLEL F_LOC("PARALLEL") 113 #define CMD_HPTT_SP2_INITIALIZE F_LOC("INIT") 114 115 #define CMD_RIGCAT F_LOC("RIGCAT") 116 #define CMD_RIGCAT_STATE F_LOC("STATE") 117 #define CMD_RIGCAT_DESC_FILE F_LOC("DESC FILE") 118 #define CMD_RIGCAT_DEV_PATH F_LOC("DEV PATH") 119 #define CMD_RIGCAT_RETRIES F_LOC("RETRIES") 120 #define CMD_RIGCAT_RETRY_INTERVAL F_LOC("RETRY INT") 121 #define CMD_RIGCAT_WRITE_DELAY F_LOC("WDELAY") 122 #define CMD_RIGCAT_INTIAL_DELAY F_LOC("IDELAY") 123 #define CMD_RIGCAT_BAUD_RATE F_LOC("BRATE") 124 #define CMD_RIGCAT_STOP_BITS F_LOC("SBITS") 125 #define CMD_RIGCAT_ECHO F_LOC("ECHO") 126 #define CMD_RIGCAT_TOGGLE_RTS_PTT F_LOC("TOGGLE RTS PTT") 127 #define CMD_RIGCAT_TOGGLE_DTR_PTT F_LOC("TOGGLE DTR PTT") 128 #define CMD_RIGCAT_RESTORE F_LOC("RESTORE") 129 #define CMD_RIGCAT_PTT_COMMAND F_LOC("PTT COMMAND") 130 #define CMD_RIGCAT_RTS_12V F_LOC("RTS 12V") 131 #define CMD_RIGCAT_DTR_12V F_LOC("DTR 12V") 132 #define CMD_RIGCAT_HRDWR_FLOW F_LOC("HRDWR FC") 133 #define CMD_RIGCAT_VSP F_LOC("VSP") 134 #define CMD_RIGCAT_INITIALIZE F_LOC("INIT") 135 136 #define CMD_HAMLIB F_LOC("HAMLIB") 137 #define CMD_HAMLIB_STATE F_LOC("STATE") 138 #define CMD_HAMLIB_RIG F_LOC("RIG") 139 #define CMD_HAMLIB_DEV_PATH F_LOC("DEV PATH") 140 #define CMD_HAMLIB_RETRIES F_LOC("RETRIES") 141 #define CMD_HAMLIB_RETRY_INTERVAL F_LOC("RETRY INT") 142 #define CMD_HAMLIB_WRITE_DELAY F_LOC("WDELAY") 143 #define CMD_HAMLIB_POST_WRITE_DELAY F_LOC("PWDELAY") 144 #define CMD_HAMLIB_BAUD_RATE F_LOC("BRATE") 145 #define CMD_HAMLIB_STOP_BITS F_LOC("SBITS") 146 #define CMD_HAMLIB_POLL_RATE F_LOC("POLL_RATE") 147 #define CMD_HAMLIB_SIDE_BAND F_LOC("SBAND") 148 #define CMD_HAMLIB_PTT_COMMAND F_LOC("PTT COMMAND") 149 #define CMD_HAMLIB_DTR_12V F_LOC("DTR 12V") 150 #define CMD_HAMLIB_RTS_12V F_LOC("RTS 12V") 151 #define CMD_HAMLIB_HRDWR_FLOW F_LOC("HRDWR FC") 152 #define CMD_HAMLIB_SFTWR_FLOW F_LOC("SFTWR FC") 153 #define CMD_HAMLIB_ADV_CONFIG F_LOC("ADV CONF") 154 #define CMD_HAMLIB_INITIALIZE F_LOC("INIT") 155 156 #define CMD_RC_XMLRPC F_LOC("XMLRPC RC") 157 #define CMD_RC_XMLRPC_STATE F_LOC("STATE") 158 #define CMD_RC_XMLRPC_BW_DELAY F_LOC("BWDELAY") 159 #define CMD_RC_XMLRPC_INITIALIZE F_LOC("INIT") 160 161 #define CMD_FLDIGI F_LOC("FLDIGI") 162 #define CMD_FLDIGI_FREQ F_LOC("FREQ") 163 #define CMD_FLDIGI_MODE F_LOC("MODE") 164 #define CMD_FLDIGI_WFHZ F_LOC("WFHZ") 165 #define CMD_FLDIGI_RXID F_LOC("RXID") 166 #define CMD_FLDIGI_TXID F_LOC("TXID") 167 #define CMD_FLDIGI_SPOT F_LOC("SPOT") 168 #define CMD_FLDIGI_REV F_LOC("REV") 169 #define CMD_FLDIGI_LOCK F_LOC("LOCK") 170 #define CMD_FLDIGI_AFC F_LOC("AFC") 171 #define CMD_FLDIGI_SQL F_LOC("SQL") 172 #define CMD_FLDIGI_KPSQL F_LOC("KPSQL") 173 #define CMD_FLDIGI_KPSM F_LOC("KPSM") 174 #define CMD_FLDIGI_MODEM F_LOC("MODEM") 175 176 #define CMD_IO F_LOC("IO") 177 #define CMD_IO_LOCK F_LOC("LOCK") 178 #define CMD_IO_ACT_PORT F_LOC("PORT") 179 #define CMD_IO_AX25_DECODE F_LOC("AX25D") 180 #define CMD_IO_CSMA F_LOC("CSMA") 181 #define CMD_IO_KISS F_LOC("KISS") 182 #define CMD_IO_KISS_IPA F_LOC("IPA") 183 #define CMD_IO_KISS_IOPN F_LOC("IOPN") 184 #define CMD_IO_KISS_OPN F_LOC("OPN") 185 #define CMD_IO_KISS_DP F_LOC("DP") 186 #define CMD_IO_KISS_BUSY F_LOC("BUSY") 187 #define CMD_IO_KISS_CONT F_LOC("CONT") 188 #define CMD_IO_KISS_ATTEN F_LOC("ATTEN") 189 #define CMD_IO_ARQ F_LOC("ARQ") 190 #define CMD_IO_ARQ_IPA F_LOC("IPA") 191 #define CMD_IO_ARQ_IOPN F_LOC("IOPN") 192 #define CMD_IO_XMLRPC F_LOC("XMLRPC") 193 #define CMD_IO_XMLRPC_IPA F_LOC("IPA") 194 #define CMD_IO_XMLRPC_IOPN F_LOC("IOPN") 195 196 #define CMD_NBEMS F_LOC("MISC NBEMS") 197 #define CMD_NBEMS_STATE F_LOC("STATE") 198 #define CMD_NBEMS_MSG F_LOC("OPEN MSG") 199 #define CMD_NBEMS_FLMSG F_LOC("OPEN FLMSG") 200 #define CMD_NBEMS_FLMSG_PATH F_LOC("PATH") 201 #define CMD_NBEMS_BRWSR F_LOC("OPEN BRWSR") 202 #define CMD_NBEMS_TIMEOUT F_LOC("TIMEOUT") 203 204 #define CMD_ID F_LOC("ID") 205 #define CMD_ID_RSID F_LOC("RSID") 206 #define CMD_ID_RSID_NOTIFY F_LOC("NOTIFY") 207 #define CMD_ID_RSID_SRCH_BP F_LOC("SRCH BP") 208 #define CMD_ID_RSID_MARK_PREV F_LOC("MARK PREV") 209 #define CMD_ID_RSID_DETECTOR F_LOC("DETECTOR") 210 #define CMD_ID_RSID_ALRT_DIALOG F_LOC("ALRT DIALOG") 211 #define CMD_ID_RSID_TX_FREQ_LOCK F_LOC("TX FREQ LOCK") 212 #define CMD_ID_RSID_FREQ_CHANGE F_LOC("FREQ CHANGE") 213 #define CMD_ID_RSID_ALLOW_ERRORS F_LOC("ALLOW ERRORS") 214 #define CMD_ID_RSID_SQL_OPEN F_LOC("SQL OPEN") 215 #define CMD_ID_RSID_PRETONE F_LOC("PRETONE") 216 #define CMD_ID_RSID_END_XMT_ID F_LOC("END XMT ID") 217 #define CMD_ID_VIDEO F_LOC("VIDEO") 218 #define CMD_ID_VIDEO_TX_ID_MODE F_LOC("ID MODE") 219 #define CMD_ID_VIDEO_TX_VIDEO_TXT F_LOC("VIDEO TXT") 220 #define CMD_ID_VIDEO_TX_TXT_INP F_LOC("TEXT INPUT") 221 #define CMD_ID_VIDEO_SMALL_FONT F_LOC("SMALL FONT") 222 #define CMD_ID_VIDEO_500_HZ F_LOC("500HZ") 223 #define CMD_ID_VIDEO_WIDTH_LIMIT F_LOC("WIDTH LIMIT") 224 #define CMD_ID_VIDEO_CHAR_ROW F_LOC("CHAR ROW") 225 #define CMD_ID_CW F_LOC("CW") 226 #define CMD_ID_CW_TX_CALLSIGN F_LOC("TX CALL") 227 #define CMD_ID_CW_SPEED F_LOC("SPEED") 228 229 230 #define CMD_LOAD_MACRO F_LOC("MACRO") 231 #define CMD_END_CMD F_LOC("END") 232 233 // Parameters localized - no restrictions. 234 235 #define PARM_ENABLE _("ENABLE") 236 #define PARM_YES _("YES") 237 #define PARM_DISABLE _("DISABLE") 238 #define PARM_NO _("NO") 239 #define PARM_KISS _("KISS") 240 #define PARM_ARQ _("ARQ") 241 242 #define SCRIPT_COMMAND 0x0001 243 #define SCRIPT_DOT_NOTATION_ONLY 0x0002 244 #define SCRIPT_STRUCTURED_ONLY 0x0004 245 246 #define RECURSIVE_LIMIT 3 247 #define MAX_DELETE_LIST_COUNT 100 248 249 //! @enum script_codes 250 //! Error codes. 251 252 //! @typedef SCRIPT_CODES 253 //! @see script_codes 254 255 typedef enum script_codes { 256 script_recursive_limit_reached = -100, //!< Reached command recursive limit. 257 script_command_not_found = -100, //!< Script command not found. 258 script_unexpected_eof, //!< Unexspected end of file reached. 259 script_file_read_error, //!< File read error 260 script_errors_reported, //!< Script Errors found during parsing of file. 261 script_file_not_found, //!< Script file not found. 262 script_path_not_found, //!< Script directory path not found. 263 script_device_path_not_found, //!< Script device path not found. 264 script_non_script_file, //!< Opened file not a Script file. 265 script_max_sub_script_reached, //!< Maximum open subscripts reached. 266 script_subscript_exec_fail, //!< Subscript execution fail (internal). 267 script_incorrectly_assigned_value, //!< Incorrect parameter type. 268 script_invalid_parameter, //!< Parameter is not valid. 269 script_parameter_error, //!< Script parameter invalid. 270 script_function_parameter_error, //!< Function parameter error (internal, non script error). 271 script_mismatched_quotes, //!< Opening or closing quotes missing prior to reaching end if line. 272 script_command_seperator_missing, //!< Command missing ':' 273 script_args_eol, //!< Reached end of args list sooner then expected 274 script_param_check_eol, //!< Reached end of parameter check list sooner then expected 275 script_paramter_exceeds_length, //!< Data length exceeds expectations 276 script_memory_allocation_error, //!< Memory Allocation Error (Non-Script internal Error). 277 script_general_error = -1, //!< General purpose error (undefined erros). 278 script_no_errors, //!< No Errors 279 script_char_match_not_found, //!< Search char not found (Warning) 280 script_end_of_line_reached, //!< End of line reached (Warning) 281 script_end_of_list_reached, //!< End of list reached (Info) 282 script_list, //!< List command (Info) 283 script_command_handled, //!< Command was procedded and handled (Info) 284 } SCRIPT_CODES; 285 286 287 //! @enum paramter_types 288 //! Parameter type flags. Used to validate the informarion. 289 290 //! @typedef PARAM_TYPES 291 //! @see paramter_types 292 293 typedef enum paramter_types { 294 p_null = 0, 295 p_void, 296 p_bool, 297 p_char, 298 p_int, 299 p_unsigned_int, 300 p_long, 301 p_unsigned_long, 302 p_float, 303 p_double, 304 p_string, 305 p_path, 306 p_filename, 307 p_dev_path, 308 p_dev_name, 309 p_list, 310 p_list_end 311 } PARAM_TYPES; 312 313 class ScriptParsing; 314 315 //! @struct script_cmds 316 //! Vector table of script command string and executing function member. 317 318 //! @typedef SCRIPT_COMMANDS 319 //! @see script_cmds 320 typedef struct script_cmds { 321 char command[MAX_COMMAND_LENGTH]; //!< Command matching string. 322 int flags; //!< General purpose flags 323 size_t command_length; //!< Number of chacters in the command string. 324 int argc; //!< Number of required prarmeters for the command 325 char *args[MAX_CMD_PARAMETERS+1]; //!< String vector table of parameters 326 enum paramter_types param_check[MAX_CMD_PARAMETERS+1]; //!< Flags to determine type of parameter. 327 const char **valid_values; //!< A list of valid paramters. 328 int valid_value_count; //!< The number of valid paramters. 329 SCRIPT_CODES (ScriptParsing::*func)(struct script_cmds *); //!< The function (member) to execute on positive match 330 int (*cb)(ScriptParsing *sp, struct script_cmds *sd); //!< Call back function for script command 331 struct script_cmds * sub_commands; //!< List of sub commands 332 size_t sub_command_count; //!< Number of table entires in the sub table. 333 } SCRIPT_COMMANDS; 334 335 //! @class script_parsing_class 336 class ScriptParsing { 337 338 public: 339 340 private: 341 pthread_mutex_t ac; //<! Thread safe data access 342 int recursive_count; 343 bool _script_error_detected; 344 bool _restart_flag; 345 346 FILE *fd; 347 int line_number; 348 // Storage for each parameter 349 350 // Special processing data storage. 351 std::string _macro_command; 352 353 // Internal Class Variables. 354 355 std::string _path; 356 int _file_type; 357 358 SCRIPT_COMMANDS *_script_commands; //!< Table of commands and vector functions @see script_cmds 359 size_t _script_command_count; //!< Number of assigned positions in the table. 360 361 ScriptParsing *_parent; //!< Calling ScriptParsing pointer. Primarly used for the reset command on the local 'this' pointer. 362 363 // Keep track of what needs to be deleted on exit (deallocation). 364 SCRIPT_COMMANDS * memory_delete_list[MAX_DELETE_LIST_COUNT]; 365 int delete_list_count; // Number of entries in the table. 366 367 368 char line_buffer[MAX_READLINE_LENGTH + 1]; //!< Line buffer for script read operations. 369 char error_cmd_buffer[MAX_COMMAND_LENGTH]; 370 char error_string[MAX_COMMAND_LENGTH]; 371 char error_buffer[MAX_COMMAND_LENGTH + MAX_COMMAND_LENGTH + 1]; 372 373 SCRIPT_COMMANDS *top_cache; 374 375 public: 376 377 // Aceess methods for special processing data macro_command(void)378 std::string macro_command(void) { return _macro_command; } macro_command(std::string str)379 void macro_command(std::string str) { _macro_command.assign(str); } 380 restart_flag(void)381 bool restart_flag(void) { return _restart_flag; } restart_flag(bool value)382 void restart_flag(bool value) { _restart_flag = value; } 383 script_errors(void)384 bool script_errors(void) { return _script_error_detected; } 385 // Parsing/varification routine for each of the commands. 386 387 SCRIPT_CODES check_parameters(struct script_cmds *); 388 SCRIPT_CODES check_filename(char *filename); 389 SCRIPT_CODES check_path(const char *); 390 SCRIPT_CODES check_numbers(char *, paramter_types p); 391 SCRIPT_CODES check_dev_path(const char *path); 392 SCRIPT_CODES check_bool(const char *value, bool &flag); 393 394 void to_uppercase(char *str, int limit); 395 void to_uppercase(std::string &str); 396 void trim(char *buffer, size_t size); 397 std::string &trim(std::string &s); 398 399 // Script handling code. 400 401 inline SCRIPT_CODES test_on_off_state(bool &state, char *string, char *true_state); 402 script_commands(void)403 SCRIPT_COMMANDS * script_commands(void) { return _script_commands; } script_commands(SCRIPT_COMMANDS * ptr)404 void script_commands(SCRIPT_COMMANDS *ptr) { if(ptr) _script_commands = ptr; } 405 script_command_count(void)406 size_t script_command_count(void) { return _script_command_count; } script_command_count(size_t value)407 void script_command_count(size_t value) { _script_command_count = value; } 408 409 410 // Internal script fuctions 411 412 SCRIPT_CODES parse_commands(char *file_name_path); //!< The calling function to parse a script file. 413 SCRIPT_CODES read_file(FILE *fd, SCRIPT_COMMANDS *cur_list, size_t limit); 414 parent(void)415 ScriptParsing *parent(void) { return _parent; } parent(ScriptParsing * value)416 void parent(ScriptParsing *value) { _parent = value; } 417 418 419 int assign_callback(const char *scriptCommand, int (*cb)(ScriptParsing *sp, SCRIPT_COMMANDS *sc)); 420 int assign_valid_parameters(const char *command, const char **array, const int array_count); 421 422 void defaults(bool all); 423 ScriptParsing(); 424 ~ScriptParsing(); 425 426 private: 427 428 // Special processing member. 429 SCRIPT_CODES sc_macros(struct script_cmds *cmd); 430 431 // Internal class routines 432 433 void add_to_delete_list(SCRIPT_COMMANDS *); 434 435 SCRIPT_CODES sc_dummy(struct script_cmds *); 436 SCRIPT_CODES remove_crlf_comments(char *data, char *limit, size_t &count); 437 SCRIPT_CODES parse_single_command(FILE *fd, SCRIPT_COMMANDS *cur_list, size_t limit, char *data, size_t buffer_size); 438 SCRIPT_CODES parse_hierarchy_command(char *data, size_t buffer_size); 439 440 int copy_tables(struct script_cmds * subcmds, size_t count); 441 path(void)442 std::string path(void) { return _path; } file_type(void)443 int file_type(void) { return _file_type; } file_type(int value)444 void file_type(int value) { _file_type = value; } 445 446 SCRIPT_COMMANDS * search_command(SCRIPT_COMMANDS * table, size_t limit, const char *command); 447 SCRIPT_CODES copy_string_uppercase(char *buffer, char *cPtr, char *ePtr, size_t limit); 448 SCRIPT_CODES parse_parameters(char *s, char *d, SCRIPT_COMMANDS *matching_command); 449 450 int call_callback(SCRIPT_COMMANDS *cb_data); 451 int check_parameters_from_list(SCRIPT_COMMANDS *sc); 452 int CopyScriptParsingEnv(ScriptParsing *src); 453 void clear_script_parameters(bool all); 454 455 SCRIPT_CODES assign_member_func(char *cmd, SCRIPT_CODES (ScriptParsing::*func)(struct script_cmds *)); 456 457 void initialize_function_members(void); 458 459 int str_cnt(char * str, int count_limit); 460 461 char * script_error_string(SCRIPT_CODES error_no, int ln, char *cmd); 462 char * skip_alpha_numbers(char * data, char *limit, SCRIPT_CODES &error); 463 char * skip_characters(char * data, char *limit, SCRIPT_CODES &error); 464 char * skip_numbers(char * data, char *limit, SCRIPT_CODES &error); 465 char * skip_spaces(char * data, char *limit, SCRIPT_CODES &error); 466 char * skip_to_character(char c, char * data, char *limit, SCRIPT_CODES &error); 467 char * skip_white_spaces(char * data, char *limit, SCRIPT_CODES &error); 468 }; 469 470 int callback_dummy(ScriptParsing *sp, struct script_cmds *sc); 471 472 #endif /* defined(__script_parsing__) */ 473