mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Allow normal module names for -m, -x, -R, -t.
This commit is contained in:
parent
3fe810c86a
commit
ad2b9efcdc
1 changed files with 3 additions and 3 deletions
6
main.c
6
main.c
|
@ -291,11 +291,11 @@ static sexp_uint_t multiplier (char c) {
|
|||
#endif
|
||||
|
||||
static char* make_import(const char* prefix, const char* mod, const char* suffix) {
|
||||
int len = strlen(mod) + strlen(prefix) + strlen(suffix);
|
||||
int preflen = strlen(prefix), len = preflen + strlen(mod) + strlen(suffix);
|
||||
char *p, *impmod = (char*) malloc(len+1);
|
||||
strcpy(impmod, prefix);
|
||||
strcpy(impmod+strlen(prefix), mod);
|
||||
strcpy(impmod+len-+strlen(suffix), suffix);
|
||||
strcpy(impmod+preflen, mod[0] == '(' ? mod + 1 : mod);
|
||||
strcpy(impmod+len-strlen(suffix)-(mod[0] == '(' ? 1 : 0), suffix);
|
||||
impmod[len] = '\0';
|
||||
for (p=impmod; *p; p++)
|
||||
if (*p == '.') *p=' ';
|
||||
|
|
Loading…
Add table
Reference in a new issue