summaryrefslogtreecommitdiff
path: root/lib/numbers.c
diff options
context:
space:
mode:
authorPixel <>2001-03-07 00:41:50 +0000
committerPixel <>2001-03-07 00:41:50 +0000
commit3aff7aaa9de61a5f3430bd86960c4f9c4b958786 (patch)
treee4f83c05031ccd816a2e8e8b3bf8d9a857484fbd /lib/numbers.c
parentcd61178eb1d3b9182f4fcb64cc8eee61971405a8 (diff)
Version finale pour les algos.
Diffstat (limited to 'lib/numbers.c')
-rw-r--r--lib/numbers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/numbers.c b/lib/numbers.c
index 8334dd4..eb56f2c 100644
--- a/lib/numbers.c
+++ b/lib/numbers.c
@@ -3,9 +3,9 @@
int char_to_number(char *st, int *valid)
{
int whattype = 0, result = 0;
-
+
*valid = 0;
-
+
if (*st == '0') {
st++;
if (*st == 'x') {
@@ -18,7 +18,7 @@ int char_to_number(char *st, int *valid)
return 0;
}
}
-
+
while (*st) {
switch (whattype) {
case 0:
@@ -52,7 +52,7 @@ int char_to_number(char *st, int *valid)
}
st++;
}
-
+
*valid = 1;
return result;
}