diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-30 20:42:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-30 20:42:31 -0400 |
| commit | dfedf3f2bb434065da3ddbc931e87a4017535f80 (patch) | |
| tree | 6c7d9e5e35fd4fd612d51285dcae7d6c06b8838a /src/stdlib/files.c | |
| parent | 46818674d3588dd15ebca5cb7be4afa8cd485cfe (diff) | |
Update compiler to use randomly generated unique-per-file symbol
suffixes instead of needing to rename symbols with objcopy
Diffstat (limited to 'src/stdlib/files.c')
| -rw-r--r-- | src/stdlib/files.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/stdlib/files.c b/src/stdlib/files.c index 900129f8..87b0205c 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -79,23 +79,6 @@ public char *file_base_name(const char *path) return buf; } -public char *file_base_id(const char *path) -{ - const char *slash = strrchr(path, '/'); - if (slash) path = slash + 1; - assert(!isdigit(*path)); - const char *end = path + strcspn(path, "."); - size_t len = (size_t)(end - path); - char *buf = GC_MALLOC_ATOMIC(len+1); - strncpy(buf, path, len); - buf[len] = '\0'; - for (char *p = buf; *p; p++) { - if (!isalnum(*p)) - *p = '_'; - } - return buf; -} - static file_t *_load_file(const char* filename, FILE *file) { if (!file) return NULL; |
