Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 158828
Collapse All | Expand All

(-)gri-2.12.13/src/extern.hh (+1 lines)
Lines 137-142 Link Here
137
137
138
extern int      _arrow_type;
138
extern int      _arrow_type;
139
extern bool     _warn_offpage;
139
extern bool     _warn_offpage;
140
extern bool	_export_postscript;
140
141
141
extern std::vector<double> _dash;
142
extern std::vector<double> _dash;
142
143
(-)gri-2.12.13/src/gr.cc (-2 / +5 lines)
Lines 365-372 Link Here
365
	/*
365
	/*
366
	 * write conforming postscript prolog
366
	 * write conforming postscript prolog
367
	 */
367
	 */
368
	/* fprintf(fp, "%%!PS-Adobe-1.0\n"); */
368
	extern bool _export_postscript;
369
	fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n");
369
	if (_export_postscript)
370
		fprintf(fp, "%%!PS-Adobe-2.0\n");
371
	else
372
		fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n");
370
	if (privacy)
373
	if (privacy)
371
	  fprintf(fp, "%%%%Creator: %s\n", "");
374
	  fprintf(fp, "%%%%Creator: %s\n", "");
372
	else
375
	else
(-)gri-2.12.13/src/gri.cc (+1 lines)
Lines 35-40 Link Here
35
// Globals used elsewhere (variables begin with _).
35
// Globals used elsewhere (variables begin with _).
36
int             _arrow_type;
36
int             _arrow_type;
37
bool            _warn_offpage;
37
bool            _warn_offpage;
38
bool		_export_postscript;
38
std::vector<double>       _dash;
39
std::vector<double>       _dash;
39
std::vector<DataFile>     _dataFILE;
40
std::vector<DataFile>     _dataFILE;
40
std::vector<CmdFile>      _cmdFILE;
41
std::vector<CmdFile>      _cmdFILE;
(-)gri-2.12.13/src/startup.cc (+9 lines)
Lines 188-193 Link Here
188
	_axes_offset = 0.0;
188
	_axes_offset = 0.0;
189
	_use_default_for_query = false;
189
	_use_default_for_query = false;
190
	_warn_offpage = true;
190
	_warn_offpage = true;
191
	_export_postscript = false;
191
	PUT_VAR("..use_default_for_query..", 0.0);
192
	PUT_VAR("..use_default_for_query..", 0.0);
192
	PUT_VAR("..words_in_dataline..", 0.0); // just in case tested
193
	PUT_VAR("..words_in_dataline..", 0.0); // just in case tested
193
	PUT_VAR("..batch..", 0.0);
194
	PUT_VAR("..batch..", 0.0);
Lines 678-683 Link Here
678
#define FLAG_PUBLICATION	1009
679
#define FLAG_PUBLICATION	1009
679
#define FLAG_SUPERUSER		1010
680
#define FLAG_SUPERUSER		1010
680
#define FLAG_WARN_OFFPAGE	1011
681
#define FLAG_WARN_OFFPAGE	1011
682
#define FLAG_POSTSCRIPT		1012
681
	// I use the 'FLAG_...' numbers for options that lack single-character abbreviations.
683
	// I use the 'FLAG_...' numbers for options that lack single-character abbreviations.
682
	static struct poptOption optionsTable[] = {
684
	static struct poptOption optionsTable[] = {
683
		{ "batch",             'b',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'b'                   },
685
		{ "batch",             'b',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'b'                   },
Lines 700-705 Link Here
700
		{ "version",           'v',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'v'                   },
702
		{ "version",           'v',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'v'                   },
701
		{ "warn_offpage",      '\0', POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, FLAG_WARN_OFFPAGE     },
703
		{ "warn_offpage",      '\0', POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, FLAG_WARN_OFFPAGE     },
702
		{ "yes",               'y',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'y'                   },
704
		{ "yes",               'y',  POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, 'y'                   },
705
		{ "postscript",        '\0', POPT_ARG_NONE   | POPT_ARGFLAG_ONEDASH, NULL, FLAG_POSTSCRIPT                   },
703
		{  0,                   0,                                       0,     0, 0                     }
706
		{  0,                   0,                                       0,     0, 0                     }
704
	};
707
	};
705
	const poptContext optCon =
708
	const poptContext optCon =
Lines 867-872 Link Here
867
				printf("Gri cannot read in '%s'\n",optArg);
870
				printf("Gri cannot read in '%s'\n",optArg);
868
			}
871
			}
869
			break;
872
			break;
873
		case FLAG_POSTSCRIPT
874
			_export_postscript = true;
870
		default:
875
		default:
871
			printf("Unknown option\n");
876
			printf("Unknown option\n");
872
			break;
877
			break;
Lines 1052-1057 Link Here
1052
				} else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "-yes")) {
1057
				} else if (!strcmp(argv[i], "-y") || !strcmp(argv[i], "-yes")) {
1053
					_use_default_for_query = true;
1058
					_use_default_for_query = true;
1054
					PUT_VAR("..use_default_for_query..", 1.0);
1059
					PUT_VAR("..use_default_for_query..", 1.0);
1060
				} else if (!strcmp(argv[i], "-postscript")){
1061
					_export_postscript = true;
1055
#if 0
1062
#if 0
1056
				} else if (!strcmp(argv[i], "-e")) {
1063
				} else if (!strcmp(argv[i], "-e")) {
1057
					// User wants to do cmd in argv[i+1]
1064
					// User wants to do cmd in argv[i+1]
Lines 1184-1189 Link Here
1184
        gr_textput("             Makes Gri print out command lines as they are executed.\n");
1191
        gr_textput("             Makes Gri print out command lines as they are executed.\n");
1185
        gr_textput("     -true or -y\n");
1192
        gr_textput("     -true or -y\n");
1186
        gr_textput("             Makes Gri think the answer to all `query's is RETURN.\n");
1193
        gr_textput("             Makes Gri think the answer to all `query's is RETURN.\n");
1194
	gr_textput("     -postscript\n");
1195
	gr_textput("             Export a PostScript file in stead of an EPS file.\n");
1187
#if 0
1196
#if 0
1188
        gr_textput("     -e cmd\n");
1197
        gr_textput("     -e cmd\n");
1189
        gr_textput("             BUG: NOT IMPLEMENTED YET!\n");
1198
        gr_textput("             BUG: NOT IMPLEMENTED YET!\n");

Return to bug 158828