diff --git a/Makefile.bundle.in b/Makefile.bundle.in index 969b2ebcf0..4366cf10a1 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -84,7 +84,7 @@ endif $(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/" ifdef MENU_DIR $(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/" - $(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop" + $(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | LC_ALL=C $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop" $(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install" endif ifeq ($(TTD), openttd.exe) diff --git a/Makefile.src.in b/Makefile.src.in index 1d654d283f..0e190a4e62 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -210,7 +210,7 @@ endif { \ print $$0 \ } \ - ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | $(SORT) > Makefile.dep + ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | LC_ALL=C $(SORT) > Makefile.dep $(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak diff --git a/config.lib b/config.lib index a8c6e129c0..0259739eb4 100644 --- a/config.lib +++ b/config.lib @@ -1490,7 +1490,7 @@ make_cflags_and_ldflags() { fi if [ $enable_debug -le 2 ]; then - cc_host_is_gcc=`basename "$cc_host" | grep "gcc" &>/dev/null` + cc_host_is_gcc=`basename "$cc_host" | grep "gcc" 2>/dev/null` if [ -n "$cc_host_is_gcc" ]; then # Define only when compiling with GCC. Some GLIBC versions use GNU # extensions in a way that breaks build with at least ICC. @@ -1498,7 +1498,7 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" fi - cc_build_is_gcc=`basename "$cc_build" | grep "gcc" &>/dev/null` + cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null` if [ -n "$cc_build_is_gcc" ]; then # Just add -O1 to the tools needed for building. CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1" diff --git a/configure b/configure index 6b2c9d87b7..5edbca1867 100755 --- a/configure +++ b/configure @@ -149,7 +149,7 @@ AWKCOMMAND=' # Read the source.list and process it # Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations -SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`" +SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`" OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`" OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`" diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp index 67b299bcec..540975fb5c 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp @@ -119,10 +119,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v) const SQChar *sErr = 0; if(sq_gettop(v)>=1) { if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) { - pf(v,"\nAN ERROR HAS OCCURED [%s]\n",sErr); + pf(v,"\nAN ERROR HAS OCCURRED [%s]\n",sErr); } else{ - pf(v,"\nAN ERROR HAS OCCURED [unknown]\n"); + pf(v,"\nAN ERROR HAS OCCURRED [unknown]\n"); } sqstd_printcallstack(v); } diff --git a/src/3rdparty/squirrel/squirrel/sqdebug.cpp b/src/3rdparty/squirrel/squirrel/sqdebug.cpp index 74272e432a..b163fae52e 100644 --- a/src/3rdparty/squirrel/squirrel/sqdebug.cpp +++ b/src/3rdparty/squirrel/squirrel/sqdebug.cpp @@ -105,7 +105,7 @@ void SQVM::Raise_IdxError(const SQObject &o) void SQVM::Raise_CompareError(const SQObject &o1, const SQObject &o2) { SQObjectPtr oval1 = PrintObjVal(o1), oval2 = PrintObjVal(o2); - Raise_Error("comparsion between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2)); + Raise_Error("comparison between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2)); } diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 5bb8c7e319..9c6e3f334c 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -603,7 +603,7 @@ TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID str /** * Update vehicle loading indicators. * @param te_id TextEffectID to be updated. - * @param string String wich is printed. + * @param string String which is printed. */ void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID string) { diff --git a/src/newgrf.cpp b/src/newgrf.cpp index b9c1bf89e3..6624e2bfdf 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3010,7 +3010,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, B } if (sid + numinfo - ORIGINAL_SAMPLE_COUNT > _cur.grffile->num_sounds) { - grfmsg(1, "SoundEffectChangeInfo: Attemting to change undefined sound effect (%u), max (%u). Ignoring.", sid + numinfo, ORIGINAL_SAMPLE_COUNT + _cur.grffile->num_sounds); + grfmsg(1, "SoundEffectChangeInfo: Attempting to change undefined sound effect (%u), max (%u). Ignoring.", sid + numinfo, ORIGINAL_SAMPLE_COUNT + _cur.grffile->num_sounds); return CIR_INVALID_ID; } diff --git a/src/story.cpp b/src/story.cpp index b74842f41a..602dc27248 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -101,7 +101,7 @@ static void UpdateElement(StoryPageElement &pe, TileIndex tile, uint32 reference * @param p1 various bitstuffed elements * - p1 = (bit 0 - 7) - Company for which this story page belongs to. * @param p2 unused. - * @param text Title of the story page. Null is allowed in wich case a generic page title is provided by OpenTTD. + * @param text Title of the story page. Null is allowed in which case a generic page title is provided by OpenTTD. * @return the cost of this operation or an error */ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)