X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fsort.c;h=8dad3566ccdcca1ad8e9fabf63ace81b42d7019f;hb=92fb12eb06716d14c05b781f5d9dcde956d77c30;hp=47cd6a095c2435ad5bbad38aa645d348711b5f6b;hpb=8cf495e615e4feca5777f3592de98321d4fcdc0b;p=pspp diff --git a/src/sort.c b/src/sort.c index 47cd6a095c..8dad3566cc 100644 --- a/src/sort.c +++ b/src/sort.c @@ -72,7 +72,7 @@ cmd_sort_cases (void) if (criteria == NULL) return CMD_FAILURE; - if (test_mode && lex_match ('/')) + if (get_testing_mode () && lex_match ('/')) { if (!lex_force_match_id ("BUFFERS") || !lex_match ('=') || !lex_force_int ()) @@ -443,7 +443,7 @@ allocate_cases (struct initial_run_state *irs) approx_case_cost = (sizeof *irs->records + irs->xsrt->value_cnt * sizeof (union value) + 4 * sizeof (void *)); - max_cases = get_max_workspace() / approx_case_cost; + max_cases = get_workspace() / approx_case_cost; if (max_cases > max_buffers) max_cases = max_buffers; irs->records = nmalloc (sizeof *irs->records, max_cases); @@ -462,7 +462,7 @@ allocate_cases (struct initial_run_state *irs) msg (SE, _("Out of memory. Could not allocate room for minimum of %d " "cases of %d bytes each. (PSPP workspace is currently " "restricted to a maximum of %d KB.)"), - min_buffers, approx_case_cost, get_max_workspace() / 1024); + min_buffers, approx_case_cost, get_workspace() / 1024); return 0; } return 1;