comparison toys/pending/grep.c @ 972:e33f0312de6e

grep: s/astrcat/x&/g
author Strake <strake888@gmail.com>
date Sat, 27 Jul 2013 00:50:29 -0500
parents 31e91deb0824
children 0666d42df954
comparison
equal deleted inserted replaced
971:31e91deb0824 972:e33f0312de6e
105 return re_ys; 105 return re_ys;
106 } 106 }
107 107
108 void addRE (char *x) { 108 void addRE (char *x) {
109 if (toys.optflags & FLAG_F) x = regfix (x); 109 if (toys.optflags & FLAG_F) x = regfix (x);
110 if (TT.re_xs) TT.re_xs = astrcat (TT.re_xs, "|"); 110 if (TT.re_xs) TT.re_xs = xastrcat (TT.re_xs, "|");
111 TT.re_xs = astrcat (TT.re_xs, x); 111 TT.re_xs = xastrcat (TT.re_xs, x);
112 if (toys.optflags & FLAG_F) free (x); 112 if (toys.optflags & FLAG_F) free (x);
113 } 113 }
114 114
115 void buildRE (void) { 115 void buildRE (void) {
116 for (; TT.eArgu; TT.eArgu = TT.eArgu -> next) addRE (TT.eArgu -> arg); 116 for (; TT.eArgu; TT.eArgu = TT.eArgu -> next) addRE (TT.eArgu -> arg);