static void sortlines (struct line *restrict, size_t, size_t,
- struct merge_node *, bool, struct merge_node_queue *,
+ struct merge_node *, struct merge_node_queue *,
FILE *, char const *);
/* Thread arguments for sortlines_thread. */
to this node's parent. */
struct merge_node *const node;
- /* True if this node is sorting the lower half of the parent's work. */
- bool is_lo_child;
-
/* The priority queue controlling available work for the entire
internal sort. */
struct merge_node_queue *const queue;
{
struct thread_args const *args = data;
sortlines (args->lines, args->nthreads, args->total_lines,
- args->node, args->is_lo_child, args->queue, args->tfp,
+ args->node, args->queue, args->tfp,
args->output_temp);
return NULL;
}
static void
sortlines (struct line *restrict lines, size_t nthreads,
- size_t total_lines, struct merge_node *node, bool is_lo_child,
+ size_t total_lines, struct merge_node *node,
struct merge_node_queue *queue, FILE *tfp, char const *temp_output)
{
size_t nlines = node->nlo + node->nhi;
size_t hi_threads = nthreads - lo_threads;
pthread_t thread;
struct thread_args args = {lines, lo_threads, total_lines,
- node->lo_child, true, queue, tfp, temp_output};
+ node->lo_child, queue, tfp, temp_output};
if (nthreads > 1 && SUBTHREAD_LINES_HEURISTIC <= nlines
&& pthread_create (&thread, NULL, sortlines_thread, &args) == 0)
{
sortlines (lines - node->nlo, hi_threads, total_lines,
- node->hi_child, false, queue, tfp, temp_output);
+ node->hi_child, queue, tfp, temp_output);
pthread_join (thread, NULL);
}
else
struct merge_node *root = merge_tree + 1;
sortlines (line, nthreads, buf.nlines, root,
- true, &queue, tfp, temp_output);
+ &queue, tfp, temp_output);
queue_destroy (&queue);
pthread_mutex_destroy (&root->lock);
merge_tree_destroy (merge_tree);
/* Output the number of seconds since the Epoch, using a format that
acts like printf's %f format. */
static void
-out_epoch_sec (char *pformat, size_t prefix_len, struct stat const *statbuf,
+out_epoch_sec (char *pformat, size_t prefix_len,
+ struct stat const *statbuf ATTRIBUTE_UNUSED,
struct timespec arg)
{
char *dot = memchr (pformat, '.', prefix_len);
/* Stat the file system and print what we find. */
static bool ATTRIBUTE_WARN_UNUSED_RESULT
-do_statfs (char const *filename, bool terse, char const *format)
+do_statfs (char const *filename, char const *format)
{
STRUCT_STATVFS statfsbuf;
/* stat the file and print what we find */
static bool ATTRIBUTE_WARN_UNUSED_RESULT
-do_stat (char const *filename, bool terse, char const *format,
+do_stat (char const *filename, char const *format,
char const *format2)
{
struct stat statbuf;
for (i = optind; i < argc; i++)
ok &= (fs
- ? do_statfs (argv[i], terse, format)
- : do_stat (argv[i], terse, format, format2));
+ ? do_statfs (argv[i], format)
+ : do_stat (argv[i], format, format2));
exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
}