[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp config/ChangeLog config/devices doc/config...
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp config/ChangeLog config/devices doc/config... |
Date: |
Fri, 27 Jul 2007 22:59:32 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Changes by: Ben Pfaff <blp> 07/07/27 22:59:32
Modified files:
config : ChangeLog devices
doc : configuring.texi
src/output : ChangeLog ascii.c output.c
Log message:
Add tty and listing devices that use VT100 (and xterm) line-drawing
characters, and corresponding support for an initialization string in
the ASCII output device.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/config/ChangeLog?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/config/devices?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/doc/configuring.texi?cvsroot=pspp&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ChangeLog?cvsroot=pspp&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ascii.c?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/output.c?cvsroot=pspp&r1=1.22&r2=1.23
Patches:
Index: config/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/config/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- config/ChangeLog 27 Jul 2007 22:58:02 -0000 1.6
+++ config/ChangeLog 27 Jul 2007 22:59:32 -0000 1.7
@@ -1,5 +1,10 @@
2007-07-25 Ben Pfaff <address@hidden>
+ * devices: Add tty and listing devices that use VT100 (and xterm)
+ line-drawing characters.
+
+2007-07-25 Ben Pfaff <address@hidden>
+
* devices: Add an "interactive" category that defaults to
tty-ascii. Make the tty-ascii device more user-friendly.
Index: config/devices
===================================================================
RCS file: /cvsroot/pspp/pspp/config/devices,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- config/devices 27 Jul 2007 22:58:02 -0000 1.7
+++ config/devices 27 Jul 2007 22:59:32 -0000 1.8
@@ -61,6 +61,20 @@
tty-ascii-bi:ascii:screen:output-file=${tty-output-file}
list-ascii-bi:ascii:listing:length=66 width=79 output-file=${list-output-file}
+# VT100 graphics devices.
+define vt100-graphics \
+ init='\033(B\033)0' \
+ box[1000]='\16q\17' box[1010]='\16q\17' box[0010]='\16q\17' \
+ box[0100]='\16x\17' box[0101]='\16x\17' box[0001]='\16x\17' \
+ box[0011]='\16j\17' box[1100]='\16l\17' box[0110]='\16k\17' \
+ box[1001]='\16m\17' box[1110]='\16w\17' box[1101]='\16t\17' \
+ box[0111]='\16u\17' box[1011]='\16v\17' box[1111]='\16n\17'
+
+tty-vt100:ascii:screen:squeeze=on headers=off top-margin=0 bottom-margin=0 \
+ paginate=off output-file=${tty-output-file} ${vt100-graphics}
+list-vt100:ascii:listing:length=66 width=79 output-file=${list-output-file} \
+ ${vt100-graphics}
+
# HTML device.
html:html::
Index: doc/configuring.texi
===================================================================
RCS file: /cvsroot/pspp/pspp/doc/configuring.texi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- doc/configuring.texi 6 Jun 2007 05:17:48 -0000 1.12
+++ doc/configuring.texi 27 Jul 2007 22:59:32 -0000 1.13
@@ -668,7 +668,7 @@
@item address@hidden
File to which output should be sent. This can be an ordinary file name
-(e.g., @code{"pspp.txt"}), a pipe (e.g., @code{"|lpr"}), or
+(e.g., @code{"pspp.txt"}), a pipe (e.g., @code{"|more"}), or
stdout (@code{"-"}). Default: @code{"pspp.list"}.
@item address@hidden
@@ -781,6 +781,11 @@
special lines, in which case @samp{#} is used.
@end itemize
address@hidden address@hidden
+If set, this string is written at the beginning of each output file.
+It can be used to initialize device features, e.g.@: to enable VT100
+line-drawing characters.
+
@item address@hidden
How to emphasize text. Your choices are @code{bold}, @code{underline},
Index: src/output/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ChangeLog,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- src/output/ChangeLog 27 Jul 2007 22:58:02 -0000 1.22
+++ src/output/ChangeLog 27 Jul 2007 22:59:32 -0000 1.23
@@ -1,5 +1,16 @@
2007-07-25 Ben Pfaff <address@hidden>
+ Allow the user to specify an initialization string to write at the
+ beginning of an ASCII output file.
+ * ascii.c (struct ascii_driver_ext): New member `init'.
+ (ascii_open_driver): Initialize `init'.
+ (ascii_close_driver): Parse `init'.
+ (ascii_open_page): Write `init' to output file.
+
+ * output.c (get_option_token): Fix parsing of octal constants.
+
+2007-07-25 Ben Pfaff <address@hidden>
+
Make interactive output go to the terminal (bug #17213), by
causing the UI to flush output to the user when it prompts for a
command.
Index: src/output/ascii.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ascii.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- src/output/ascii.c 27 Jul 2007 22:58:02 -0000 1.15
+++ src/output/ascii.c 27 Jul 2007 22:59:32 -0000 1.16
@@ -53,6 +53,7 @@
bottom-margin=2
box[x]="strng" Sets box character X (X in base 4: 0-3333).
+ init="string" Set initialization string.
*/
/* Disable messages by failed range checks. */
@@ -106,6 +107,7 @@
int bottom_margin; /* Bottom margin in lines. */
char *box[LNS_COUNT]; /* Line & box drawing characters. */
+ char *init; /* Device initialization string. */
/* Internal state. */
char *file_name; /* Output file name. */
@@ -144,6 +146,7 @@
x->bottom_margin = 2;
for (i = 0; i < LNS_COUNT; i++)
x->box[i] = NULL;
+ x->init = NULL;
x->file_name = pool_strdup (x->pool, "pspp.list");
x->file = NULL;
x->page_number = 0;
@@ -231,10 +234,11 @@
enum
{
boolean_arg,
- string_arg,
+ emphasis_arg,
nonneg_int_arg,
pos_int_arg,
- output_file_arg
+ output_file_arg,
+ string_arg
};
static const struct outp_option option_tab[] =
@@ -243,7 +247,7 @@
{"paginate", boolean_arg, 1},
{"squeeze", boolean_arg, 2},
- {"emphasis", string_arg, 3},
+ {"emphasis", emphasis_arg, 0},
{"output-file", output_file_arg, 0},
@@ -254,6 +258,8 @@
{"bottom-margin", nonneg_int_arg, 1},
{"tab-width", nonneg_int_arg, 2},
+ {"init", string_arg, 0},
+
{NULL, 0, 0},
};
@@ -318,7 +324,7 @@
}
}
break;
- case string_arg:
+ case emphasis_arg:
if (!strcmp (value, "bold"))
x->emphasis = EMPH_BOLD;
else if (!strcmp (value, "underline"))
@@ -390,6 +396,10 @@
}
}
break;
+ case string_arg:
+ free (x->init);
+ x->init = pool_strdup (x->pool, value);
+ break;
default:
NOT_REACHED ();
}
@@ -413,6 +423,9 @@
return;
}
pool_attach_file (x->pool, x->file);
+
+ if (x->init != NULL)
+ fputs (x->init, x->file);
}
x->page_number++;
Index: src/output/output.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/output.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- src/output/output.c 27 Jul 2007 22:58:03 -0000 1.22
+++ src/output/output.c 27 Jul 2007 22:59:32 -0000 1.23
@@ -562,7 +562,7 @@
case '7':
out = c - '0';
while (ss_first (*s) >= '0' && ss_first (*s) <= '7')
- out = c * 8 + (ss_get_char (s) - '0');
+ out = out * 8 + (ss_get_char (s) - '0');
break;
case 'x':
case 'X':
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp config/ChangeLog config/devices doc/config...,
Ben Pfaff <=