.. | .. |
---|
2 | 2 | // |
---|
3 | 3 | // Copyright (C) 2018 Masahiro Yamada <yamada.masahiro@socionext.com> |
---|
4 | 4 | |
---|
| 5 | +#include <ctype.h> |
---|
5 | 6 | #include <stdarg.h> |
---|
6 | 7 | #include <stdbool.h> |
---|
7 | 8 | #include <stdio.h> |
---|
.. | .. |
---|
9 | 10 | #include <string.h> |
---|
10 | 11 | |
---|
11 | 12 | #include "list.h" |
---|
| 13 | +#include "lkc.h" |
---|
12 | 14 | |
---|
13 | 15 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) |
---|
14 | 16 | |
---|
15 | 17 | static char *expand_string_with_args(const char *in, int argc, char *argv[]); |
---|
| 18 | +static char *expand_string(const char *in); |
---|
16 | 19 | |
---|
17 | 20 | static void __attribute__((noreturn)) pperror(const char *format, ...) |
---|
18 | 21 | { |
---|
.. | .. |
---|
548 | 551 | return __expand_string(&in, is_end_of_str, argc, argv); |
---|
549 | 552 | } |
---|
550 | 553 | |
---|
551 | | -char *expand_string(const char *in) |
---|
| 554 | +static char *expand_string(const char *in) |
---|
552 | 555 | { |
---|
553 | 556 | return expand_string_with_args(in, 0, NULL); |
---|
554 | 557 | } |
---|
555 | 558 | |
---|
556 | 559 | static bool is_end_of_token(char c) |
---|
557 | 560 | { |
---|
558 | | - /* Why are '.' and '/' valid characters for symbols? */ |
---|
559 | | - return !(isalnum(c) || c == '_' || c == '-' || c == '.' || c == '/'); |
---|
| 561 | + return !(isalnum(c) || c == '_' || c == '-'); |
---|
560 | 562 | } |
---|
561 | 563 | |
---|
562 | 564 | /* |
---|