aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@celest.fr>2010-04-20 15:49:34 +0200
committerThomas Preud'homme <thomas.preudhomme@celest.fr>2010-04-20 16:02:42 +0200
commit3ad3168125ecb1910e6e241dc9056bccb57e9d0a (patch)
tree6f14b562c3afdca305ed034cbffa35c50585191f /tccpp.c
parent809f48966258376b41a9ed642bcf0806739aa1f2 (diff)
downloadtinycc-3ad3168125ecb1910e6e241dc9056bccb57e9d0a.tar.gz
tinycc-3ad3168125ecb1910e6e241dc9056bccb57e9d0a.tar.bz2
Clean changes introduced by 47abdbd
* Replace the save/load_buffer_state by a dynarray approach: - Filename and libname are added to a dynarray when first encountered - Load repeatedly the files in the dynarray until no new undefined symbol are encountered * Replace snprintf by sprintf in libname_to_filename * Use tcc_fileextension in filename_to_libname * Introduce a tcc_strcpy_part fonction to copy only a subset of a string * Move new_undef_syms declaration from tcc.h to tccelf.c
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/tccpp.c b/tccpp.c
index f974242..51348cf 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -378,27 +378,6 @@ static int tcc_peekc_slow(BufferedFile *bf)
}
}
-BufferedFile *tcc_save_buffer_state(int *offset)
-{
- BufferedFile *state;
-
- state = tcc_malloc(sizeof(BufferedFile));
- memcpy(state, file, sizeof(BufferedFile));
- *offset = lseek(file->fd, 0, SEEK_CUR);
- return state;
-}
-
-void tcc_load_buffer_state(BufferedFile *buf_state, int offset)
-{
- memcpy(file, buf_state, sizeof(BufferedFile));
- lseek(file->fd, offset, SEEK_SET);
-}
-
-void tcc_free_buffer_state(BufferedFile *buf_state)
-{
- tcc_free(buf_state);
-}
-
/* return the current character, handling end of block if necessary
(but not stray) */
ST_FUNC int handle_eob(void)