@@ -27,9 +27,9 @@ struct config_source {
27
27
struct strbuf value ;
28
28
struct strbuf var ;
29
29
30
- int (* fgetc )(struct config_source * c );
31
- int (* ungetc )(int c , struct config_source * conf );
32
- long (* ftell )(struct config_source * c );
30
+ int (* do_fgetc )(struct config_source * c );
31
+ int (* do_ungetc )(int c , struct config_source * conf );
32
+ long (* do_ftell )(struct config_source * c );
33
33
};
34
34
35
35
static struct config_source * cf ;
@@ -217,13 +217,13 @@ int git_config_from_parameters(config_fn_t fn, void *data)
217
217
218
218
static int get_next_char (void )
219
219
{
220
- int c = cf -> fgetc (cf );
220
+ int c = cf -> do_fgetc (cf );
221
221
222
222
if (c == '\r' ) {
223
223
/* DOS like systems */
224
- c = cf -> fgetc (cf );
224
+ c = cf -> do_fgetc (cf );
225
225
if (c != '\n' ) {
226
- cf -> ungetc (c , cf );
226
+ cf -> do_ungetc (c , cf );
227
227
c = '\r' ;
228
228
}
229
229
}
@@ -992,9 +992,9 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data)
992
992
top .u .file = f ;
993
993
top .name = filename ;
994
994
top .die_on_error = 1 ;
995
- top .fgetc = config_file_fgetc ;
996
- top .ungetc = config_file_ungetc ;
997
- top .ftell = config_file_ftell ;
995
+ top .do_fgetc = config_file_fgetc ;
996
+ top .do_ungetc = config_file_ungetc ;
997
+ top .do_ftell = config_file_ftell ;
998
998
999
999
ret = do_config_from (& top , fn , data );
1000
1000
@@ -1013,9 +1013,9 @@ int git_config_from_buf(config_fn_t fn, const char *name, const char *buf,
1013
1013
top .u .buf .pos = 0 ;
1014
1014
top .name = name ;
1015
1015
top .die_on_error = 0 ;
1016
- top .fgetc = config_buf_fgetc ;
1017
- top .ungetc = config_buf_ungetc ;
1018
- top .ftell = config_buf_ftell ;
1016
+ top .do_fgetc = config_buf_fgetc ;
1017
+ top .do_ungetc = config_buf_ungetc ;
1018
+ top .do_ftell = config_buf_ftell ;
1019
1019
1020
1020
return do_config_from (& top , fn , data );
1021
1021
}
@@ -1196,7 +1196,7 @@ static int store_aux(const char *key, const char *value, void *cb)
1196
1196
return 1 ;
1197
1197
}
1198
1198
1199
- store .offset [store .seen ] = cf -> ftell (cf );
1199
+ store .offset [store .seen ] = cf -> do_ftell (cf );
1200
1200
store .seen ++ ;
1201
1201
}
1202
1202
break ;
@@ -1223,19 +1223,19 @@ static int store_aux(const char *key, const char *value, void *cb)
1223
1223
* Do not increment matches: this is no match, but we
1224
1224
* just made sure we are in the desired section.
1225
1225
*/
1226
- store .offset [store .seen ] = cf -> ftell (cf );
1226
+ store .offset [store .seen ] = cf -> do_ftell (cf );
1227
1227
/* fallthru */
1228
1228
case SECTION_END_SEEN :
1229
1229
case START :
1230
1230
if (matches (key , value )) {
1231
- store .offset [store .seen ] = cf -> ftell (cf );
1231
+ store .offset [store .seen ] = cf -> do_ftell (cf );
1232
1232
store .state = KEY_SEEN ;
1233
1233
store .seen ++ ;
1234
1234
} else {
1235
1235
if (strrchr (key , '.' ) - key == store .baselen &&
1236
1236
!strncmp (key , store .key , store .baselen )) {
1237
1237
store .state = SECTION_SEEN ;
1238
- store .offset [store .seen ] = cf -> ftell (cf );
1238
+ store .offset [store .seen ] = cf -> do_ftell (cf );
1239
1239
}
1240
1240
}
1241
1241
}
0 commit comments