1 // standard C functions
5 extern char *namealloc(char *name
);
11 extern FILE *avtfopen(char *name
, char *ext
, char *mode
);
17 char_to_string create a string which length is 'size'. The string is filled with the caracter 'caract'.
19 char_to_string return a string
21 if 'size' is lower than 1, the function aborts the program.
23 extern char *char_to_string(int size
, char caract
);
29 onehot_to_bit(size, bitnum) returns a binary string whose length is 'size'. The string represents a binary value where bit number 'bitnum' is set to 1 and the others to 0. The 'bitnum' is little endian oriented.
31 onehot_to_bit return a string
33 The function ends the program if bitnum<1 or bitnum>size.
35 onehot_to_hexa, onehot_to_octa, onecold_to_bit, onecold_to_hexa, onecold_to_octa
37 extern char *onehot_to_bit(int size
, int bitnum
);
42 onehot_to_hexa(size, bitnum) returns a hexadecimal string whose length is 'size'. The string represents a hexadecimal value where bit number 'bitnum' is set to 1 and the others to 0. The 'bitnum' is little endian oriented.
44 onehot_to_hexa return a string
46 The function ends the program if bitnum<1 or bitnum>size.
48 onehot_to_bit, onehot_to_octa, onecold_to_bit, onecold_to_hexa, onecold_to_octa
50 extern char *onehot_to_hexa(int size
, int bitnum
);
55 onehot_to_octa(size, bitnum) returns an octal string whose length is 'size'. The string represents an octal value where bit number 'bitnum' is set to 1 and the others to 0. The 'bitnum' is little endian oriented.
57 onehot_to_octa return a string
59 The function ends the program if bitnum<1 or bitnum>size.
61 onehot_to_hexa, onehot_to_bit, onecold_to_bit, onecold_to_hexa, onecold_to_octa
63 extern char *onehot_to_octa(int size
, int bitnum
);
68 onecold_to_bit(size, bitnum) returns a binary string whose length is 'size'. The string represents a binary value where bit number 'bitnum' is set to 0 and the others to 1. The 'bitnum' is little endian oriented.
70 onecold_to_bit return a string
72 The function ends the program if bitnum<1 or bitnum>size.
74 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_hexa, onecold_to_octa
76 extern char *onecold_to_bit(int size
, int bitnum
);
81 onecold_to_hexa(size, bitnum) returns a hexadecimal string whose length is 'size'. The string represents a hexadecimal value where bit number 'bitnum' is set to 0 and the others to 1. The 'bitnum' is little endian oriented.
83 onecold_to_hexa return a string
85 The function ends the program if bitnum<1 or bitnum>size.
87 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_bit, onecold_to_octa
89 extern char *onecold_to_hexa(int size
, int bitnum
);
94 onecold_to_octa(size, bitnum) returns an octal string whose length is 'size'. The string represents an octal value where bit number 'bitnum' is set to 0 and the others to 1. The 'bitnum' is little endian oriented.
96 onecold_to_octa return a string
98 The function ends the program if bitnum<1 or bitnum>size.
100 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_bit, onecold_to_hexa
102 extern char *onecold_to_octa(int size
, int bitnum
);
108 genius_date() return a string containing the current date and time.
110 genius_date() return a string
114 extern char *genius_date();
120 gns_ModelVisited(<name>) returns 0 if the model <name> has been set as visited thru the function gns_MarkModelVisited.
122 gns_ModelVisited returns an integer
129 extern int gns_ModelVisited(char *name
);
132 MAN gns_MarkModelVisited
135 gns_MarkModelVisited(<name>) adds <name> in the list of model already visited.
144 extern void gns_MarkModelVisited(char *name
);
146 char *bitstring_to_hexastring(char *val
);