Move syntax generation to the psppire-import-textfile module
[pspp] / src / ui / gui / psppire-import-textfile.h
1 #ifndef PSPPIRE_IMPORT_TEXTFILE_H
2 #define PSPPIRE_IMPORT_TEXTFILE_H
3
4 #include "psppire-import-assistant.h"
5
6 struct separator
7 {
8   const char *name;           /* Name (for use with get_widget_assert). */
9   gunichar c;                 /* Separator character. */
10 };
11
12 /* All the separators in the dialog box. */
13 static const struct separator separators[] =
14   {
15     {"space",     ' '},
16     {"tab",       '\t'},
17     {"bang",      '!'},
18     {"colon",     ':'},
19     {"comma",     ','},
20     {"hyphen",    '-'},
21     {"pipe",      '|'},
22     {"semicolon", ';'},
23     {"slash",     '/'},
24   };
25
26 #define SEPARATOR_CNT (sizeof separators / sizeof *separators)
27
28 /* Initializes IA's intro substructure. */
29 void intro_page_create (PsppireImportAssistant *ia);
30 void first_line_page_create (PsppireImportAssistant *ia);
31 void separators_page_create (PsppireImportAssistant *ia);
32
33 /* Set the data model for both the data sheet and the variable sheet.  */
34 void textfile_set_data_models (PsppireImportAssistant *ia);
35
36 void text_spec_gen_syntax (PsppireImportAssistant *ia, struct string *s);
37
38
39 #endif