chiark
/
gitweb
/
~mdw
/
xtoys
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Take advantage of new dynamic string macros.
[xtoys]
/
xgetline.c
diff --git
a/xgetline.c
b/xgetline.c
index 8f8a8dcd03b96af6ce0966725dd511fb50373eea..322f7aa956db9c93fa36824a04909b48dd0e7b0b 100644
(file)
--- a/
xgetline.c
+++ b/
xgetline.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: xgetline.c,v 1.
9 1999/05/05 18:54:37
mdw Exp $
+ * $Id: xgetline.c,v 1.
10 1999/05/21 22:09:19
mdw Exp $
*
* Fetch a line of text from the user
*
*
* Fetch a line of text from the user
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: xgetline.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: xgetline.c,v $
+ * Revision 1.10 1999/05/21 22:09:19 mdw
+ * Take advantage of new dynamic string macros.
+ *
* Revision 1.9 1999/05/05 18:54:37 mdw
* Keep blank lines out of the history list.
*
* Revision 1.9 1999/05/05 18:54:37 mdw
* Keep blank lines out of the history list.
*
@@
-347,9
+350,8
@@
int main(int argc, char *argv[])
hist = 0;
if (fp) {
hist = 0;
if (fp) {
- dstr d;
+ dstr d
= DSTR_INIT
;
- dstr_create(&d);
while (dstr_putline(&d, fp) != EOF) {
hist = g_list_append(hist, xstrdup(d.buf));
dstr_destroy(&d);
while (dstr_putline(&d, fp) != EOF) {
hist = g_list_append(hist, xstrdup(d.buf));
dstr_destroy(&d);