From 901aa73525940072b3a0c877ac0b6899bd7d5b63 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 21:47:36 +0000 Subject: Apply patch malaga-rename-map_file.diff patch_name: malaga-rename-map_file.diff present_in_specfile: true --- diff --git a/files.c b/files.c index 5cea8a2..22c81d2 100644 --- a/files.c +++ b/files.c @@ -131,10 +131,10 @@ read_new_vector( int_t item_size, int_t item_count, /*---------------------------------------------------------------------------*/ void -map_file( string_t file_name, void **address, int_t *length ) +malaga_map_file( string_t file_name, void **address, int_t *length ) /* Map file "file_name" into the memory. It will be available in the * memory region starting at *ADDRESS and will occupy LENGTH bytes. - * After usage, return the memory region via "unmap_file". */ + * After usage, return the memory region via "malaga_unmap_file". */ { #ifdef POSIX int file_descriptor; @@ -186,8 +186,8 @@ map_file( string_t file_name, void **address, int_t *length ) /*---------------------------------------------------------------------------*/ void -unmap_file( void **address, int_t length ) -/* Return the memory region that has been allocated by "map_file". +malaga_unmap_file( void **address, int_t length ) +/* Return the memory region that has been allocated by "malaga_map_file". * The region starts at *ADDRESS and occupies LENGTH bytes. */ { #ifdef POSIX diff --git a/files.h b/files.h index 94e8afb..b71a427 100644 --- a/files.h +++ b/files.h @@ -45,13 +45,13 @@ extern void *read_new_vector( int_t item_size, * which is connected to file FILE_NAME, into allocated memory block, * and return a pointer to that block. */ -extern void map_file( string_t file_name, void **address, int_t *length ); +extern void malaga_map_file( string_t file_name, void **address, int_t *length ); /* Map file "file_name" into the memory. It will be available in the * memory region starting at *ADDRESS and will occupy LENGTH bytes. - * After usage, return the memory region via "unmap_file". */ + * After usage, return the memory region via "malaga_unmap_file". */ -extern void unmap_file( void **address, int_t length ); -/* Return the memory region that has been allocated by "map_file". +extern void malaga_unmap_file( void **address, int_t length ); +/* Return the memory region that has been allocated by "malaga_map_file". * The region starts at *ADDRESS and occupies LENGTH bytes. */ /* File name operations. ====================================================*/ diff --git a/lex_compiler.c b/lex_compiler.c index 68f3140..d957d65 100644 --- a/lex_compiler.c +++ b/lex_compiler.c @@ -846,7 +846,7 @@ read_prelex_file( string_t file_name ) int_t i; /* Map file into main memory. */ - map_file( file_name, &prelex_data, &prelex_length ); + malaga_map_file( file_name, &prelex_data, &prelex_length ); header = (prelex_header_t *) prelex_data; check_header( &header->common_header, file_name, PRELEX_FILE, MIN_PRELEX_CODE_VERSION, PRELEX_CODE_VERSION ); @@ -859,7 +859,7 @@ read_prelex_file( string_t file_name ) lex_add_allo( strings + entries[i].surface, values + entries[i].feat ); prelex_count = header->entry_count; - unmap_file( &prelex_data, prelex_length ); + malaga_unmap_file( &prelex_data, prelex_length ); allomorph_count = 0; } diff --git a/lexicon.c b/lexicon.c index 27b6501..40e182c 100644 --- a/lexicon.c +++ b/lexicon.c @@ -90,7 +90,7 @@ init_lexicon( string_t file_name ) lexicon_header_t *header; /* Lexicon file header. */ /* Map the lexicon file into memory. */ - map_file( file_name, &lexicon_data, &lexicon_length ); + malaga_map_file( file_name, &lexicon_data, &lexicon_length ); /* Check lexicon header. */ header = (lexicon_header_t *) lexicon_data; @@ -117,7 +117,7 @@ void terminate_lexicon( void ) /* Terminate this module. */ { - unmap_file( &lexicon_data, lexicon_length ); + malaga_unmap_file( &lexicon_data, lexicon_length ); } /* End of file. =============================================================*/