*: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/
This commit is contained in:
@@ -51,7 +51,7 @@ static void cut_file(FILE *file, char delim)
|
||||
unsigned int linenum = 0; /* keep these zero-based to be consistent */
|
||||
|
||||
/* go through every line in the file */
|
||||
while ((line = xmalloc_getline(file)) != NULL) {
|
||||
while ((line = xmalloc_fgetline(file)) != NULL) {
|
||||
|
||||
/* set up a list so we can keep track of what's been printed */
|
||||
char * printed = xzalloc(strlen(line) * sizeof(char));
|
||||
|
@@ -115,7 +115,7 @@ int md5_sha1_sum_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
|
||||
pre_computed_stream = xfopen_stdin(argv[0]);
|
||||
|
||||
while ((line = xmalloc_getline(pre_computed_stream)) != NULL) {
|
||||
while ((line = xmalloc_fgetline(pre_computed_stream)) != NULL) {
|
||||
char *filename_ptr;
|
||||
|
||||
count_total++;
|
||||
|
@@ -150,9 +150,9 @@ static struct sort_key *add_key(void)
|
||||
#define GET_LINE(fp) \
|
||||
((option_mask32 & FLAG_z) \
|
||||
? bb_get_chunk_from_file(fp, NULL) \
|
||||
: xmalloc_getline(fp))
|
||||
: xmalloc_fgetline(fp))
|
||||
#else
|
||||
#define GET_LINE(fp) xmalloc_getline(fp)
|
||||
#define GET_LINE(fp) xmalloc_fgetline(fp)
|
||||
#endif
|
||||
|
||||
/* Iterate through keys list and perform comparisons */
|
||||
|
@@ -71,7 +71,7 @@ int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
dups = 0;
|
||||
|
||||
/* gnu uniq ignores newlines */
|
||||
while ((s1 = xmalloc_getline(in)) != NULL) {
|
||||
while ((s1 = xmalloc_fgetline(in)) != NULL) {
|
||||
e1 = s1;
|
||||
for (i = skip_fields; i; i--) {
|
||||
e1 = skip_whitespace(e1);
|
||||
|
@@ -18,7 +18,7 @@ static void read_stduu(FILE *src_stream, FILE *dst_stream)
|
||||
{
|
||||
char *line;
|
||||
|
||||
while ((line = xmalloc_getline(src_stream)) != NULL) {
|
||||
while ((line = xmalloc_fgetline(src_stream)) != NULL) {
|
||||
int encoded_len, str_len;
|
||||
char *line_ptr, *dst;
|
||||
|
||||
@@ -151,7 +151,7 @@ int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
src_stream = xfopen_stdin(*argv);
|
||||
|
||||
/* Search for the start of the encoding */
|
||||
while ((line = xmalloc_getline(src_stream)) != NULL) {
|
||||
while ((line = xmalloc_fgetline(src_stream)) != NULL) {
|
||||
void (*decode_fn_ptr)(FILE * src, FILE * dst);
|
||||
char *line_ptr;
|
||||
FILE *dst_stream;
|
||||
|
Reference in New Issue
Block a user