Linux SoftwareProgrammingInternationalizationcstrings 2.3.1

cstrings 2.3.1


A lightweight internationalization tool for C code, for those who find gettext too bulky and intrusive
Developer:   Eric S. Raymond
      more software by author →
Price:  0.00
License:   GPL (GNU General Public License)
File size:   17K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


A lightweight internationalization tool for C code, for those who find gettext too bulky and intrusive. Extracts strings from a program and turns them into #defines in a pre-pended code section. Has good features for building up your message base incrementally.

This tool can be used to massage input C source so that literal strings in it are replaced by generated #define symbols, with the list of #defines prepended to the resulting source code. String literals on #include and #define lines and in comments are skipped.

If no filenames are given, standard input is filtered to standard output. If filenames are given (and appropriate write permissions are present), each file is replaced by its converted result (the replace is done with a link(2), so the program is signal-safe). To avoid heartbreak and death threats to the author, it is recommended that you not use this feature without looking at the filtered version first to ensure that it's what you really want.

The string argument of a -r option is interpreted as a comma-separated list of line numbers or line number ranges to which the string filtering is to be limited. A range of the form "-" is taken to signify all lines from line to EOF; a range of the form "-" signifies all lines from the start of file to line . Additionally, any range or number may be preceded by '!'; this causes filtering to be suppressed for the lines designated. If the first character of a range option is '!', filtering is assumed initially on for all lines, rather than off.

The -t option sets the template with which string labels are generated. The default is "G%05d". The template is sprintf'ed with a sequence number as argument.

The -m option takes a numeric argument, interpreted as a minimum length. All strings less than that size are ignored. Note that this minimum length defaults to 3, you must say -m 1 or -m 2 to see all short strings.

The -c option suppresses the normal action and instead causes a list of strings that would otherwise be #define-ized (each preceded by its line number) to be emitted to stdout. If -c is used with file arguments a report with sections headed by file names will be generated.

The -c option permits you to anticipate the effects of a substitution without having to look at the whole source file.

This tool is best used by doing repeated -c runs, adding to an -r argument until you have it down to filtering just the lines you want, and then dropping the -c to do the actual conversion. Then you can move the list of generated #defines to an appropriate spot with a text editor.

Limitations:
  • This program makes no effort to be intelligent about duplicate strings. Also, it doesn't handle quoted quotes within strings.


    What's New in This Release:
  • Use mkstemp(3) rather than tempnam(3) for security's sake.
  • Source RPMs no longer depend on --define myversion.
    tags all lines  the lines  lines from  rather than  the template  minimum length  generated the  the form  filenames are  the list  are given  the string  line number  

    Download cstrings 2.3.1


     http://www.catb.org/~esr/cstrings/cstrings-2.3-1.i386.rpm
     http://www.catb.org/~esr/cstrings/cstrings-2.3-1.src.rpm
     http://www.catb.org/~esr/cstrings/cstrings-2.3.tar.gz


    Authors software

    Fetchmail 6.3.5 (by Eric S. Raymond)
    Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand

    hexdump 1.6 (by Eric S. Raymond)
    hexdump produces a CP/M-like format by default, and can handle EBCDIC

    cstrings 2.3.1 (by Eric S. Raymond)
    A lightweight internationalization tool for C code, for those who find gettext too bulky and intrusive

    Bogofilter 1.1.3 (by Eric S. Raymond)
    Bogofilter is a Bayesian spam filter

    Fetchmail 6.2.9 RC10 (by Eric S. Raymond)
    Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand


    Similar software

    cstrings 2.3.1 (by Eric S. Raymond)
    A lightweight internationalization tool for C code, for those who find gettext too bulky and intrusive

    MIME::Base64 3.07 (by Gisle Aas)
    MIME::Base64 is an encoding and decoding of base64 strings.

    SYNOPSIS

    use MIME::Base64;

    $encoded = encode_base64('Aladdin:o

    Automated Argument Helper 1.2.2 (by Scott McKellar)
    Aargh is a code generator, written in C++ and licensed under the terms of the GNU General Public License (GPL)

    yagg 1.4000 (by David Coppit)
    yagg, given YACC-like and LEX-like input files, generates a C++ program that generates all strings of a user-specified length

    Randomize Lines 0.2.5 (by Arthur de Jong)
    Randomize Lines (rl) is a command-line tool that reads lines from an input file or stdin, randomizes the lines and outputs a specifie

    Term::ANSIColor 1.10 (by Russ Allbery)
    Term::ANSIColor is a color screen output using ANSI escape sequences.

    SYNOPSIS

    use Term::ANSIColor;
    print color 'bold

    Safe Strings 2.0.1 (by Pablo Yanez Trujillo)
    Safe Strings is a small C library that handles C strings in a safe way

    newfile 1.0.13 (by AlanE)
    newfile is a program for creating starter files, or trees of files, by processing templates with a C-preprocessor-like syntax.

    new

    Interceptor 0.9 (by Christophe Gros)
    Syslog is a almost standard UN*X daemon which gathers all the info, errors or critical messages from the local computer or other host

    help2man 1.36.4 (by Brendan O'Dea)
    help2man is a tool for automatically generating simple manual pages from program output


    Other software in this category

    MozillaTranslator 5.13 (by Henrik Lynggaard)
    MozillaTranslator (the program) is for localizator//translators that want to localize Mozilla or another XUL based application.

    Wh

    Hunky Fonts 0.3 (by Ariszlo)

    rxvt-unicode 8.1 (by Marc A. Lehmann)
    rxvt-unicode is a clone of the well known terminal emulator rxvt, modified to store text in Unicode (either UCS-2 or UCS-4) and to us

    StarDict 2.4.8 (by Hu Zheng)

    gucharmap 1.7.0 (by Noah)
    gucharmap is a Unicode Character Map and Font Viewer

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags