[GRASS5] G_string_replace ()?

Thierry Laronde tlaronde at polynum.com
Thu Mar 11 06:09:05 EST 2004


On Thu, Mar 11, 2004 at 08:55:26AM +0100, Markus Neteler wrote:
> On Wed, Mar 10, 2004 at 05:05:54PM +0100, Thierry Laronde wrote:
> > FWIW, for string manipulations (and for OSes not supporting awk just
> > provide an already "digest" version) simply use:
> > 
> > cat old_file | awk 'BEGIN { ORS="<br>";} {print;}' > new_file
> 
> 
> Thierry,
> 
> thanks for the hint but I need to implement a C solution
> in lib/gis/parser.c.

You will have to use the POSIX strstr() function in this case. But may I
suggest that, if this is "just" to generate the HTML pages, it will be
more easy to implement this using UNIX powertools (sed | awk), providing
platforms not having them with a pregenerated tarball?

Cheers,
-- 
Thierry Laronde (Alceste) <tlaronde at polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




More information about the grass-dev mailing list