File: multivalues.h

package info (click to toggle)
libswe 2.10.03-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,144 kB
  • sloc: ansic: 47,873; perl: 134; makefile: 108; sh: 70; asm: 3
file content (35 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MULTIVALUES_H
#define MULTIVALUES_H

#define SETEST_MAX_MULTIVARS   200
#define SETEST_MAX_MULTIVALUES 200

typedef struct {
    char name[SETEST_MAX_SYMBOL_SIZE];
    int i;
    bool carry;
    int length;
    typed_value* mvalue_entries;
} mvalues;

typedef struct {
  mvalues* mv;
  int length;
} mvalues_tab;

mvalues_tab* multivalues_create_table( );
void multivalues_destroy_table( mvalues_tab* tab);
int multivalues_get_index(const char* name,mvalues_tab* multivalues);
int multivalues_add_index(const char *name,const st_type type,const char* value,mvalues_tab* multivalues);
bool is_multivalue(const st_type type,const char* value);
const typed_value* multivalues_get_next( int mv,  mvalues_tab* multivalues);
bool multivalues_all_done(mvalues_tab* multivalues);
void parse_int_range( const char* value, mvalues* mval);
void parse_double_range( const char* value, mvalues* mval);
void multivalues_clear(mvalues_tab* multivalues);

bool add_int_to_table(int value, mvalues* mval);
bool add_double_to_table(double value, mvalues* mval);
bool add_value_to_table(typed_value *value, mvalues* mval);

#endif