X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fspreadsheet-reader.h;h=efba6f369fbf3577511aa01f422c64d241893db4;hb=33cdbdf7e095370cf04240eed21344205a487191;hp=0f0819b249bbdf6633acbf65949db236611188bc;hpb=958e78555714e9f1847513f9cc576fa2cd7a6769;p=pspp diff --git a/src/data/spreadsheet-reader.h b/src/data/spreadsheet-reader.h index 0f0819b249..efba6f369f 100644 --- a/src/data/spreadsheet-reader.h +++ b/src/data/spreadsheet-reader.h @@ -18,6 +18,7 @@ #define SPREADSHEET_READ_H 1 #include +#include struct casereeader; @@ -31,7 +32,8 @@ struct casereeader; struct spreadsheet_read_options { char *sheet_name ; /* The name of the sheet to open (in UTF-8) */ - int sheet_index ; /* The index of the sheet to open (only used if sheet_name is NULL) */ + int sheet_index ; /* The index of the sheet to open (only used if sheet_name is NULL). + The first index is 1 NOT 0 */ char *cell_range ; /* The cell range (in UTF-8) */ bool read_names ; /* True if the first row is to be used as the names of the variables */ int asw ; /* The width of string variables in the created dictionary */ @@ -67,8 +69,8 @@ struct spreadsheet int n_sheets; /* The dictionary for client's reference. - Client must clone if it needs a permanent or modifiable copy. */ - const struct dictionary *dict; + Client must ref or clone it if it needs a permanent or modifiable copy. */ + struct dictionary *dict; int ref_cnt; }; @@ -76,8 +78,8 @@ struct spreadsheet struct casereader * spreadsheet_make_reader (struct spreadsheet *, const struct spreadsheet_read_options *); -const char * spreadsheet_get_sheet_name (struct spreadsheet *s, int n); -char * spreadsheet_get_sheet_range (struct spreadsheet *s, int n); +const char * spreadsheet_get_sheet_name (struct spreadsheet *s, int n) OPTIMIZE(2); +char * spreadsheet_get_sheet_range (struct spreadsheet *s, int n) OPTIMIZE(2); char * create_cell_ref (int col0, int row0);