From: pjrm Date: Thu, 11 Oct 2007 13:53:11 +0000 (+0000) Subject: dom/prop-svg.cpp: Exit non-zero if any I/O errors. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=301340633e3a3f0de4b6bd6b6288df5b862d114d;p=inkscape.git dom/prop-svg.cpp: Exit non-zero if any I/O errors. noop: Address some char* string literal warnings from g++-4.2. --- diff --git a/src/dom/prop-svg.cpp b/src/dom/prop-svg.cpp index bde6d1993..6ae96e7a4 100644 --- a/src/dom/prop-svg.cpp +++ b/src/dom/prop-svg.cpp @@ -27,18 +27,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include - +#include struct SvgProp_def { - char *name; - char *values; - char *defaultValue; - char *appliesTo; + char const *name; + char const *values; + char const *defaultValue; + char const *appliesTo; bool inherited; - char *percentages; - char *mediaGroups; + char const *percentages; + char const *mediaGroups; bool animatable; }; @@ -710,10 +710,10 @@ false }; -bool printTable() +static void +printTable() { - for (SvgProp *prop=svgProps; prop->name ; prop++) - { + for (SvgProp const *prop = svgProps; prop->name; prop++) { printf("#### Prop: %s ####\n", prop->name); printf("values : %s\n", prop->values); printf("defaultValue: %s\n", prop->defaultValue); @@ -723,13 +723,24 @@ bool printTable() printf("groups : %s\n", prop->mediaGroups); printf("animatable : %s\n", ( prop->animatable ? "true" : "false" )); printf("\n"); - } - return true; + } } int main(int argc, char **argv) { printTable(); - return 0; + return ( ferror(stdout) ? EXIT_FAILURE : EXIT_SUCCESS ); } + + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :