about summary refs log tree commit diff stats
path: root/numericx.h
blob: 687071060212c4ec22c4aab3a7737f4e0fca230e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/** @file numericx.h
 * Numericx library header file.
 */
#ifndef _NUMERICX_H
#define _NUMERICX_H

#include <stdbool.h>


/* ||DATA STRUCTURE|| */

/**
 * @brief Numeral structure
 *
 * This struct is in use to apply our operations on the number.
 * The number are converted to this struct, the operations are applied,
 * and on the end, the resulting number is converted from this struct.
 */
typedef struct NumeralPtr
{
	char const* symbol; /**< a pointer to the glyph/numeral/symbol of this digit. */
	struct NumeralPtr *next; /**< a pointer to the next digit */
	struct NumeralPtr *previous; /**< a pointer to the previous digit */
} numeral_ptr;


/* ||FUNCTIONS|| */

void
numericx_free(char* string);

int
numericx_translate(char* from, bool from_units_on_the_end, bool from_first_number_void, bool from_infinite_base, char* to, bool to_units_on_the_end, bool to_first_number_void, bool to_infinite_base, char* number, char** result_string);

#endif