Skip to content

Commit

Permalink
Fixed errors in get_flags.c file
Browse files Browse the repository at this point in the history
  • Loading branch information
godswillubah committed Mar 27, 2023
1 parent 4e819b5 commit 9121054
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions functions2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* print_pointer - Prints the value of a pointer variable
* @types: List a of arguments
* @buffer: Buffer array to handle print
* @flags: Calculates active flags
* @flags: Calculates active flags
* @width: get width
* @precision: Precision specification
* @size: Size specifier
* Return: Number of chars printed.
* Written by Kebran Araya and Godswill Ubah
*/
int print_pointer(va_list types, char buffer[],
int flags, int width, int precision, int size)
{
Expand Down Expand Up @@ -57,7 +57,7 @@ int print_pointer(va_list types, char buffer[],
* print_non_printable - Prints ascii codes in hexa of non printable chars
* @types: Lista of arguments
* @buffer: Buffer array to handle print
* @flags: Calculates active flags
* @flags: Calculates active flags
* @width: get width
* @precision: Precision specification
* @size: Size specifier
Expand Down Expand Up @@ -97,7 +97,7 @@ int print_non_printable(va_list types, char buffer[],
* print_reverse - Prints reverse string.
* @types: Lista of arguments
* @buffer: Buffer array to handle print
* @flags: Calculates active flags
* @flags: Calculates active flags
* @width: get width
* @precision: Precision specification
* @size: Size specifier
Expand Down Expand Up @@ -140,7 +140,7 @@ int print_reverse(va_list types, char buffer[],
* print_rot13string - Print a string in rot13.
* @types: Lista of arguments
* @buffer: Buffer array to handle print
* @flags: Calculates active flags
* @flags: Calculates active flags
* @width: get width
* @precision: Precision specification
* @size: Size specifier
Expand Down
3 changes: 2 additions & 1 deletion get_flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* @i: take a parameter.
* Return: Flags:
* Written by Kebron Araya and Godswill Ubah
*/
int get_flags(const char *format, int *i)
{
/* - + 0 # ' ' */
/* 1 2 4 8 16 */
/* 1 2 4 8 16 */
int j, curr_i;
int flags = 0;
const char FLAGS_CH[] = {'-', '+', '0', '#', ' ', '\0'};
Expand Down

0 comments on commit 9121054

Please sign in to comment.