diff -p -up ./libs/graphite-engine/src/segment/GrEngine.cpp.orig2 ./libs/graphite-engine/src/segment/GrEngine.cpp --- ./libs/graphite-engine/src/segment/GrEngine.cpp.orig2 2009-02-04 07:00:14.000000000 -0500 +++ ./libs/graphite-engine/src/segment/GrEngine.cpp 2009-02-04 07:00:32.000000000 -0500 @@ -16,6 +16,7 @@ Description: Contains the implementation //:>******************************************************************************************** #include "Main.h" #include <functional> +#include <string.h> #ifdef _MSC_VER #pragma hdrstop #endif diff -p -up ./libs/graphite-engine/src/font/TtfUtil.cpp.orig2 ./libs/graphite-engine/src/font/TtfUtil.cpp --- ./libs/graphite-engine/src/font/TtfUtil.cpp.orig2 2009-02-04 07:06:20.000000000 -0500 +++ ./libs/graphite-engine/src/font/TtfUtil.cpp 2009-02-04 07:06:54.000000000 -0500 @@ -21,6 +21,8 @@ Description: #include <cassert> #include <cstddef> #include <stdexcept> +#include <string.h> +#include <limits.h> // Platform headers // Module headers #include "TtfUtil.h" @@ -758,12 +760,12 @@ void SwapWString(void * pWStr, size_t nS uint16 * pStr = reinterpret_cast<uint16 *>(pWStr); uint16 * const pStrEnd = pStr + (nSize == 0 ? gr::utf16len(pStr) : nSize); - std::transform(pStr, pStrEnd, pStr, read<uint16>); +// std::transform(pStr, pStrEnd, pStr, read<uint16>); -// for (int i = 0; i < nSize; i++) -// { // swap the wide characters in the string -// pStr[i] = gr::utf16(read(uint16(pStr[i]))); -// } + for (int i = 0; i < nSize; i++) + { // swap the wide characters in the string + pStr[i] = gr::utf16(read(uint16(pStr[i]))); + } } /*---------------------------------------------------------------------------------------------- diff -p -up ./libs/graphite-engine/src/segment/GrFeature.cpp.orig2 ./libs/graphite-engine/src/segment/GrFeature.cpp --- ./libs/graphite-engine/src/segment/GrFeature.cpp.orig2 2009-02-04 07:11:17.000000000 -0500 +++ ./libs/graphite-engine/src/segment/GrFeature.cpp 2009-02-04 07:11:38.000000000 -0500 @@ -15,6 +15,7 @@ Description: //:>******************************************************************************************** //:> Include files //:>******************************************************************************************** +#include <string.h> #include "Main.h" #ifdef _MSC_VER diff -p -up ./libs/graphite-engine/src/segment/GrFSM.cpp.orig2 ./libs/graphite-engine/src/segment/GrFSM.cpp --- ./libs/graphite-engine/src/segment/GrFSM.cpp.orig2 2009-02-04 07:17:01.000000000 -0500 +++ ./libs/graphite-engine/src/segment/GrFSM.cpp 2009-02-04 07:17:16.000000000 -0500 @@ -15,6 +15,7 @@ Description: //:>******************************************************************************************** //:> Include files //:>******************************************************************************************** +#include <string.h> #include "Main.h" #ifdef _MSC_VER #pragma hdrstop diff -p -up ./libs/graphite-engine/test/RegressionTest/RtTextSrc.h.orig2 ./libs/graphite-engine/test/RegressionTest/RtTextSrc.h --- ./libs/graphite-engine/test/RegressionTest/RtTextSrc.h.orig2 2009-02-04 07:27:40.000000000 -0500 +++ ./libs/graphite-engine/test/RegressionTest/RtTextSrc.h 2009-02-04 07:28:02.000000000 -0500 @@ -11,6 +11,7 @@ Last reviewed: Not yet. Description: -------------------------------------------------------------------------------*//*:End Ignore*/ +#include <string.h> #pragma once #ifndef RTTXTSRC_INCLUDED #define RTTXTSRC_INCLUDED diff -p -up ./libs/icu-xetex/tools/ctestfw/uperf.cpp.orig2 ./libs/icu-xetex/tools/ctestfw/uperf.cpp --- ./libs/icu-xetex/tools/ctestfw/uperf.cpp.orig2 2009-02-04 07:45:11.000000000 -0500 +++ ./libs/icu-xetex/tools/ctestfw/uperf.cpp 2009-02-04 07:51:30.000000000 -0500 @@ -432,7 +432,7 @@ void UPerfTest::usage( void ) this->runIndexedTest( index, FALSE, name ); if (!name) break; - fprintf(stdout,name); + fprintf(stdout,"%s",name); fprintf(stdout,"\n"); index++; }while (name && (name[0] != 0)); diff -p -up ./texk/web2c/cwebdir/common.w.orig2 ./texk/web2c/cwebdir/common.w --- ./texk/web2c/cwebdir/common.w.orig2 2009-02-04 08:08:46.000000000 -0500 +++ ./texk/web2c/cwebdir/common.w 2009-02-04 08:09:15.000000000 -0500 @@ -1180,7 +1180,7 @@ concatenated to print the final error me fatal(s,t) char *s,*t; { - if (*s) printf(s); + if (*s) printf("%s", s); err_print(t); history=fatal_message; exit(wrap_up()); } diff -p -up ./texk/web2c/cwebboot.c.orig2 ./texk/web2c/cwebboot.c --- ./texk/web2c/cwebboot.c.orig2 2009-02-04 08:44:36.000000000 -0500 +++ ./texk/web2c/cwebboot.c 2009-02-04 08:45:00.000000000 -0500 @@ -1113,7 +1113,7 @@ void fatal P2C(char*,s,char*,t) #line 1182 "./cwebdir/common.w" { -if(*s)printf(s); +if(*s)printf("%s", s); err_print(t); history= fatal_message;exit(wrap_up()); } diff -p -up ./texk/web2c/cwebdir/cweave.w.orig ./texk/web2c/cwebdir/cweave.w --- ./texk/web2c/cwebdir/cweave.w.orig 2009-02-04 08:56:20.000000000 -0500 +++ ./texk/web2c/cwebdir/cweave.w 2009-02-04 08:57:04.000000000 -0500 @@ -1784,7 +1784,7 @@ void print_cat(c) /* symbolic printout of a category */ eight_bits c; { - printf(cat_name[c]); + printf("%s", cat_name[c]); } @ The token lists for translated \TEX/ output contain some special control diff -p -up ./texk/web2c/tiedir/tie-w2c.ch.orig2 ./texk/web2c/tiedir/tie-w2c.ch --- ./texk/web2c/tiedir/tie-w2c.ch.orig2 2009-02-05 09:55:30.000000000 -0200 +++ ./texk/web2c/tiedir/tie-w2c.ch 2009-02-05 09:56:05.000000000 -0200 @@ -104,6 +104,6 @@ int main P2C(int, argc, string *, argv) print_ln(copyright); /* include the copyright notice */ @y print(banner); /* print a ``banner line'' */ - print_ln(versionstring); /* Web2C version */ + fprintf(stdout, "%s", versionstring); /* Web2C version */ print_ln(copyright); /* include the copyright notice */ @z diff -p -up ./texk/web2c/pdftexdir/subfont.c.orig9 ./texk/web2c/pdftexdir/subfont.c --- ./texk/web2c/pdftexdir/subfont.c.orig9 2009-02-05 11:25:54.000000000 -0200 +++ ./texk/web2c/pdftexdir/subfont.c 2009-02-05 11:26:10.000000000 -0200 @@ -126,7 +126,7 @@ static sfd_entry *read_sfd(char *sfd_nam return NULL; } tex_printf("{"); - tex_printf(cur_file_name); + tex_printf("%s", cur_file_name); sfd = new_sfd_entry(); sfd->name = xstrdup(sfd_name); while (!sfd_eof()) { diff -p -up ./texk/web2c/omegafonts/error_routines.c.orig11 ./texk/web2c/omegafonts/error_routines.c --- ./texk/web2c/omegafonts/error_routines.c.orig11 2009-02-06 11:02:28.000000000 -0200 +++ ./texk/web2c/omegafonts/error_routines.c 2009-02-06 11:05:47.000000000 -0200 @@ -35,7 +35,7 @@ void lex_error_0(string fmt) { fprintf(stderr, "line %d (lexing): ", line_number); - fprintf(stderr, fmt); + fprintf(stderr, "%s", fmt); fprintf(stderr, "\n"); } @@ -67,7 +67,7 @@ void yyerror(string fmt) { fprintf(stderr, "line %d (parsing): ", line_number); - fprintf(stderr, fmt); + fprintf(stderr, "%s", fmt); fprintf(stderr, "\n"); } @@ -76,7 +76,7 @@ void warning_0(string fmt) { fprintf(stderr, "line %d (warning): ", line_number); - fprintf(stderr, fmt); + fprintf(stderr, "%s", fmt); fprintf(stderr, "\n"); } @@ -124,7 +124,7 @@ void fatal_error_0(string fmt) { fprintf(stderr, "line %d (fatal): ", line_number); - fprintf(stderr, fmt); + fprintf(stderr, "%s", fmt); fprintf(stderr, "\n"); exit(1); } @@ -160,7 +160,7 @@ void internal_error_0(string fmt) { fprintf(stderr, "line %d (internal): ", line_number); - fprintf(stderr, fmt); + fprintf(stderr, "%s", fmt); fprintf(stderr, "\n"); exit(2); } diff -p -up ./texk/web2c/omegafonts/out_routines.c.orig12 ./texk/web2c/omegafonts/out_routines.c --- ./texk/web2c/omegafonts/out_routines.c.orig12 2009-02-06 11:08:23.000000000 -0200 +++ ./texk/web2c/omegafonts/out_routines.c 2009-02-06 11:08:41.000000000 -0200 @@ -377,5 +377,5 @@ out_digits(unsigned counter) void out(string sval) { - fprintf(file_output, sval); + fprintf(file_output, "%s", sval); } diff -p -up ./texk/devnag/src/devnag.c.orig13 ./texk/devnag/src/devnag.c --- ./texk/devnag/src/devnag.c.orig13 2009-02-06 11:10:55.000000000 -0200 +++ ./texk/devnag/src/devnag.c 2009-02-06 11:11:20.000000000 -0200 @@ -2380,7 +2380,7 @@ void put_macro(short macro) { void err_ill(char *str) { printf("Error: illegal character(s) \"%s\" detected at line %d:\n", str, linenumber); - printf(inbuf); + printf("%s", inbuf); exit(1); } diff -p -up ./texk/dvidvi/dvidvi.c.orig14 ./texk/dvidvi/dvidvi.c --- ./texk/dvidvi/dvidvi.c.orig14 2009-02-06 11:12:28.000000000 -0200 +++ ./texk/dvidvi/dvidvi.c 2009-02-06 11:13:34.000000000 -0200 @@ -337,7 +337,7 @@ integer p,n; * Print a usage error messsage, and quit. */ void usage() { - (void)fprintf(stderr,banner); + (void)fprintf(stderr, "%s", banner); (void)fprintf(stderr,"Usage: dvidvi [options] input[.dvi] [output]\n"); (void)fprintf(stderr,"where options are:\n"); (void)fprintf(stderr," [-f n] first page printed [-l n] last page printed\n"); @@ -842,7 +842,7 @@ default: } /* else argument with '-' */ } /* for */ if (*iname == 0) { - (void)fprintf(stderr, banner) ; + (void)fprintf(stderr, "%s", banner) ; error("! no input file specified"); } /* Inserted by djc@dsmail.hmi.de 3.8.1994 */ @@ -853,7 +853,7 @@ default: } if (*oname != 0 && !quiet) { - (void)fprintf(stderr, banner) ; + (void)fprintf(stderr, "%s", banner) ; (void)fprintf(stderr, "%s -> %s\n",iname,oname); temp = nextstring ; } diff -p -up ./texk/dvipdfm/type1.c.orig16 ./texk/dvipdfm/type1.c --- ./texk/dvipdfm/type1.c.orig16 2009-02-06 11:19:29.000000000 -0200 +++ ./texk/dvipdfm/type1.c 2009-02-06 11:19:57.000000000 -0200 @@ -495,7 +495,7 @@ static unsigned char *get_pfb_segment (u if (ch != 128){ sprintf (work_buffer, "get_pfb_segment: Not a pfb file.\n"); sprintf (work_buffer, "get_pfb_segment: pfb header has %d, expecting 128\n", ch); - ERROR (work_buffer); + // ERROR (work_buffer); } if ((stream_type = fgetc (file)) < 0 || stream_type != expected_type) { seek_relative (file, -2); /* Backup up two (yuck!) */ diff -p -up ./texk/xdvik/gui/message-window.c.orig16 ./texk/xdvik/gui/message-window.c --- ./texk/xdvik/gui/message-window.c.orig16 2009-02-06 11:25:25.000000000 -0200 +++ ./texk/xdvik/gui/message-window.c 2009-02-06 11:26:26.000000000 -0200 @@ -717,7 +717,7 @@ internal_popup_window(Widget parent, Widget ret; ASSERT(type < (sizeof my_msg_map / sizeof my_msg_map[0]), "too few elements in my_msg_map"); - sprintf(win_title, my_msg_map[type].window_title); + sprintf(win_title, "%s", my_msg_map[type].window_title); #if DEBUG fprintf(stderr, "internal_popup_window called with prompt: \"%s\"\n", msg_buf); @@ -729,11 +729,11 @@ internal_popup_window(Widget parent, supposed to be printf-format strings (i.e. with doubled `%' to escape them) */ fprintf(stderr, "\n%s:\n", my_msg_map[type].window_title); - fprintf(stderr, msg_buf); + fprintf(stderr, "%s", msg_buf); fprintf(stderr, "\n"); if (helptext) { fprintf(stderr, "---------- helptext ----------\n"); - fprintf(stderr, helptext); + fprintf(stderr, "%s", helptext); fprintf(stderr, "\n---------- end of helptext ----------\n"); } return NULL; @@ -745,7 +745,7 @@ internal_popup_window(Widget parent, if (my_popup_num == MAX_POPUPS) { /* already enough popups on screen, just dump it to stderr */ fprintf(stderr, "%s:\n", win_title); - fprintf(stderr, msg_buf); + fprintf(stderr, "%s", msg_buf); /* Note: If a mad function continues to open popups, this will * stop after MAX_POPUPS, but open a new window for each * window the user pops down. Maybe we ought to do something diff -p -up ./texk/dvipdfm/error.h.orig004 ./texk/dvipdfm/error.h --- ./texk/dvipdfm/error.h.orig004 2009-02-06 13:15:01.000000000 -0500 +++ ./texk/dvipdfm/error.h 2009-02-06 13:15:12.000000000 -0500 @@ -35,7 +35,7 @@ extern void error_cleanup(); #define ERROR(string) { \ fprintf(stderr, "\n"); \ - fprintf (stderr, string); \ + fprintf (stderr, "%s", string); \ fprintf (stderr, "\n"); \ error_cleanup(); \ exit(1);} diff -p -up ./texk/ps2pkm/objects.h.orig006 ./texk/ps2pkm/objects.h --- ./texk/ps2pkm/objects.h.orig006 2009-02-06 13:22:39.000000000 -0500 +++ ./texk/ps2pkm/objects.h 2009-02-06 13:23:07.000000000 -0500 @@ -236,7 +236,7 @@ struct xobject { /*SHARED*/ /* NDW: personally, I want to see status and error messages! */ #define IfTrace0(condition,model) \ - {if (condition) printf(model);} + {if (condition) printf("%s", model);} #define IfTrace1(condition,model,arg0) \ {if (condition) printf(model,arg0);} #define IfTrace2(condition,model,arg0,arg1) \