Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / api / gen_builtins / gen_builtin_functions.h
1 // standard C functions
2 #undef strcpy
3
4
5 extern char *namealloc(char *name);
6
7
8
9 // genius functions
10
11 extern FILE *avtfopen(char *name, char *ext, char *mode);
12
13 /*
14 MAN char_to_string
15 CATEG gns
16 DESCRIPTION
17 char_to_string create a string which length is 'size'. The string is filled with the caracter 'caract'.
18 RETURN VALUE
19 char_to_string return a string
20 ERRORS
21 if 'size' is lower than 1, the function aborts the program.
22 */
23 extern char *char_to_string(int size, char caract);
24
25 /*
26 MAN onehot_to_bit
27 CATEG gns
28 DESCRIPTION
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.
30 RETURN VALUE
31 onehot_to_bit return a string
32 ERRORS
33 The function ends the program if bitnum<1 or bitnum>size.
34 SEE ALSO
35 onehot_to_hexa, onehot_to_octa, onecold_to_bit, onecold_to_hexa, onecold_to_octa
36 */
37 extern char *onehot_to_bit(int size, int bitnum);
38 /*
39 MAN onehot_to_hexa
40 CATEG gns
41 DESCRIPTION
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.
43 RETURN VALUE
44 onehot_to_hexa return a string
45 ERRORS
46 The function ends the program if bitnum<1 or bitnum>size.
47 SEE ALSO
48 onehot_to_bit, onehot_to_octa, onecold_to_bit, onecold_to_hexa, onecold_to_octa
49 */
50 extern char *onehot_to_hexa(int size, int bitnum);
51 /*
52 MAN onehot_to_octa
53 CATEG gns
54 DESCRIPTION
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.
56 RETURN VALUE
57 onehot_to_octa return a string
58 ERRORS
59 The function ends the program if bitnum<1 or bitnum>size.
60 SEE ALSO
61 onehot_to_hexa, onehot_to_bit, onecold_to_bit, onecold_to_hexa, onecold_to_octa
62 */
63 extern char *onehot_to_octa(int size, int bitnum);
64 /*
65 MAN onecold_to_bit
66 CATEG gns
67 DESCRIPTION
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.
69 RETURN VALUE
70 onecold_to_bit return a string
71 ERRORS
72 The function ends the program if bitnum<1 or bitnum>size.
73 SEE ALSO
74 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_hexa, onecold_to_octa
75 */
76 extern char *onecold_to_bit(int size, int bitnum);
77 /*
78 MAN onecold_to_hexa
79 CATEG gns
80 DESCRIPTION
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.
82 RETURN VALUE
83 onecold_to_hexa return a string
84 ERRORS
85 The function ends the program if bitnum<1 or bitnum>size.
86 SEE ALSO
87 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_bit, onecold_to_octa
88 */
89 extern char *onecold_to_hexa(int size, int bitnum);
90 /*
91 MAN onecold_to_octa
92 CATEG gns
93 DESCRIPTION
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.
95 RETURN VALUE
96 onecold_to_octa return a string
97 ERRORS
98 The function ends the program if bitnum<1 or bitnum>size.
99 SEE ALSO
100 onehot_to_hexa, onehot_to_octa, onehot_to_bit, onecold_to_bit, onecold_to_hexa
101 */
102 extern char *onecold_to_octa(int size, int bitnum);
103
104 /*
105 MAN genius_date
106 CATEG gns
107 DESCRIPTION
108 genius_date() return a string containing the current date and time.
109 RETURN VALUE
110 genius_date() return a string
111 ERRORS
112 none.
113 */
114 extern char *genius_date();
115
116 /*
117 MAN gns_ModelVisited
118 CATEG gns
119 DESCRIPTION
120 gns_ModelVisited(<name>) returns 0 if the model <name> has been set as visited thru the function gns_MarkModelVisited.
121 RETURN VALUE
122 gns_ModelVisited returns an integer
123 ERRORS
124 none.
125 SEE ALSO
126 gns_MarkModelVisited
127 */
128
129 extern int gns_ModelVisited(char *name);
130
131 /*
132 MAN gns_MarkModelVisited
133 CATEG gns
134 DESCRIPTION
135 gns_MarkModelVisited(<name>) adds <name> in the list of model already visited.
136 RETURN VALUE
137 none.
138 ERRORS
139 no errors.
140 SEE ALSO
141 gns_ModelVisited
142 */
143
144 extern void gns_MarkModelVisited(char *name);
145
146 char *bitstring_to_hexastring(char *val);
147
148
149 long genius_top();