tWrite $-free paths in Dump files (Peter Canning). - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit de1168dd9caa73403e11de015b6f33323372c505
parent acb880af1ce5169b0280eb9b8fa256942ab77bed
Author: rsc 
Date:   Tue, 21 Mar 2006 18:03:33 +0000

Write $-free paths in Dump files (Peter Canning).

Diffstat:
  M src/cmd/acme/rows.c                 |      14 ++++++++++----

1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c
t@@ -319,7 +319,7 @@ rowdump(Row *row, char *file)
         uint q0, q1;
         Biobuf *b;
         char *buf, *a, *fontname;
-        Rune *r;
+        Rune *r, *rp;
         Column *c;
         Window *w, *w1;
         Text *t;
t@@ -417,11 +417,17 @@ rowdump(Row *row, char *file)
                         Bwrite(b, buf, strlen(buf));
                         m = min(RBUFSIZE, w->tag.file->b.nc);
                         bufread(&w->tag.file->b, 0, r, m);
+                        if(dodollarsigns && r[0] == '$'){
+                                rp = runestrdup(r);
+                                expandenv(&rp, (uint*)&m);
+                        }else
+                                rp = r;
                         n = 0;
-                        while(nfile->b.nc;