/home/kkrizka/Projects/libmidi/src/types.h File Reference
Go to the source code of this file.
Typedefs |
typedef unsigned long | dword |
| Will hold at least 32 bits on all platforms.
|
typedef unsigned int | word |
| Will hold at least 16 bits on all platforms.
|
typedef unsigned char | byte |
| Will hold at least 8 bits on all platforms.
|
Functions |
unsigned int | char2num (char c) |
| Converts a char into an unsigned integer.
|
char | num2char (unsigned int i) |
| Converts a an unsigned number into a character.
|
dword | byte2dword (byte array[]) |
| Concatonates (bitwise) 4 byte-long variables into 1 variable.
|
byte * | dword2byte (dword var) |
| Concatonates 1 variable into 4 byte-long variables.
|
word | byte2word (byte array[]) |
| Concatonates (bitwise) 2 byte-long variables into 1 variable.
|
byte * | word2byte (word var) |
| Concatonates 1 variable into 2 byte-long variables.
|
Typedef Documentation
typedef unsigned char byte |
Will hold at least 8 bits on all platforms.
Definition at line 31 of file types.h.
typedef unsigned long dword |
Will hold at least 32 bits on all platforms.
Definition at line 27 of file types.h.
typedef unsigned int word |
Will hold at least 16 bits on all platforms.
Definition at line 29 of file types.h.
Function Documentation
Concatonates (bitwise) 4 byte-long variables into 1 variable.
- Parameters:
-
- Returns:
- Concatonated array
Definition at line 46 of file types.cpp.
Concatonates (bitwise) 2 byte-long variables into 1 variable.
- Parameters:
-
- Returns:
- Concatonated array
Definition at line 69 of file types.cpp.
unsigned int char2num |
( |
char |
c |
) |
|
Converts a char into an unsigned integer.
- Parameters:
-
- Returns:
- c as an unsigned number. Range is 0 to 255
Definition at line 31 of file types.cpp.
Concatonates 1 variable into 4 byte-long variables.
- Parameters:
-
- Returns:
- Array of bytes that var was split into
Definition at line 58 of file types.cpp.
char num2char |
( |
unsigned int |
i |
) |
|
Converts a an unsigned number into a character.
- Parameters:
-
| i | Input number, must be in range 0 to 255 |
- Returns:
- Character c represented by code c
Definition at line 38 of file types.cpp.
Concatonates 1 variable into 2 byte-long variables.
- Parameters:
-
- Returns:
- Array of bytes that var was split into
Definition at line 81 of file types.cpp.