Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/sort/file.c
Show First 20 Lines • Show All 1,230 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Sort list of lines and writes it to the file | * Sort list of lines and writes it to the file | ||||
*/ | */ | ||||
void | void | ||||
sort_list_to_file(struct sort_list *list, const char *outfile) | sort_list_to_file(struct sort_list *list, const char *outfile) | ||||
{ | { | ||||
struct sort_mods *sm = &(keys[0].sm); | struct sort_mods *sm = &(keys[0].sm); | ||||
if (!(sm->Mflag) && !(sm->Rflag) && !(sm->Vflag) && !(sm->Vflag) && | if (!(sm->Mflag) && !(sm->Rflag) && !(sm->Vflag) && | ||||
!(sm->gflag) && !(sm->hflag) && !(sm->nflag)) { | !(sm->gflag) && !(sm->hflag) && !(sm->nflag)) { | ||||
if ((sort_opts_vals.sort_method == SORT_DEFAULT) && byte_sort) | if ((sort_opts_vals.sort_method == SORT_DEFAULT) && byte_sort) | ||||
sort_opts_vals.sort_method = SORT_RADIXSORT; | sort_opts_vals.sort_method = SORT_RADIXSORT; | ||||
} else if (sort_opts_vals.sort_method == SORT_RADIXSORT) | } else if (sort_opts_vals.sort_method == SORT_RADIXSORT) | ||||
err(2, "%s", getstr(9)); | err(2, "%s", getstr(9)); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines |