radix.h
Go to the documentation of this file.
1 #ifndef __RADIX_H__
2 #define __RADIX_H__
3 
4 /*
5  * rdixield.h - simple radix conversion functions to get students familiar
6  * with C with a <b>very</b> brief introduction to strings.
7  *
8  * "Copyright (c) 2013 by Fritz Sieker."
9  *
10  * Permission to use, copy, modify, and distribute this software and its
11  * documentation for any purpose, without fee, and without written
12  * agreement is hereby granted, provided that the above copyright notice
13  * and the following two paragraphs appear in all copies of this software,
14  * that the files COPYING and NO_WARRANTY are included verbatim with
15  * any distribution, and that the contents of the file README are included
16  * verbatim as part of a file named README with any distribution.
17  *
18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
19  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
20  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR
21  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22  *
23  * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25  * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
26  * BASIS, AND THE AUTHOR NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
27  * UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
28  */
29 
60 char int2char (int radix, int value);
61 
69 int char2int (int radix, char digit);
70 
81 void int2str (int radix, int value);
82 
91 int str2int (int radix);
92 
102 double str2frac (int radix);
103 
104 #endif