-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmore_conversion_functions.c
78 lines (68 loc) · 1.36 KB
/
more_conversion_functions.c
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
#include <stdio.h>
#include <stdarg.h>
#include "main.h"
/**
* handle_binary_specifier - convert to binary
* @args: va_list object
* Return: ()
*/
int handle_binary_specifier(va_list args)
{
unsigned int mybinary;
int len;
mybinary = va_arg(args, unsigned int);
len = _btoa(mybinary);
return (len);
} /* end function */
/**
* handle_unsigned_specifier - check for unsigned int.
* @args: va_list object
* Return: ()
*/
int handle_unsigned_specifier(va_list args)
{
unsigned int myunsignedint;
int len;
myunsignedint = va_arg(args, int);
len = _itou(myunsignedint);
return (len);
} /* end function */
/**
* handle_octal_specifier - check's for Octal
* @args: va_list object
* Return: ()
*/
int handle_octal_specifier(va_list args)
{
unsigned int myoctal;
int len;
myoctal = va_arg(args, int);
len = _itoo(myoctal);
return (len);
} /* end of function */
/**
* handle_hex_specifier - check's for hexadecimal values
* @args: va_list object
* Return: ()
*/
int handle_hex_specifier(va_list args)
{
unsigned int myhex;
int len;
myhex = va_arg(args, int);
len = _itox(myhex);
return (len);
} /* end of function */
/**
* handle_Hex_Specifier - checks for Hex
* @args: va_list object
* Return: ()
*/
int handle_Hex_Specifier(va_list args)
{
unsigned int myHex;
int len;
myHex = va_arg(args, int);
len = _itoX(myHex);
return (len);
} /* End of function */