This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
backslashify-docs script
- To: guile at sourceware dot cygnus dot com
- Subject: backslashify-docs script
- From: "Greg J. Badros" <gjb at cs dot washington dot edu>
- Date: 12 Jan 2000 00:17:56 -0800
Could someone whose got access to a compiler that does *not* support
literal strings split across lines run the below script on **/*.c [Zsh
syntax -- just run it on all .c files that you care to fix] and report
if Guile builds for them. If the script works reliably enough, it might
be useful to defer add the "\n\" endings to the docstring lines until
later, and just package up the script (or perhaps an equivalent awk
script) and run it if an autoconf test tells us that we need to.
Thanks,
Greg
#!/usr/bin/perl -pwi.bak
BEGIN { $backslashing = 0; }
if (/^SCM_DEFINE/) { $backslashing = 1; next }
if (/^\#define FUNC_NAME/) { $backslashing = 0; next }
if ($backslashing == 1 && m/^\S/) {
s/$/\\n\\/ unless (m/\"\s*\)\s*$/ || m/\\$/);
}