Take advantage of new dynamic string macros.
[xtoys] / xgetline.c
index 8f8a8dc..322f7aa 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-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
  *
@@ -29,6 +29,9 @@
 /*----- 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.
  *
@@ -347,9 +350,8 @@ int main(int argc, char *argv[])
 
     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);