X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdfm.c;h=cec6234f982b94fa33f429c5c01208d54230a520;hb=14e7292894533c5491a774a2d749386362660812;hp=9e9d080c97f17440fb75d0b2d43bbfc7b0155fbe;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp-builds.git diff --git a/src/dfm.c b/src/dfm.c index 9e9d080c..cec6234f 100644 --- a/src/dfm.c +++ b/src/dfm.c @@ -17,25 +17,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* AIX requires this to be the first thing in the file. */ #include -#if __GNUC__ -#define alloca __builtin_alloca -#else -#if HAVE_ALLOCA_H -#include -#else -#ifdef _AIX -#pragma alloca -#else -#ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -#endif -#endif -#endif -#endif - #include +#include "dfm.h" #include #include #include @@ -50,8 +34,6 @@ char *alloca (); #include "str.h" #include "vfm.h" -#undef DEBUGGING -/*#define DEBUGGING 1*/ #include "debug-print.h" /* file_handle extension structure. */ @@ -108,9 +90,6 @@ open_inline_file (struct dfm_fhuser_ext *ext) { /* We want to indicate that the file is open, that we are not at eof, and that another line needs to be read in. */ -#if __CHECKER__ - memset (&ext->file, 0, sizeof ext->file); -#endif ext->file.file = NULL; ext->line = xmalloc (128); #if !PRODUCTION @@ -490,6 +469,8 @@ eof: char * dfm_get_record (struct file_handle *h, int *len) { + assert (h != NULL); + if (h->class == NULL) { if (!open_file_r (h)) @@ -669,9 +650,8 @@ cmd_begin_data (void) /* FIXME: figure out the *exact* conditions, not these really lenient conditions. */ if (vfm_source == NULL - || vfm_source == &vfm_memory_stream - || vfm_source == &vfm_disk_stream - || vfm_source == &sort_stream) + || case_source_is_class (vfm_source, &storage_source_class) + || case_source_is_class (vfm_source, &sort_source_class)) { msg (SE, _("This command is not valid here since the current " "input program does not access the inline file.")); @@ -688,7 +668,7 @@ cmd_begin_data (void) /* We don't actually read from the inline file. The input procedure is what reads from it. */ getl_prompt = GETL_PRPT_DATA; - procedure (NULL, NULL, NULL); + procedure (NULL, NULL); ext = inline_file->ext;