fix: Fixed ALL the code
This commit is contained in:
parent
03c35d5366
commit
97b7240286
10 changed files with 68 additions and 11 deletions
|
|
@ -1,7 +1,9 @@
|
|||
lib_LIBRARIES = libutils.a
|
||||
|
||||
libutils_a_SOURCES = \
|
||||
string_utils.c
|
||||
string_utils/string_utils.c \
|
||||
ast/ast.c \
|
||||
lists/lists.c
|
||||
|
||||
libutils_a_CPPFLAGS = -I$(top_srcdir)/src
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
#include "utils/string_utils/string_utils.h"
|
||||
#include "string_utils.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stddef.h>
|
||||
|
||||
ssize_t skip_blanks(char **str)
|
||||
{
|
||||
|
|
@ -7,7 +10,7 @@ ssize_t skip_blanks(char **str)
|
|||
return 0;
|
||||
}
|
||||
ssize_t skipped = 0;
|
||||
while (str[skipped] != '\0' && !isblank(str[skipped]))
|
||||
while (*str[skipped] != '\0' && !isblank(str[skipped]))
|
||||
{
|
||||
skipped++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef STRING_UTILS_H
|
||||
#define STRING_UTILS_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* @brief: skips blank characters at the beginning of [str].
|
||||
* @return: number of characters skipped.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue