146#define COLUMN_BASED 0
147#define PARAMETER_BASED 1
149#define DATA_CLASS_KEYWORDS 3
153# define sleep(sec) Sleep(sec * 1000)
154# define popen(x, y) _popen(x, y)
155# define pclose(x) _pclose(x)
158extern char *data_class_keyword[DATA_CLASS_KEYWORDS];
170 char *text, *name, *equation, *udf_name, *select, *editSelection, *exclude;
176#define IS_EQUATION_DEFINITION 0
179 char *text, *sscanf_string, *source, *new_name, *edit;
182#define IS_SCAN_DEFINITION 1
185 char *text, *edit_command, *source, *new_name;
186 long is_parameter, reedit;
190#define IS_EDIT_DEFINITION 2
193 char *text, *printf_string, *new_name, **source;
194 long sources, is_parameter, reprint;
195 char *select, *editSelection, *exclude;
197#define IS_PRINT_DEFINITION 3
200 char *parameter_name, *column_name, *description, *symbol, *lower_par, *upper_par;
201 char *head_par, *tail_par, *fhead_par, *ftail_par, *offset_par, *factor_par;
202 char *functionOf, *weightBy, *match_value, *match_column;
203 double lowerLimit, upperLimit, offset, factor, fhead, ftail, topLimit, bottomLimit;
204 double percentileLevel, binSize, defaultValue;
206 long type, outputType;
207 long mode, memory_number;
210#define IS_PROCESSING_DEFINITION 4
211#define PROCESSING_LOLIM_GIVEN 0x000001UL
212#define PROCESSING_UPLIM_GIVEN 0x000002UL
213#define PROCESSING_INVERT_OFFSET 0x000004UL
214#define PROCESSING_DESCRIP_GIVEN 0x000008UL
215#define PROCESSING_FUNCOF_GIVEN 0x000010UL
216#define PROCESSING_TAIL_GIVEN 0x000020UL
217#define PROCESSING_HEAD_GIVEN 0x000040UL
218#define PROCESSING_SYMBOL_GIVEN 0x000080UL
219#define PROCESSING_WEIGHT_GIVEN 0x000100UL
220#define PROCESSING_POSITION_GIVEN 0x000200UL
221#define PROCESSING_OFFSET_GIVEN 0x000400UL
222#define PROCESSING_FACTOR_GIVEN 0x000800UL
223#define PROCESSING_FTAIL_GIVEN 0x001000UL
224#define PROCESSING_FHEAD_GIVEN 0x002000UL
225#define PROCESSING_TOPLIM_GIVEN 0x004000UL
226#define PROCESSING_BOTLIM_GIVEN 0x008000UL
227#define PROCESSING_PERCLEVEL_GIVEN 0x010000UL
228#define PROCESSING_BINSIZE_GIVEN 0x020000UL
229#define PROCESSING_MATCHCOLUMN_GIVEN 0x040000UL
230#define PROCESSING_MATCHVALUE_GIVEN 0x080000UL
231#define PROCESSING_OVERWRITE_GIVEN 0x100000UL
232#define PROCESSING_DEFAULTVALUE_GIVEN 0x200000UL
233#define PROCESSING_INVERT_FACTOR 0x400000UL
236 char *name, *new_units, *old_units;
240#define IS_CONVERSION_DEFINITION 5
248 char *name, *upperPar, *lowerPar;
255 long filter_terms, is_parameter;
257#define IS_FILTER_DEFINITION 6
261 long match_terms, is_parameter;
263#define IS_MATCH_DEFINITION 7
267 long autostop, is_parameter;
269#define IS_RPNTEST_DEFINITION 8
272 char *text, *source, *new_name;
275#define IS_SYSTEM_DEFINITION 9
281#define IS_RPNEXPRESSION_DEFINITION 10
287#define IS_CLIP_DEFINITION 11
290 int64_t interval, offset;
292#define IS_SPARSE_DEFINITION 12
297#define IS_SAMPLE_DEFINITION 13
304#define IS_NUMBERTEST_DEFINITION 14
307 char *target, *source, *stringFormat, *doubleFormat, *longFormat;
310#define IS_FORMAT_DEFINITION 15
313 char *source, *newName, *newTypeName;
317#define IS_CAST_DEFINITION 16
324#define IS_FCLIP_DEFINITION 17
328 double before, after;
332#define TIMEFILTER_BEFORE_GIVEN 0x00001
333#define TIMEFILTER_AFTER_GIVEN 0x00002
334#define TIMEFILTER_INVERT_GIVEN 0x00004
336#define IS_TIME_FILTER_DEFINITION 18
339 char *text, *name, *source, **argv;
342#define IS_EVALUATE_DEFINITION 19
344#define DEFINITION_TYPES 20
364 long parameter_output;
369#define PROCESS_COLUMN_MEAN 0
370#define PROCESS_COLUMN_RMS 1
371#define PROCESS_COLUMN_SUM 2
372#define PROCESS_COLUMN_STAND_DEV 3
373#define PROCESS_COLUMN_MAD 4
374#define PROCESS_COLUMN_MINIMUM 5
375#define PROCESS_COLUMN_MAXIMUM 6
376#define PROCESS_COLUMN_SMALLEST 7
377#define PROCESS_COLUMN_LARGEST 8
378#define PROCESS_COLUMN_FIRST 9
379#define PROCESS_COLUMN_LAST 10
380#define PROCESS_COLUMN_COUNT 11
381#define PROCESS_COLUMN_SPREAD 12
382#define PROCESS_COLUMN_MEDIAN 13
383#define PROCESS_COLUMN_BASELEVEL 14
384#define PROCESS_COLUMN_TOPLEVEL 15
385#define PROCESS_COLUMN_AMPLITUDE 16
386#define PROCESS_COLUMN_RISETIME 17
387#define PROCESS_COLUMN_FALLTIME 18
388#define PROCESS_COLUMN_FWHM 19
389#define PROCESS_COLUMN_FWTM 20
390#define PROCESS_COLUMN_CENTER 21
391#define PROCESS_COLUMN_ZEROCROSSING 22
392#define PROCESS_COLUMN_FWHA 23
393#define PROCESS_COLUMN_FWTA 24
394#define PROCESS_COLUMN_SIGMA 25
395#define PROCESS_COLUMN_SLOPE 26
396#define PROCESS_COLUMN_INTERCEPT 27
397#define PROCESS_COLUMN_LFSD 28
398#define PROCESS_COLUMN_QRANGE 29
399#define PROCESS_COLUMN_DRANGE 30
400#define PROCESS_COLUMN_PERCENTILE 31
401#define PROCESS_COLUMN_MODE 32
402#define PROCESS_COLUMN_INTEGRAL 33
403#define PROCESS_COLUMN_PRODUCT 34
404#define PROCESS_COLUMN_PRANGE 35
405#define PROCESS_COLUMN_SIGNEDSMALLEST 36
406#define PROCESS_COLUMN_SIGNEDLARGEST 37
407#define PROCESS_COLUMN_GMINTEGRAL 38
408#define PROCESS_COLUMN_CORRELATION 39
409#define N_PROCESS_COLUMN_MODES 40
411extern char *process_column_mode[N_PROCESS_COLUMN_MODES];
412extern char *process_column_name[N_PROCESS_COLUMN_MODES];
413extern char *process_column_description[N_PROCESS_COLUMN_MODES];
416extern char *addOuterParentheses(
char *arg);
417extern void show_process_modes(FILE *fp);
419 char **stringResult,
long warnings,
int threads);
421extern long process_filter_request(
FILTER_TERM **filter,
char **argument,
long arguments);
422extern long process_match_request(
MATCH_TERM **match,
char **argument,
long arguments);
424extern void show_matches(
char *type,
MATCH_TERM *match,
long matches);
425extern void show_filters(
char *type,
FILTER_TERM *filter,
long filters);
426extern EQUATION_DEFINITION *process_new_equation_definition(
char **argument,
long arguments);
427extern EVALUATE_DEFINITION *process_new_evaluate_definition(
char **argument,
long arguments);
428extern EVALUATE_DEFINITION *process_new_evalute_definition(
char **argument,
long arguments);
429extern SCAN_DEFINITION *process_new_scan_definition(
char **argument,
long arguments);
430extern CAST_DEFINITION *process_new_cast_definition(
char **argument,
long arguments);
431extern EDIT_DEFINITION *process_new_edit_definition(
char **argument,
long arguments,
short reedit);
432extern PRINT_DEFINITION *process_new_print_definition(
char **argument,
long arguments);
433extern FORMAT_DEFINITION *process_new_format_definition(
char **argument,
long arguments);
436extern void expandProcessingDefinitions(
DEFINITION **definition,
long *definitions,
SDDS_DATASET *SDDS_dataset);
438extern void expandConversionDefinitions(
DEFINITION **definition,
long *definitions,
SDDS_DATASET *SDDS_dataset);
442extern FILTER_DEFINITION *process_new_filter_definition(
char **argument,
long arguments);
444extern MATCH_DEFINITION *process_new_match_definition(
char **argument,
long arguments);
445extern RPNTEST_DEFINITION *process_new_rpntest_definition(
char **argument,
long arguments);
448extern CLIP_DEFINITION *process_new_clip_definition(
char **argument,
long arguments);
449extern FCLIP_DEFINITION *process_new_fclip_definition(
char **argument,
long arguments);
450extern SPARSE_DEFINITION *process_new_sparse_definition(
char **argument,
long arguments);
451extern SAMPLE_DEFINITION *process_new_sample_definition(
char **argument,
long arguments);
452extern SYSTEM_DEFINITION *process_new_system_definition(
char **argument,
long arguments);
454extern char *determine_item_name(
char **argument,
OUTPUT_REQUEST *last_request,
long index);
456 long separate_tables,
long announce_openings,
SDDS_DATASET *SDDS_dataset);
457extern long complete_processing_definitions(
PROCESSING_DEFINITION **processing_definition,
long processing_definitions,
460extern long system_column_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source);
461extern long system_parameter_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source);
462extern long run_on_pipe(
char *command,
char *buffer,
long buffer_length);
465extern long SDDS_RedefineParameterCL(
SDDS_DATASET *SDDS_dataset,
char *parameter,
char **argv,
long argc);
466extern long SDDS_RedefineColumnCL(
SDDS_DATASET *SDDS_dataset,
char *column,
char **argv,
long argc);
468extern long edit_string(
char *text,
char *edit);
470extern long reformatString(
char *buffer,
long bufferSize,
char *
string,
char *stringFormat,
471 char *doubleFormat,
char *longFormat);
476void add_definition(
DEFINITION **definition,
long *definitions,
void *structure,
long type);
480long edit_parameter_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source,
char *edit_command);
481long edit_column_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source,
char *edit_command);
482long scan_parameter_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source,
char *format,
484long scan_column_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char *source,
char *format,
486long print_parameter_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char **source,
long sources,
char *format);
487long print_column_value(
SDDS_DATASET *SDDS_dataset,
char *target,
char **source,
long sources,
char *format);
490long ParameterScansAsNumber(
SDDS_DATASET *dataset,
char *name,
short invert);
493extern long pop_log(int32_t *logical);
495#define is_logic_character(c) ((c) == '|' || (c) == '&' || (c) == '!')
497void add_ifitem(
IFITEM_LIST *ifitem,
char **name,
long names);
500long add_sddsfile_arguments(SCANNED_ARG **scanned,
int argc);