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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Numericx: numericx.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Numericx
</div>
<div id="projectbrief">Translate a number from any numeral system into any numeral system</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">numericx.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include <stdio.h></code><br />
<code>#include <stdlib.h></code><br />
<code>#include <string.h></code><br />
<code>#include <stdbool.h></code><br />
<code>#include <errno.h></code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structNumeralPtr.html">NumeralPtr</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Numeral structure. <a href="structNumeralPtr.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a44493dbd21a529ec6fdb2da73a35ac70"><td class="memItemLeft" align="right" valign="top"><a id="a44493dbd21a529ec6fdb2da73a35ac70" name="a44493dbd21a529ec6fdb2da73a35ac70"></a>
#define </td><td class="memItemRight" valign="bottom"><b>PROG_NAME</b>   "numericx"</td></tr>
<tr class="separator:a44493dbd21a529ec6fdb2da73a35ac70"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Compilation Flags</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p >These are the valid compilation flags for the definition of numerical systems. Use them to make the program show more output, or to set the proprieties of the FROM and the TO numerical system. </p>
</div></td></tr>
<tr class="memitem:ad72dbcf6d0153db1b8d8a58001feed83"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>   false</td></tr>
<tr class="separator:ad72dbcf6d0153db1b8d8a58001feed83"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8678e78e5261b8f911064862b1239bcd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a8678e78e5261b8f911064862b1239bcd">TO_UNITS_ON_THE_END</a>   false</td></tr>
<tr class="separator:a8678e78e5261b8f911064862b1239bcd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a935ac4a0d89187be3cd926dc6ab4402e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a935ac4a0d89187be3cd926dc6ab4402e">FROM_UNITS_ON_THE_END</a>   false</td></tr>
<tr class="separator:a935ac4a0d89187be3cd926dc6ab4402e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a752233360c6da2558d0bf2a8df69fea9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a752233360c6da2558d0bf2a8df69fea9">TO_FIRST_NUMBER_VOID</a>   false</td></tr>
<tr class="separator:a752233360c6da2558d0bf2a8df69fea9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2b628dced5fae26409f872fd0a3c1025"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a2b628dced5fae26409f872fd0a3c1025">FROM_FIRST_NUMBER_VOID</a>   false</td></tr>
<tr class="separator:a2b628dced5fae26409f872fd0a3c1025"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5eeff859a5bb9f842b1277209a4a6828"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a5eeff859a5bb9f842b1277209a4a6828">TO_INFINITE_BASE</a>   false</td></tr>
<tr class="separator:a5eeff859a5bb9f842b1277209a4a6828"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e052ad325500db23a5bcc6f16457fe6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a0e052ad325500db23a5bcc6f16457fe6">FROM_INFINITE_BASE</a>   false</td></tr>
<tr class="separator:a0e052ad325500db23a5bcc6f16457fe6"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a125c3521233ae6e6952f2ca81d6a6140"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structNumeralPtr.html">NumeralPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a></td></tr>
<tr class="memdesc:a125c3521233ae6e6952f2ca81d6a6140"><td class="mdescLeft"> </td><td class="mdescRight">Numeral structure. <a href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">More...</a><br /></td></tr>
<tr class="separator:a125c3521233ae6e6952f2ca81d6a6140"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab86e6611d2a047957390ce1d81b343f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#ab86e6611d2a047957390ce1d81b343f2">new_digit</a> (<a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> *last_numeral, char const *to_first)</td></tr>
<tr class="memdesc:ab86e6611d2a047957390ce1d81b343f2"><td class="mdescLeft"> </td><td class="mdescRight">Create new digit for numeral_ptr. <a href="numericx_8c.html#ab86e6611d2a047957390ce1d81b343f2">More...</a><br /></td></tr>
<tr class="separator:ab86e6611d2a047957390ce1d81b343f2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a66c722a84f871c53bac9aa0383a31ffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a66c722a84f871c53bac9aa0383a31ffd">numeral_infinity</a> (char const *to_first, size_t cases)</td></tr>
<tr class="memdesc:a66c722a84f871c53bac9aa0383a31ffd"><td class="mdescLeft"> </td><td class="mdescRight">Initializer of numeral_ptr. <a href="numericx_8c.html#a66c722a84f871c53bac9aa0383a31ffd">More...</a><br /></td></tr>
<tr class="separator:a66c722a84f871c53bac9aa0383a31ffd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af1a63aea3936f75afbc2ef2bc94699a6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#af1a63aea3936f75afbc2ef2bc94699a6">increment</a> (<a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> *numeral, char *num_first, char *num_last, char *brand_new_digit)</td></tr>
<tr class="memdesc:af1a63aea3936f75afbc2ef2bc94699a6"><td class="mdescLeft"> </td><td class="mdescRight">Increment numeral_ptr 'numeral' one unit up. <a href="numericx_8c.html#af1a63aea3936f75afbc2ef2bc94699a6">More...</a><br /></td></tr>
<tr class="separator:af1a63aea3936f75afbc2ef2bc94699a6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adbc3a4b8f813e194fce5bc1cc08fcdff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#adbc3a4b8f813e194fce5bc1cc08fcdff">decrement_number_string</a> (char *number, char *first_numeral, char *last_numeral, char *numeral_system)</td></tr>
<tr class="memdesc:adbc3a4b8f813e194fce5bc1cc08fcdff"><td class="mdescLeft"> </td><td class="mdescRight">Decrement a string 'number' by one unit. <a href="numericx_8c.html#adbc3a4b8f813e194fce5bc1cc08fcdff">More...</a><br /></td></tr>
<tr class="separator:adbc3a4b8f813e194fce5bc1cc08fcdff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1b3e6783393b9451c89740d832845ef4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a1b3e6783393b9451c89740d832845ef4">is_the_same</a> (<a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> *numeral, char *number_arg)</td></tr>
<tr class="memdesc:a1b3e6783393b9451c89740d832845ef4"><td class="mdescLeft"> </td><td class="mdescRight">Check if numeral_ptr and string are of the same value. <a href="numericx_8c.html#a1b3e6783393b9451c89740d832845ef4">More...</a><br /></td></tr>
<tr class="separator:a1b3e6783393b9451c89740d832845ef4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6d2b8fef8efc00c4579a7c312a64259e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a6d2b8fef8efc00c4579a7c312a64259e">print_numeral</a> (<a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> *numeral)</td></tr>
<tr class="memdesc:a6d2b8fef8efc00c4579a7c312a64259e"><td class="mdescLeft"> </td><td class="mdescRight">Print numeral. <a href="numericx_8c.html#a6d2b8fef8efc00c4579a7c312a64259e">More...</a><br /></td></tr>
<tr class="separator:a6d2b8fef8efc00c4579a7c312a64259e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acfa5f737d6044f341edae1435051318e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#acfa5f737d6044f341edae1435051318e">reverse_string</a> (char *string)</td></tr>
<tr class="memdesc:acfa5f737d6044f341edae1435051318e"><td class="mdescLeft"> </td><td class="mdescRight">Reverse a string. <a href="numericx_8c.html#acfa5f737d6044f341edae1435051318e">More...</a><br /></td></tr>
<tr class="separator:acfa5f737d6044f341edae1435051318e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5be4039a33220009e381b78202c54715"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a5be4039a33220009e381b78202c54715">is_valid_number</a> (char *numeral_system, char *number)</td></tr>
<tr class="memdesc:a5be4039a33220009e381b78202c54715"><td class="mdescLeft"> </td><td class="mdescRight">Does string belongs to numeral system? <a href="numericx_8c.html#a5be4039a33220009e381b78202c54715">More...</a><br /></td></tr>
<tr class="separator:a5be4039a33220009e381b78202c54715"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c8bb60d04af786f68bfa5ca4bb899a1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a5c8bb60d04af786f68bfa5ca4bb899a1">free_numeral</a> (<a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> *numeral)</td></tr>
<tr class="memdesc:a5c8bb60d04af786f68bfa5ca4bb899a1"><td class="mdescLeft"> </td><td class="mdescRight">Free numeral memory. <a href="numericx_8c.html#a5c8bb60d04af786f68bfa5ca4bb899a1">More...</a><br /></td></tr>
<tr class="separator:a5c8bb60d04af786f68bfa5ca4bb899a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="numericx_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft"> </td><td class="mdescRight">Translate number. <a href="numericx_8c.html#a0ddf1224851353fc92bfbff6f499fa97">More...</a><br /></td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Source code of the number translator command-line interface. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ad72dbcf6d0153db1b8d8a58001feed83" name="ad72dbcf6d0153db1b8d8a58001feed83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad72dbcf6d0153db1b8d8a58001feed83">◆ </a></span>DEBUG</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DEBUG   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Show debug message of the step by step incrementation of the number. </p>
</div>
</div>
<a id="a2b628dced5fae26409f872fd0a3c1025" name="a2b628dced5fae26409f872fd0a3c1025"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b628dced5fae26409f872fd0a3c1025">◆ </a></span>FROM_FIRST_NUMBER_VOID</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FROM_FIRST_NUMBER_VOID   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the numeral system of the number input to start counting on the second number, being the first number void. </p>
</div>
</div>
<a id="a0e052ad325500db23a5bcc6f16457fe6" name="a0e052ad325500db23a5bcc6f16457fe6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e052ad325500db23a5bcc6f16457fe6">◆ </a></span>FROM_INFINITE_BASE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FROM_INFINITE_BASE   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the numeral system of the number input to have the first number as an infinite number, for example, if the first number is 'A', then A == AA == AAA == AAAA ... </p>
</div>
</div>
<a id="a935ac4a0d89187be3cd926dc6ab4402e" name="a935ac4a0d89187be3cd926dc6ab4402e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a935ac4a0d89187be3cd926dc6ab4402e">◆ </a></span>FROM_UNITS_ON_THE_END</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FROM_UNITS_ON_THE_END   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the numeral system of the number input to have the units place on the end of the writing direction (on the right). </p>
</div>
</div>
<a id="a752233360c6da2558d0bf2a8df69fea9" name="a752233360c6da2558d0bf2a8df69fea9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a752233360c6da2558d0bf2a8df69fea9">◆ </a></span>TO_FIRST_NUMBER_VOID</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TO_FIRST_NUMBER_VOID   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the resulting numeral system to start counting on the second number, being the first number void. </p>
</div>
</div>
<a id="a5eeff859a5bb9f842b1277209a4a6828" name="a5eeff859a5bb9f842b1277209a4a6828"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5eeff859a5bb9f842b1277209a4a6828">◆ </a></span>TO_INFINITE_BASE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TO_INFINITE_BASE   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the resulting numeral system to have the first number as an infinite number, for example, if the first number is 'A', then A == AA == AAA == AAAA ... </p>
</div>
</div>
<a id="a8678e78e5261b8f911064862b1239bcd" name="a8678e78e5261b8f911064862b1239bcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8678e78e5261b8f911064862b1239bcd">◆ </a></span>TO_UNITS_ON_THE_END</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TO_UNITS_ON_THE_END   false</td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bool</td><td></td></tr>
</table>
</dd>
</dl>
<p>Configuration of the resulting numeral system to have the units place on the end of the writing direction (on the right). </p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a125c3521233ae6e6952f2ca81d6a6140" name="a125c3521233ae6e6952f2ca81d6a6140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a125c3521233ae6e6952f2ca81d6a6140">◆ </a></span>numeral_ptr</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structNumeralPtr.html">NumeralPtr</a> <a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Numeral structure. </p>
<p >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. </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="adbc3a4b8f813e194fce5bc1cc08fcdff" name="adbc3a4b8f813e194fce5bc1cc08fcdff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbc3a4b8f813e194fce5bc1cc08fcdff">◆ </a></span>decrement_number_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void decrement_number_string </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"><em>number</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>first_numeral</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>last_numeral</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>numeral_system</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decrement a string 'number' by one unit. </p>
<p >It needs to know the first numeral ('first_numeral') and also the last numeral ('last_numeral'). It also needs the numeral system in form of a string ('numeral_system') to know which is the numeral before the actual numeral that needs decrementation.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">number</td><td>- the string number to be decremented. </td></tr>
<tr><td class="paramname">first_numeral</td><td>- number's numeral system first numeral. </td></tr>
<tr><td class="paramname">last_numeral</td><td>- number's numeral system last numeral. </td></tr>
<tr><td class="paramname">numeral_system</td><td>- string of the corresponding number's numeral system numeral. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a5c8bb60d04af786f68bfa5ca4bb899a1" name="a5c8bb60d04af786f68bfa5ca4bb899a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c8bb60d04af786f68bfa5ca4bb899a1">◆ </a></span>free_numeral()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void free_numeral </td>
<td>(</td>
<td class="paramtype"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td>
<td class="paramname"><em>numeral</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free numeral memory. </p>
<p >Free up numeral_ptr ('numeral') linked chain.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numeral</td><td>- numeral_ptr to free. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af1a63aea3936f75afbc2ef2bc94699a6" name="af1a63aea3936f75afbc2ef2bc94699a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1a63aea3936f75afbc2ef2bc94699a6">◆ </a></span>increment()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void increment </td>
<td>(</td>
<td class="paramtype"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td>
<td class="paramname"><em>numeral</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>num_first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>num_last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>brand_new_digit</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Increment numeral_ptr 'numeral' one unit up. </p>
<p >It needs 'num_first' as the first numeral of the numerical system. Also needs 'num_last' as the last numeral of the numerical system. When incrementing, if the function adds a new digit/numeral, it will use the 'brand_new_digit' as its new numeral/digit.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numeral</td><td>- numeral to increment. </td></tr>
<tr><td class="paramname">num_first</td><td>- number's numeral system first numeral. </td></tr>
<tr><td class="paramname">num_last</td><td>- number's numeral system last numeral. </td></tr>
<tr><td class="paramname">brand_new_digit</td><td>- brand new created numeral, if needed by incrementation. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a1b3e6783393b9451c89740d832845ef4" name="a1b3e6783393b9451c89740d832845ef4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b3e6783393b9451c89740d832845ef4">◆ </a></span>is_the_same()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool is_the_same </td>
<td>(</td>
<td class="paramtype"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td>
<td class="paramname"><em>numeral</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>number_arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if numeral_ptr and string are of the same value. </p>
<p >Compares if a numeral_ptr ('numeral') matches the string ('number_arg').</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numeral</td><td>- numeral_ptr to check. </td></tr>
<tr><td class="paramname">number_arg</td><td>- string to check.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if matches. </dd>
<dd>
false if doesn't match. </dd></dl>
</div>
</div>
<a id="a5be4039a33220009e381b78202c54715" name="a5be4039a33220009e381b78202c54715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5be4039a33220009e381b78202c54715">◆ </a></span>is_valid_number()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool is_valid_number </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"><em>numeral_system</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>number</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Does string belongs to numeral system? </p>
<p >Check if string 'number' belongs to the numerical system ('numeral_system'), which is also a string. Belonging mean all the symbols of 'number' are included in 'numeral_system'.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numeral_system</td><td>- numeral system string to check against. </td></tr>
<tr><td class="paramname">number</td><td>- number to see if belongs.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if it belongs. </dd>
<dd>
false if it doesn't belong. </dd></dl>
</div>
</div>
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">◆ </a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char * </td>
<td class="paramname"><em>argv</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Translate number. </p>
<p >Main function that does the translation of the number. </p>
</div>
</div>
<a id="ab86e6611d2a047957390ce1d81b343f2" name="ab86e6611d2a047957390ce1d81b343f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab86e6611d2a047957390ce1d81b343f2">◆ </a></span>new_digit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * new_digit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td>
<td class="paramname"><em>last_numeral</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>to_first</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create new digit for numeral_ptr. </p>
<p >It needs the last_numeral ('last_numeral') into which will add the new numeral, and also need to know the symbol of the new numeral ('to_first').</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">last_numeral</td><td>- last numeral_ptr* into which new numeral_ptr will be added. </td></tr>
<tr><td class="paramname">to_first</td><td>- symbol of the new digit.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to new numeral_ptr in case of success. </dd>
<dd>
NULL in case of no memory. </dd></dl>
</div>
</div>
<a id="a66c722a84f871c53bac9aa0383a31ffd" name="a66c722a84f871c53bac9aa0383a31ffd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66c722a84f871c53bac9aa0383a31ffd">◆ </a></span>numeral_infinity()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * numeral_infinity </td>
<td>(</td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>to_first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>cases</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializer of numeral_ptr. </p>
<p >Creates a number of the form numeral_ptr that begins with 'case' number of cases, and all cases are set to 'to_first' char.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">to_first</td><td>- the symbol of the cases for the new number. </td></tr>
<tr><td class="paramname">cases</td><td>- number of cases of the new number.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to numeral_ptr in case of success. </dd>
<dd>
NULL in case of no memory ( because depends on <a class="el" href="numericx_8c.html#ab86e6611d2a047957390ce1d81b343f2" title="Create new digit for numeral_ptr.">new_digit()</a> ). </dd></dl>
</div>
</div>
<a id="a6d2b8fef8efc00c4579a7c312a64259e" name="a6d2b8fef8efc00c4579a7c312a64259e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d2b8fef8efc00c4579a7c312a64259e">◆ </a></span>print_numeral()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void print_numeral </td>
<td>(</td>
<td class="paramtype"><a class="el" href="numericx_8c.html#a125c3521233ae6e6952f2ca81d6a6140">numeral_ptr</a> * </td>
<td class="paramname"><em>numeral</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print numeral. </p>
<p >Prints to standard output numeral_ptr ('numeral').</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numeral</td><td>- numeral_ptr to print. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="acfa5f737d6044f341edae1435051318e" name="acfa5f737d6044f341edae1435051318e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfa5f737d6044f341edae1435051318e">◆ </a></span>reverse_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void reverse_string </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reverse a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">string</td><td>- string to be reversed. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>
|