X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fascii.c;h=63aa4c1d82465fa96bc1a0c844c5664db755ea44;hb=28d7aaf2db476de5d62eb90787fef50fec444287;hp=48358d935f9c95d86f98d26de739374684c4383b;hpb=2c4c4a789e9c23478bce195d2ed98bab6064dfc1;p=pspp diff --git a/src/ascii.c b/src/ascii.c index 48358d935f..63aa4c1d82 100644 --- a/src/ascii.c +++ b/src/ascii.c @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include #include "error.h" @@ -32,6 +32,9 @@ #include "pool.h" #include "version.h" +#include "gettext.h" +#define _(msgid) gettext (msgid) + /* ASCII driver options: (defaults listed first) output-file="pspp.list" @@ -165,9 +168,9 @@ struct ascii_driver_ext int bottom_margin; /* Bottom margin in lines. */ int paginate; /* 1=insert formfeeds. */ int tab_width; /* Width of a tab; 0 not to use tabs. */ - struct len_string ops[OPS_COUNT]; /* Basic output strings. */ - struct len_string box[LNS_COUNT]; /* Line & box drawing characters. */ - struct len_string fonts[FSTY_COUNT]; /* Font styles; NULL=overstrike. */ + struct fixed_string ops[OPS_COUNT]; /* Basic output strings. */ + struct fixed_string box[LNS_COUNT]; /* Line & box drawing characters. */ + struct fixed_string fonts[FSTY_COUNT]; /* Font styles; NULL=overstrike. */ int overstrike_style; /* OVS_SINGLE or OVS_LINE. */ int carriage_return_style; /* Carriage return style. */ int squeeze_blank_lines; /* 1=squeeze multiple blank lines into one. */ @@ -599,7 +602,7 @@ ascii_option (struct outp_driver *this, const char *key, break; case string_arg: { - struct len_string *s; + struct fixed_string *s; switch (subcat) { case 0: @@ -670,7 +673,7 @@ int postopen (struct file_ext *f) { struct ascii_driver_ext *x = f->param; - struct len_string *s = &x->ops[OPS_INIT]; + struct fixed_string *s = &x->ops[OPS_INIT]; if (!ls_empty_p (s) && fwrite (ls_c_str (s), ls_length (s), 1, f->file) < 1) { @@ -685,7 +688,7 @@ int preclose (struct file_ext *f) { struct ascii_driver_ext *x = f->param; - struct len_string *d = &x->ops[OPS_DONE]; + struct fixed_string *d = &x->ops[OPS_DONE]; if (!ls_empty_p (d) && fwrite (ls_c_str (d), ls_length (d), 1, f->file) < 1) { @@ -1209,7 +1212,7 @@ output_shorts (struct outp_driver *this, { if (*bp & 0x800) { - struct len_string *box = &ext->box[*bp & 0xff]; + struct fixed_string *box = &ext->box[*bp & 0xff]; size_t len = ls_length (box); if (remaining >= len) @@ -1228,7 +1231,7 @@ output_shorts (struct outp_driver *this, } else if (*bp & 0x0300) { - struct len_string *on; + struct fixed_string *on; char buf[5]; int len; @@ -1373,7 +1376,7 @@ output_lines (struct outp_driver *this, int first, int count) struct ascii_driver_ext *ext = this->ext; int line_num; - struct len_string *newline = &ext->ops[OPS_NEWLINE]; + struct fixed_string *newline = &ext->ops[OPS_NEWLINE]; int n_chars; int n_passes; @@ -1421,7 +1424,7 @@ output_lines (struct outp_driver *this, int first, int count) /* Turn off old font. */ if (attr != (OUTP_F_R << 8)) { - struct len_string *off; + struct fixed_string *off; switch (attr) { @@ -1446,7 +1449,7 @@ output_lines (struct outp_driver *this, int first, int count) attr = (*bp & 0x0300); if (attr != (OUTP_F_R << 8)) { - struct len_string *on; + struct fixed_string *on; switch (attr) { @@ -1633,22 +1636,15 @@ ascii_close_page (struct outp_driver *this) -void ascii_chart_initialise(struct outp_class *c UNUSED, - struct chart *ch UNUSED); - -void ascii_chart_finalise(struct outp_class *c UNUSED, - struct chart *ch UNUSED); - - -void -ascii_chart_initialise(struct outp_class *c UNUSED, struct chart *ch ) +static void +ascii_chart_initialise(struct outp_driver *d UNUSED, struct chart *ch ) { msg(MW, _("Charts are unsupported with ascii drivers.")); ch->lp = 0; } -void -ascii_chart_finalise(struct outp_class *c UNUSED, struct chart *ch UNUSED) +static void +ascii_chart_finalise(struct outp_driver *d UNUSED, struct chart *ch UNUSED) { }