Skip to content

Commit

Permalink
formatting source-code for b1d92cb
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions committed Jun 20, 2020
1 parent b1d92cb commit 5347e6f
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 173 deletions.
19 changes: 9 additions & 10 deletions conversions/c_atoi_str_to_integer.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* \file
* \brief Recoding the original atoi function in stdlib.h
* \brief Recoding the original atoi function in stdlib.h
* \author [Mohammed YMIK](https://github.com/medymik)W
* The function convert a string passed to an integer
* The function convert a string passed to an integer
*/
#include <stdio.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand All @@ -15,10 +15,10 @@
*/
int c_atoi(const char *str)
{
int i;
int sign;
long value;
long prev;
int i;
int sign;
long value;
long prev;

i = 0;
sign = 1;
Expand All @@ -45,7 +45,7 @@ int c_atoi(const char *str)
return (0);
i++;
}
return (value);
return (value);
}

/**
Expand All @@ -63,12 +63,11 @@ int test_c_atoi()
printf("<<<< TEST DONE >>>>\n");
}


/**
* the main function take one argument of type char*
* example : ./program 123
*/
int main(int argc, char **argv)
int main(int argc, char **argv)
{
if (argc == 2)
{
Expand Down
Loading

0 comments on commit 5347e6f

Please sign in to comment.