4 #define UNITY_H_LOADED 1
13 #define UNITY_SYNTAX_FITS 0
20 #define UNITY_SYNTAX_OGIP 1
27 #define UNITY_SYNTAX_CDS 2
34 #define UNITY_SYNTAX_VOUNITS 3
42 #ifndef UNITYLIB_H_LOADED
43 #define UNITYLIB_H_LOADED 1
50 struct unit_definition;
53 struct function_definition;
180 #define UNITY_CHECK_RECOGNISED 1
182 #define UNITY_CHECK_RECOMMENDED 2
184 #define UNITY_CHECK_CONSTRAINTS 4
190 #define UNITY_CHECK_ALL UNITY_CHECK_RECOGNISED | UNITY_CHECK_RECOMMENDED | UNITY_CHECK_CONSTRAINTS
194 #ifdef UNITY_INTERNAL
196 Unit* u_new_unit(
const char* unitString,
const float power,
int syntax);
197 Unit* u_function_application(
const char* functionName,
198 const Unit* unit_sequence,
201 void u_receive_result(
float,
const Unit* unit_sequence);
202 int u_prefix_to_power(
const char pfx);
206 void u_free_unit(
const Unit* u);
213 #ifndef WRITERS_H_LOADED
214 #define WRITERS_H_LOADED 1
218 #ifdef UNITY_INTERNAL
234 #ifndef UNIT_DEFINITIONS_H
235 #define UNIT_DEFINITIONS_H 1
248 struct unit_definition {
253 const char* dimension;
254 const char* description;
255 const char* latex_form;
267 struct unit_representation {
271 int binary_prefixes_p;
275 typedef struct unit_representation UnitRep;
276 UnitRep* u_get_unit_representation(
const Unit*,
const int syntax);
279 const UnitDef* unity_get_unit(
const char* abbrev,
int syntax);
280 const char* unity_get_syntax_name(
int syntax);
281 const char* unity_get_unit_uri(
const UnitDef*);
282 const char* unity_get_unit_name(
const UnitDef*);
283 const char* unity_get_unit_type(
const UnitDef*);
284 const char* unity_get_unit_dimension(
const UnitDef*);
285 const char* unity_get_unit_description(
const UnitDef*);
286 const char* unity_get_unit_latex_form(
const UnitDef*);
291 #ifndef FUNCTION_DEFINITIONS_H
292 #define FUNCTION_DEFINITIONS_H 1
305 struct function_definition {
306 const char* description;
307 const char* latex_form;
309 typedef struct function_definition FunctionDef;
311 const FunctionDef* unity_get_function(
const char* abbrev,
const int syntax);
312 const char* unity_get_function_abbreviation(
const FunctionDef* def,