Names of all datatypes declared in public header files of QSMM library and declared in its source code are in lowercase. Suffixes of the names correspond to C language keywords used for datatype declarations:
typedefThe ‘_t’ suffix. All names of datatypes for function pointers have the ‘_func_t’ suffix.
enumThe ‘_e’ suffix.
structThe ‘_s’ suffix.
unionThe ‘_u’ suffix.
Names of all datatypes declared in public header files of QSMM library have the ‘qsmm_’ prefix.
QSMM has conventions for the use of basic C language types and the types qsmm_sig_t and qsmm_ssig_t in various situations.
The API and the package source code itself follow the conventions.
C programs that use the QSMM library can also follow them.
The primary conventions are that if a datatype holds signal identifiers or numbers of signals, and such values
qsmm_sig_t;
qsmm_ssig_t;
qsmm_sig_t;
qsmm_ssig_t.
For other situations, including ones when you chose not to use the type qsmm_sig_t or qsmm_ssig_t according to the first two items of primary conventions stated above, the rules are:
char or int or use specific bits in values of other numeric types.
char or int.
signed char or int.
unsigned char or int.
int.
int.
unsigned int.
long or unsigned long.
long.
long long or unsigned long long.
For example, in QSMM:
char holds unpacked boolean flags;
int holds error codes and indices of spur types;
long holds frequencies and the moments of discrete time.
The set of datatypes declared in the API with the ‘_t’ suffix in their names includes the datatypes qsmm_sig_t and qsmm_ssig_t, datatypes for function pointers with the ‘_func_t’ suffix, and datatypes for object handles (see Object Handles, for more information).
Datatypes declared in the API with the ‘_e’ suffix in their names are enumerations. Elements of enumerations are in uppercase.
Datatypes with the suffixes ‘_s’ and ‘_u’ are structures and unions respectively. The order of their fields depends on field datatypes and is the following:
char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, long long, unsigned long long, float, double, long double.
void * type and except for types defined using the keywords ‘enum’, ‘struct’, and ‘union’.
void * type.
For every type name within each type category listed above, the type order is the following:
void type).
const qualifier in the order of increasing the number of asterisks.
const qualifier in the order of increasing the number of asterisks.