1
0
mirror of https://git.zap.org.au/git/trader.git synced 2025-02-02 15:08:13 -05:00

Merge branch master into with-autogenerated

This commit is contained in:
John Zaitseff 2014-05-24 07:59:12 +10:00
commit 2ee480fa18
56 changed files with 6460 additions and 719 deletions

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

12
INSTALL
View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************
@ -48,7 +48,7 @@ and installation:
systems, these files are part of XXX-dev packages. systems, these files are part of XXX-dev packages.
6. The GNU Perfect Hash Function Generator, gperf. This utility program 6. The GNU Perfect Hash Function Generator, gperf. This utility program
is required for parts of the GNU Portability Library. may be required for parts of the GNU Portability Library.
Installation Installation
@ -102,12 +102,12 @@ You can also run configure in a separate build-only directory tree. This
feature requires GNU Make and allows you to keep the source code tree from feature requires GNU Make and allows you to keep the source code tree from
being modified by the compilation process. To use this option, create a being modified by the compilation process. To use this option, create a
separate build directory, then run configure. For example, if you placed separate build directory, then run configure. For example, if you placed
the Star Traders source code tree in $HOME/src/trader-7.4, you could run the Star Traders source code tree in $HOME/src/trader-7.5, you could run
something like: something like:
mkdir $HOME/build/trader-build-7.4 mkdir $HOME/build/trader-build-7.5
cd $HOME/build/trader-build-7.4 cd $HOME/build/trader-build-7.5
$HOME/src/trader-7.4/configure $HOME/src/trader-7.5/configure
Once again, the Autoconf manual describes these options (and many others): Once again, the Autoconf manual describes these options (and many others):

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################

19
NEWS
View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************
@ -15,6 +15,23 @@ consult the Subversion repository for "trader" on The ZAP Group web server
at http://www.zap.org.au/services/svn/. at http://www.zap.org.au/services/svn/.
Version 7.5 (24th May, 2014)
----------------------------
Rewrote the file input and output routines so that saved games are now
stored in a much more reliable (scrambled) ASCII format. However, saved
games from older versions will no longer load: the workaround is to start
the older version of Star Traders with the "--dont-encrypt" command line
option, load the relevant game and save it again straight away, change the
second line in the game file from "File API 7.2" to "File API 7.5", then
run the new version of Star Traders.
Added translations for Norwegian Bokmål, Danish and Esperanto (in that
order), with thanks to Johnny A. Solbu, Joe Hansen and Felipe Castro.
Updated auxiliary files to the latest versions available from the Gnulib
GNU Portability Library and the GNU Autoconf project.
Version 7.4 (9th May, 2012) Version 7.4 (9th May, 2012)
--------------------------- ---------------------------

4
README
View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************
@ -67,7 +67,7 @@ welcomed! Please send these to:
Copyright Copyright
========= =========
Copyright (C) 1990-2012, John Zaitseff. Copyright (C) 1990-2014, John Zaitseff.
Star Traders is free software that is distributed under the terms of the Star Traders is free software that is distributed under the terms of the
GNU General Public License. You can redistribute it and/or modify it GNU General Public License. You can redistribute it and/or modify it

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

View File

@ -1,7 +1,7 @@
dnl ********************************************************************* dnl *********************************************************************
dnl * * dnl * *
dnl * Star Traders: A Game of Interstellar Trading * dnl * Star Traders: A Game of Interstellar Trading *
dnl * Copyright (C) 1990-2012, John Zaitseff * dnl * Copyright (C) 1990-2014, John Zaitseff *
dnl * * dnl * *
dnl ********************************************************************* dnl *********************************************************************
dnl dnl
@ -26,7 +26,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see http://www.gnu.org/licenses/. dnl along with this program. If not, see http://www.gnu.org/licenses/.
AC_INIT([Star Traders], [7.4], [J.Zaitseff@zap.org.au], [trader], [http://www.zap.org.au/software/trader/]) AC_INIT([Star Traders], [7.5], [J.Zaitseff@zap.org.au], [trader], [http://www.zap.org.au/software/trader/])
AC_DEFINE([PACKAGE_AUTHOR], ["John Zaitseff"], [Package author]) AC_DEFINE([PACKAGE_AUTHOR], ["John Zaitseff"], [Package author])
AC_PREREQ([2.67]) AC_PREREQ([2.67])

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

View File

@ -1,7 +1,7 @@
.\" ********************************************************************* .\" *********************************************************************
.\" * * .\" * *
.\" * Star Traders: A Game of Interstellar Trading * .\" * Star Traders: A Game of Interstellar Trading *
.\" * Copyright (C) 1990-2012, John Zaitseff * .\" * Copyright (C) 1990-2014, John Zaitseff *
.\" * * .\" * *
.\" ********************************************************************* .\" *********************************************************************
.\" .\"
@ -41,7 +41,7 @@
.if \n[.g] .mso www.tmac .if \n[.g] .mso www.tmac
.\" .\"
.\" ********************************************************************* .\" *********************************************************************
.TH TRADER 6 "16th March, 2012" "Unix-like systems" .TH TRADER 6 "24th May, 2014" "Unix-like systems"
.SH NAME .SH NAME
trader \- a game of interstellar trading trader \- a game of interstellar trading
.\" ********************************************************************* .\" *********************************************************************
@ -200,7 +200,7 @@ Australia
.PP .PP
.\" ********************************************************************* .\" *********************************************************************
.SH COPYRIGHT .SH COPYRIGHT
Copyright \(co 1990\-2012, John Zaitseff. Copyright \(co 1990\-2014, John Zaitseff.
.PP .PP
\fBStar Traders\fR is free software that is distributed under the terms \fBStar Traders\fR is free software that is distributed under the terms
of the GNU General Public License. You can redistribute it and/or modify of the GNU General Public License. You can redistribute it and/or modify

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################
@ -32,5 +32,6 @@ EXTRA_DIST = \
ax_append_flag.m4 \ ax_append_flag.m4 \
ax_cflags_warn_all.m4 \ ax_cflags_warn_all.m4 \
ax_c___attribute__.m4 \ ax_c___attribute__.m4 \
ax_require_defined.m4 \
ax_with_curses.m4 \ ax_with_curses.m4 \
gnulib-cache.m4 gnulib-cache.m4

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************
@ -13,6 +13,7 @@ that project's web site, http://www.gnu.org/software/autoconf-archive/:
ax_append_flag.m4 ax_append_flag.m4
ax_cflags_warn_all.m4 ax_cflags_warn_all.m4
ax_c___attribute__.m4 ax_c___attribute__.m4
ax_require_defined.m4
ax_with_curses.m4 ax_with_curses.m4
The following macro was generated by running the GNU Portability Library The following macro was generated by running the GNU Portability Library

View File

@ -58,7 +58,7 @@
# modified version of the Autoconf Macro, you may extend this special # modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well. # exception to the GPL to apply to your modified version as well.
#serial 13 #serial 15
AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
@ -84,6 +84,7 @@ done
FLAGS="$ac_save_[]FLAGS" FLAGS="$ac_save_[]FLAGS"
]) ])
AS_VAR_POPDEF([FLAGS])dnl AS_VAR_POPDEF([FLAGS])dnl
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
case ".$VAR" in case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;; .ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;; .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;

37
m4/ax_require_defined.m4 Normal file
View File

@ -0,0 +1,37 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_REQUIRE_DEFINED(MACRO)
#
# DESCRIPTION
#
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
# been defined and thus are available for use. This avoids random issues
# where a macro isn't expanded. Instead the configure script emits a
# non-fatal:
#
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
#
# It's like AC_REQUIRE except it doesn't expand the required macro.
#
# Here's an example:
#
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
#
# LICENSE
#
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED

View File

@ -88,7 +88,7 @@
# #
# AX_WITH_CURSES # AX_WITH_CURSES
# if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then # if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
# AX_MSG_ERROR([requires either NcursesW or Ncurses library]) # AC_MSG_ERROR([requires either NcursesW or Ncurses library])
# fi # fi
# #
# If any Curses library will do (but one must be present and must support # If any Curses library will do (but one must be present and must support
@ -182,7 +182,7 @@
# modified version of the Autoconf Macro, you may extend this special # modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well. # exception to the GPL to apply to your modified version as well.
#serial 13 #serial 15
AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES]) AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
AC_DEFUN([AX_WITH_CURSES], [ AC_DEFUN([AX_WITH_CURSES], [

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002-2012 Free Software Foundation, Inc. # Copyright (C) 2002-2014 Free Software Foundation, Inc.
# #
# This file is free software; you can redistribute it and/or modify # This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -27,7 +27,7 @@
# Specification in the form of a command-line invocation: # Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl assert btowc config-h getopt-gnu gettext gettext-h gettimeofday locale mbrtowc mbsrtowcs stdbool stdio striconv string strstr sys_stat sys_time unistd wchar wcrtomb wcsdup wctob wctype-h # gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl assert btowc config-h crc getopt-gnu gettext gettext-h gettimeofday locale mbrtowc mbsrtowcs stdbool stdio striconv string strstr sys_stat sys_time unistd wchar wcrtomb wcsdup wctob wctype-h
# Specification in the form of a few gnulib-tool.m4 macro invocations: # Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([]) gl_LOCAL_DIR([])
@ -35,6 +35,7 @@ gl_MODULES([
assert assert
btowc btowc
config-h config-h
crc
getopt-gnu getopt-gnu
gettext gettext
gettext-h gettext-h
@ -66,4 +67,4 @@ gl_LIB([libgnu])
gl_MAKEFILE_NAME([]) gl_MAKEFILE_NAME([])
gl_MACRO_PREFIX([gl]) gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([]) gl_PO_DOMAIN([])
gl_WITNESS_C_DOMAIN([]) gl_WITNESS_C_MACRO([])

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################
@ -32,8 +32,11 @@ en_CA
en_GB en_GB
en_US en_US
da
de de
eo
fi fi
fr fr
hr hr
nb
ru ru

View File

@ -8,13 +8,14 @@
# Please note that the actual code of GNU gettext is covered by the GNU # Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain. # General Public License and is *not* in the public domain.
# #
# Origin: gettext-0.18 # Origin: gettext-0.18.3
GETTEXT_MACRO_VERSION = 0.18 GETTEXT_MACRO_VERSION = 0.18
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
VERSION = @VERSION@ VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SED = @SED@
SHELL = /bin/sh SHELL = /bin/sh
@SET_MAKE@ @SET_MAKE@
@ -96,14 +97,14 @@ CATALOGS = @CATALOGS@
mv t-$@ $@ mv t-$@ $@
all: check-macro-version all-@USE_NLS@ all: all-@USE_NLS@
all-yes: stamp-po all-yes: stamp-po
all-no: all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync. # Ensure that the gettext macros and this Makefile.in.in are in sync.
check-macro-version: CHECK_MACRO_VERSION = \
@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
exit 1; \ exit 1; \
} }
@ -123,6 +124,7 @@ check-macro-version:
# $(POFILES) has been designed to not touch files that don't need to be # $(POFILES) has been designed to not touch files that don't need to be
# changed. # changed.
stamp-po: $(srcdir)/$(DOMAIN).pot stamp-po: $(srcdir)/$(DOMAIN).pot
@$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \ test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
@ -137,8 +139,16 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
else \
LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
fi; \
} | grep -v 'libtool:' >/dev/null; then \
package_gnu='GNU '; \ package_gnu='GNU '; \
else \ else \
package_gnu=''; \ package_gnu=''; \

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################
@ -26,14 +26,14 @@
# along with this program. If not, see http://www.gnu.org/licenses/. # along with this program. If not, see http://www.gnu.org/licenses/.
# The message domain is the same as the package name # The message domain is the same as the package name.
DOMAIN = $(PACKAGE) DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory # These two variables depend on the location of this directory.
subdir = po subdir = po
top_builddir = .. top_builddir = ..
# These options get passed to xgettext # These options get passed to xgettext.
XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --width=132 \ XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --width=132 \
--flag='err_exit:1:c-format' --flag='errno_exit:1:c-format' \ --flag='err_exit:1:c-format' --flag='errno_exit:1:c-format' \
--flag='txdlgbox:11:c-format' --flag='txdlgbox:12:c-format' \ --flag='txdlgbox:11:c-format' --flag='txdlgbox:12:c-format' \
@ -42,20 +42,26 @@ XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --width=132 \
--flag='center:8:c-format' \ --flag='center:8:c-format' \
--flag='right:8:c-format' --flag='right:8:c-format'
# These options get passed to msgmerge # This is the copyright holder that gets inserted into the header of the
MSGMERGE_OPTIONS = --width=132
# Copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. # $(DOMAIN).pot file.
COPYRIGHT_HOLDER = John Zaitseff COPYRIGHT_HOLDER = John Zaitseff
# E-mail address or URL used by translators to report bugs in the # This is the email address or URL to which the translators shall report
# untranslated (original) strings # bugs in the untranslated strings.
MSGID_BUGS_ADDRESS = J.Zaitseff@zap.org.au MSGID_BUGS_ADDRESS = J.Zaitseff@zap.org.au
# List of locale categories, beyond LC_MESSAGES, for which the message # This is the list of locale categories, beyond LC_MESSAGES, for which the
# catalogs shall be used. It is usually empty. # message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES = EXTRA_LOCALE_CATEGORIES =
# Additional files to distribute # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = yes
# These options get passed to msgmerge.
MSGMERGE_OPTIONS = --width=132
# Additional files to distribute.
DISTFILES += README DISTFILES += README

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

View File

@ -14,13 +14,13 @@ en@boldquot.po-update: en@boldquot.po-update-en
.insert-header.po-update-en: .insert-header.po-update-en:
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
tmpdir=`pwd`; \ tmpdir=`pwd`; \
echo "$$lang:"; \ echo "$$lang:"; \
ll=`echo $$lang | sed -e 's/@.*//'`; \ ll=`echo $$lang | sed -e 's/@.*//'`; \
LC_ALL=C; export LC_ALL; \ LC_ALL=C; export LC_ALL; \
cd $(srcdir); \ cd $(srcdir); \
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \ rm -f $$tmpdir/$$lang.new.po; \
else \ else \

1725
po/da.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * German Translations for Star Traders * # * German Translations for Star Traders *
# * Copyright (C) 2012, John Zaitseff * # * Copyright (C) 2012-14, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
@ -12,10 +12,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:07+1000\n" "PO-Revision-Date: 2014-05-22 10:57+1000\n"
"Last-Translator: Philipp Thomas <pth@suse.de>\n" "Last-Translator: Philipp Thomas <pth@suse.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n" "Language: de\n"
@ -1123,52 +1123,57 @@ msgstr[1] ""
"%ls hat ^{%'ld^}\n" "%ls hat ^{%'ld^}\n"
"weitere Aktien ausgegeben." "weitere Aktien ausgegeben."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: in Zeile %d fehlt ein Feld" msgstr "%s: in Zeile %d fehlt ein Feld"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: unzulässiges Feld in Zeile %d"
#: src/fileio.c:51
#, c-format #, c-format
msgid "%s: illegal field on line %d: `%s'" msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: unzulässiges Feld in Zeile %d: „%s“" msgstr "%s: unzulässiges Feld in Zeile %d: „%s“"
#: src/fileio.c:64 #: src/fileio.c:55
#, c-format #, c-format
msgid "%s: illegal value on line %d: `%s'" msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: unzulässiger Wert in Zeile %d: „%s“" msgstr "%s: unzulässiger Wert in Zeile %d: „%s“"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393 #: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format #, c-format
msgid "%s: illegal value on line %d" msgid "%s: illegal value on line %d"
msgstr "%s: unzulässiger Wert in Zeile %d" msgstr "%s: unzulässiger Wert in Zeile %d"
#: src/fileio.c:103 #: src/fileio.c:98
#, c-format #, c-format
msgid "%s: illegal characters on line %d" msgid "%s: illegal characters on line %d"
msgstr "%s: unzulässiges Zeichen in Zeile %d" msgstr "%s: unzulässiges Zeichen in Zeile %d"
#: src/fileio.c:184 #: src/fileio.c:183
#, c-format #, c-format
msgid "%s: could not convert string" msgid "%s: could not convert string"
msgstr "%s: die Zeichenkette konnte nicht umgewandelt werden" msgstr "%s: die Zeichenkette konnte nicht umgewandelt werden"
#: src/fileio.c:255 #: src/fileio.c:257
#, c-format #, c-format
msgid " Game Not Found " msgid " Game Not Found "
msgstr " Spiel nicht gefunden " msgstr " Spiel nicht gefunden "
#: src/fileio.c:256 #: src/fileio.c:258
#, c-format #, c-format
msgid "Game %d has not been saved to disk." msgid "Game %d has not been saved to disk."
msgstr "Spiel %d wurde nicht abgespeichert." msgstr "Spiel %d wurde nicht abgespeichert."
#: src/fileio.c:263 #: src/fileio.c:265
#, c-format #, c-format
msgid " Game Not Loaded " msgid " Game Not Loaded "
msgstr " Spiel nicht geladen " msgstr " Spiel nicht geladen "
#: src/fileio.c:264 #: src/fileio.c:266
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be loaded from disk.\n" "Game %d could not be loaded from disk.\n"
@ -1179,47 +1184,42 @@ msgstr ""
"\n" "\n"
"^{Spiel %s: %s^}" "^{Spiel %s: %s^}"
#: src/fileio.c:316 #: src/fileio.c:319
#, c-format #, c-format
msgid "%s: missing header in game file" msgid "%s: missing header in game file"
msgstr "%s: Die Spieldatei hat keinen Vorspann" msgstr "%s: Die Spieldatei hat keinen Vorspann"
#: src/fileio.c:319 #: src/fileio.c:322
#, c-format #, c-format
msgid "%s: not a valid game file" msgid "%s: not a valid game file"
msgstr "%s: ist keine gültige Spieldatei" msgstr "%s: ist keine gültige Spieldatei"
#: src/fileio.c:322 src/fileio.c:329 #: src/fileio.c:325 src/fileio.c:332
#, c-format #, c-format
msgid "%s: missing subheader in game file" msgid "%s: missing subheader in game file"
msgstr "%s: In der Spieldatei fehlt ein zusätzlicher Vorspann" msgstr "%s: In der Spieldatei fehlt ein zusätzlicher Vorspann"
#: src/fileio.c:325 #: src/fileio.c:328
#, c-format #, c-format
msgid "%s: saved under a different version of Star Traders" msgid "%s: saved under a different version of Star Traders"
msgstr "%s: wurde unter einer anderen Version von Star Traders gespeichert" msgstr "%s: wurde unter einer anderen Version von Star Traders gespeichert"
#: src/fileio.c:332 #: src/fileio.c:335
#, c-format #, c-format
msgid "%s: saved under an incompatible character encoding" msgid "%s: saved under an incompatible character encoding"
msgstr "%s: unter einer inkompatiblen Zeichenkodierung abgespeichert" msgstr "%s: unter einer inkompatiblen Zeichenkodierung abgespeichert"
#: src/fileio.c:340 #: src/fileio.c:343
#, c-format #, c-format
msgid "%s: illegal or missing field on line %d" msgid "%s: illegal or missing field on line %d"
msgstr "%s: unzulässiges oder fehlendes Feld in Zeile %d" msgstr "%s: unzulässiges oder fehlendes Feld in Zeile %d"
#: src/fileio.c:384 #: src/fileio.c:479 src/fileio.c:501
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: unzulässiges Feld in Zeile %d"
#: src/fileio.c:466 src/fileio.c:487
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Spiel Nicht Gespeichert " msgstr " Spiel Nicht Gespeichert "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1230,7 +1230,7 @@ msgstr ""
"\n" "\n"
"^{Verzeichnis %s: %s^}" "^{Verzeichnis %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1644,31 +1644,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "Kein frier Speicer mehr vorhanden" msgstr "Kein frier Speicer mehr vorhanden"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: „%s“" msgstr "xmbstowcs: „%s“"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: „%lc“" msgstr "xwcrtomb: „%lc“"

View File

@ -1,21 +1,21 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * English (Australian) Translations for Star Traders * # * English (Australian) Translations for Star Traders *
# * Copyright (C) 1990-2012, John Zaitseff * # * Copyright (C) 1990-2014, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
# This file is distributed under the same licence as Star Traders. # This file is distributed under the same licence as Star Traders.
# #
# Contributors: # Contributors:
# John Zaitseff <J.Zaitseff@zap.org.au>, 2011-12. # John Zaitseff <J.Zaitseff@zap.org.au>, 2011-14.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:07+1000\n" "PO-Revision-Date: 2014-05-22 10:57+1000\n"
"Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n" "Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n"
"Language-Team: English (Australian)\n" "Language-Team: English (Australian)\n"
"Language: en_AU\n" "Language: en_AU\n"
@ -1110,103 +1110,103 @@ msgstr[1] ""
"%ls has issued\n" "%ls has issued\n"
"^{%'ld^} more shares." "^{%'ld^} more shares."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: missing field on line %d" msgstr "%s: missing field on line %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:64
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:103
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:184
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:255
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:256
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:263
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:264
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:316
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:319
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:322 src/fileio.c:329
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:325
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:332
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:340
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:384
#, c-format #, c-format
msgid "%s: illegal field on line %d" msgid "%s: illegal field on line %d"
msgstr "%s: illegal field on line %d" msgstr "%s: illegal field on line %d"
#: src/fileio.c:466 src/fileio.c:487 #: src/fileio.c:51
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:55
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:98
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:183
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:257
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:258
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:265
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:266
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:319
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:322
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:325 src/fileio.c:332
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:328
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:335
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:343
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:479 src/fileio.c:501
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Game Not Saved " msgstr " Game Not Saved "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1217,7 +1217,7 @@ msgstr ""
"\n" "\n"
"^{Directory %s: %s^}" "^{Directory %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1629,31 +1629,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "out of memory" msgstr "out of memory"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: %s" msgstr "xmbstowcs: %s"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: %lc" msgstr "xwcrtomb: %lc"

View File

@ -1,21 +1,21 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * English (Canadian) Translations for Star Traders * # * English (Canadian) Translations for Star Traders *
# * Copyright (C) 1990-2012, John Zaitseff * # * Copyright (C) 1990-2014, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
# This file is distributed under the same licence as Star Traders. # This file is distributed under the same licence as Star Traders.
# #
# Contributors: # Contributors:
# John Zaitseff <J.Zaitseff@zap.org.au>, 2011-12. # John Zaitseff <J.Zaitseff@zap.org.au>, 2011-14.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:07+1000\n" "PO-Revision-Date: 2014-05-22 10:58+1000\n"
"Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n" "Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n"
"Language-Team: English (Canadian)\n" "Language-Team: English (Canadian)\n"
"Language: en_CA\n" "Language: en_CA\n"
@ -1110,103 +1110,103 @@ msgstr[1] ""
"%ls has issued\n" "%ls has issued\n"
"^{%'ld^} more shares." "^{%'ld^} more shares."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: missing field on line %d" msgstr "%s: missing field on line %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:64
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:103
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:184
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:255
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:256
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:263
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:264
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:316
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:319
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:322 src/fileio.c:329
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:325
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:332
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:340
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:384
#, c-format #, c-format
msgid "%s: illegal field on line %d" msgid "%s: illegal field on line %d"
msgstr "%s: illegal field on line %d" msgstr "%s: illegal field on line %d"
#: src/fileio.c:466 src/fileio.c:487 #: src/fileio.c:51
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:55
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:98
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:183
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:257
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:258
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:265
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:266
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:319
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:322
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:325 src/fileio.c:332
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:328
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:335
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:343
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:479 src/fileio.c:501
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Game Not Saved " msgstr " Game Not Saved "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1217,7 +1217,7 @@ msgstr ""
"\n" "\n"
"^{Directory %s: %s^}" "^{Directory %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1629,31 +1629,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "out of memory" msgstr "out of memory"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: %s" msgstr "xmbstowcs: %s"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: %lc" msgstr "xwcrtomb: %lc"

View File

@ -1,21 +1,21 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * English (British) Translations for Star Traders * # * English (British) Translations for Star Traders *
# * Copyright (C) 1990-2012, John Zaitseff * # * Copyright (C) 1990-2014, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
# This file is distributed under the same licence as Star Traders. # This file is distributed under the same licence as Star Traders.
# #
# Contributors: # Contributors:
# John Zaitseff <J.Zaitseff@zap.org.au>, 2011-12. # John Zaitseff <J.Zaitseff@zap.org.au>, 2011-14.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:06+1000\n" "PO-Revision-Date: 2014-05-22 10:58+1000\n"
"Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n" "Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n"
"Language-Team: English (British)\n" "Language-Team: English (British)\n"
"Language: en_GB\n" "Language: en_GB\n"
@ -1110,103 +1110,103 @@ msgstr[1] ""
"%ls has issued\n" "%ls has issued\n"
"^{%'ld^} more shares." "^{%'ld^} more shares."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: missing field on line %d" msgstr "%s: missing field on line %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:64
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:103
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:184
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:255
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:256
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:263
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:264
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:316
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:319
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:322 src/fileio.c:329
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:325
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:332
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:340
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:384
#, c-format #, c-format
msgid "%s: illegal field on line %d" msgid "%s: illegal field on line %d"
msgstr "%s: illegal field on line %d" msgstr "%s: illegal field on line %d"
#: src/fileio.c:466 src/fileio.c:487 #: src/fileio.c:51
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:55
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:98
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:183
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:257
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:258
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:265
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:266
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:319
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:322
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:325 src/fileio.c:332
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:328
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:335
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:343
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:479 src/fileio.c:501
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Game Not Saved " msgstr " Game Not Saved "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1217,7 +1217,7 @@ msgstr ""
"\n" "\n"
"^{Directory %s: %s^}" "^{Directory %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1629,31 +1629,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "out of memory" msgstr "out of memory"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: %s" msgstr "xmbstowcs: %s"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: %lc" msgstr "xwcrtomb: %lc"

View File

@ -1,21 +1,21 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * English (US) Translations for Star Traders * # * English (US) Translations for Star Traders *
# * Copyright (C) 1990-2012, John Zaitseff * # * Copyright (C) 1990-2014, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
# This file is distributed under the same licence as Star Traders. # This file is distributed under the same licence as Star Traders.
# #
# Contributors: # Contributors:
# John Zaitseff <J.Zaitseff@zap.org.au>, 2011-12. # John Zaitseff <J.Zaitseff@zap.org.au>, 2011-14.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:06+1000\n" "PO-Revision-Date: 2014-05-22 10:58+1000\n"
"Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n" "Last-Translator: John Zaitseff <J.Zaitseff@zap.org.au>\n"
"Language-Team: English\n" "Language-Team: English\n"
"Language: en_US\n" "Language: en_US\n"
@ -1110,103 +1110,103 @@ msgstr[1] ""
"%ls has issued\n" "%ls has issued\n"
"^{%'ld^} more shares." "^{%'ld^} more shares."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: missing field on line %d" msgstr "%s: missing field on line %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:64
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:103
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:184
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:255
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:256
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:263
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:264
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:316
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:319
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:322 src/fileio.c:329
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:325
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:332
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:340
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:384
#, c-format #, c-format
msgid "%s: illegal field on line %d" msgid "%s: illegal field on line %d"
msgstr "%s: illegal field on line %d" msgstr "%s: illegal field on line %d"
#: src/fileio.c:466 src/fileio.c:487 #: src/fileio.c:51
#, c-format
msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: illegal field on line %d: %s"
#: src/fileio.c:55
#, c-format
msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: illegal value on line %d: %s"
#: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format
msgid "%s: illegal value on line %d"
msgstr "%s: illegal value on line %d"
#: src/fileio.c:98
#, c-format
msgid "%s: illegal characters on line %d"
msgstr "%s: illegal characters on line %d"
#: src/fileio.c:183
#, c-format
msgid "%s: could not convert string"
msgstr "%s: could not convert string"
#: src/fileio.c:257
#, c-format
msgid " Game Not Found "
msgstr " Game Not Found "
#: src/fileio.c:258
#, c-format
msgid "Game %d has not been saved to disk."
msgstr "Game %d has not been saved to disk."
#: src/fileio.c:265
#, c-format
msgid " Game Not Loaded "
msgstr " Game Not Loaded "
#: src/fileio.c:266
#, c-format
msgid ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
msgstr ""
"Game %d could not be loaded from disk.\n"
"\n"
"^{File %s: %s^}"
#: src/fileio.c:319
#, c-format
msgid "%s: missing header in game file"
msgstr "%s: missing header in game file"
#: src/fileio.c:322
#, c-format
msgid "%s: not a valid game file"
msgstr "%s: not a valid game file"
#: src/fileio.c:325 src/fileio.c:332
#, c-format
msgid "%s: missing subheader in game file"
msgstr "%s: missing subheader in game file"
#: src/fileio.c:328
#, c-format
msgid "%s: saved under a different version of Star Traders"
msgstr "%s: saved under a different version of Star Traders"
#: src/fileio.c:335
#, c-format
msgid "%s: saved under an incompatible character encoding"
msgstr "%s: saved under an incompatible character encoding"
#: src/fileio.c:343
#, c-format
msgid "%s: illegal or missing field on line %d"
msgstr "%s: illegal or missing field on line %d"
#: src/fileio.c:479 src/fileio.c:501
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Game Not Saved " msgstr " Game Not Saved "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1217,7 +1217,7 @@ msgstr ""
"\n" "\n"
"^{Directory %s: %s^}" "^{Directory %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1629,31 +1629,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "out of memory" msgstr "out of memory"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: %s" msgstr "xmbstowcs: %s"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: %lc" msgstr "xwcrtomb: %lc"

1720
po/eo.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * Finnish Translations for Star Traders * # * Finnish Translations for Star Traders *
# * Copyright (C) 2012, John Zaitseff * # * Copyright (C) 2012-14, John Zaitseff *
# * Copyright (C) 2012, Free Software Foundation, Inc. * # * Copyright (C) 2012, Free Software Foundation, Inc. *
# * * # * *
# ************************************************************************* # *************************************************************************
@ -13,10 +13,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:06+1000\n" "PO-Revision-Date: 2014-05-22 10:59+1000\n"
"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n" "Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
"Language: fi\n" "Language: fi\n"
@ -1120,52 +1120,57 @@ msgstr[1] ""
"%ls on myynyt\n" "%ls on myynyt\n"
"^{%'ld^} osaketta lisää." "^{%'ld^} osaketta lisää."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: kenttä puuttuu rivillä %d" msgstr "%s: kenttä puuttuu rivillä %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: virheellinen kenttä rivillä %d"
#: src/fileio.c:51
#, c-format #, c-format
msgid "%s: illegal field on line %d: `%s'" msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: virheellinen kenttä rivillä %d: ”%s”" msgstr "%s: virheellinen kenttä rivillä %d: ”%s”"
#: src/fileio.c:64 #: src/fileio.c:55
#, c-format #, c-format
msgid "%s: illegal value on line %d: `%s'" msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: virheellinen arvo rivillä %d: ”%s”" msgstr "%s: virheellinen arvo rivillä %d: ”%s”"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393 #: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format #, c-format
msgid "%s: illegal value on line %d" msgid "%s: illegal value on line %d"
msgstr "%s: virheellinen arvo rivillä %d" msgstr "%s: virheellinen arvo rivillä %d"
#: src/fileio.c:103 #: src/fileio.c:98
#, c-format #, c-format
msgid "%s: illegal characters on line %d" msgid "%s: illegal characters on line %d"
msgstr "%s: virheelliset merkit rivillä %d" msgstr "%s: virheelliset merkit rivillä %d"
#: src/fileio.c:184 #: src/fileio.c:183
#, c-format #, c-format
msgid "%s: could not convert string" msgid "%s: could not convert string"
msgstr "%s: ei voitu muuntaa merkkijonoa" msgstr "%s: ei voitu muuntaa merkkijonoa"
#: src/fileio.c:255 #: src/fileio.c:257
#, c-format #, c-format
msgid " Game Not Found " msgid " Game Not Found "
msgstr " Peliä ei löytynyt " msgstr " Peliä ei löytynyt "
#: src/fileio.c:256 #: src/fileio.c:258
#, c-format #, c-format
msgid "Game %d has not been saved to disk." msgid "Game %d has not been saved to disk."
msgstr "Peliä %d ei ole tallennetu levylle." msgstr "Peliä %d ei ole tallennetu levylle."
#: src/fileio.c:263 #: src/fileio.c:265
#, c-format #, c-format
msgid " Game Not Loaded " msgid " Game Not Loaded "
msgstr " Peliä ei ladattu " msgstr " Peliä ei ladattu "
#: src/fileio.c:264 #: src/fileio.c:266
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be loaded from disk.\n" "Game %d could not be loaded from disk.\n"
@ -1176,47 +1181,42 @@ msgstr ""
"\n" "\n"
"^{Tiedosto %s: %s^}" "^{Tiedosto %s: %s^}"
#: src/fileio.c:316 #: src/fileio.c:319
#, c-format #, c-format
msgid "%s: missing header in game file" msgid "%s: missing header in game file"
msgstr "%s: pelitiedostosta puuttuu otsake" msgstr "%s: pelitiedostosta puuttuu otsake"
#: src/fileio.c:319 #: src/fileio.c:322
#, c-format #, c-format
msgid "%s: not a valid game file" msgid "%s: not a valid game file"
msgstr "%s: ei ole kelvollinen pelitiedosto" msgstr "%s: ei ole kelvollinen pelitiedosto"
#: src/fileio.c:322 src/fileio.c:329 #: src/fileio.c:325 src/fileio.c:332
#, c-format #, c-format
msgid "%s: missing subheader in game file" msgid "%s: missing subheader in game file"
msgstr "%s: pelitiedostosta puuttuu aliotsake" msgstr "%s: pelitiedostosta puuttuu aliotsake"
#: src/fileio.c:325 #: src/fileio.c:328
#, c-format #, c-format
msgid "%s: saved under a different version of Star Traders" msgid "%s: saved under a different version of Star Traders"
msgstr "%s: tallennettu Tähtikauppiaiden eri versiona" msgstr "%s: tallennettu Tähtikauppiaiden eri versiona"
#: src/fileio.c:332 #: src/fileio.c:335
#, c-format #, c-format
msgid "%s: saved under an incompatible character encoding" msgid "%s: saved under an incompatible character encoding"
msgstr "%s: tallennettu yhteensopimattomana merkkikoodauksena" msgstr "%s: tallennettu yhteensopimattomana merkkikoodauksena"
#: src/fileio.c:340 #: src/fileio.c:343
#, c-format #, c-format
msgid "%s: illegal or missing field on line %d" msgid "%s: illegal or missing field on line %d"
msgstr "%s: virheellinen tai puuttuva kenttä rivillä %d" msgstr "%s: virheellinen tai puuttuva kenttä rivillä %d"
#: src/fileio.c:384 #: src/fileio.c:479 src/fileio.c:501
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: virheellinen kenttä rivillä %d"
#: src/fileio.c:466 src/fileio.c:487
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Peliä ei tallennettu " msgstr " Peliä ei tallennettu "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1227,7 +1227,7 @@ msgstr ""
"\n" "\n"
"^{Hakemisto %s: %s^}" "^{Hakemisto %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1639,31 +1639,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "Ei" msgstr "Ei"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "muisti loppui" msgstr "muisti loppui"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: ”%s”" msgstr "xmbstowcs: ”%s”"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: ”%lc”" msgstr "xwcrtomb: ”%lc”"

View File

@ -1,7 +1,8 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * French Translations for Star Traders * # * French Translations for Star Traders *
# * Copyright (C) 2012, Free Software Foundation, Inc. * # * Copyright (C) 2012-14, John Zaitseff *
# * Copyright (C) 2012-13, Free Software Foundation, Inc. *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
@ -11,10 +12,10 @@
# Frédéric Marchal <fmarchal@perso.be>, 2012. # Frédéric Marchal <fmarchal@perso.be>, 2012.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:05+1000\n" "PO-Revision-Date: 2014-05-22 11:00+1000\n"
"Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n" "Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n"
"Language-Team: French <traduc@traduc.org>\n" "Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n" "Language: fr\n"
@ -1115,52 +1116,57 @@ msgstr[1] ""
"%ls a émis\n" "%ls a émis\n"
"^{%'ld^} actions en plus." "^{%'ld^} actions en plus."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: champ manquant à la ligne %d" msgstr "%s: champ manquant à la ligne %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: champ illégal à la ligne %d"
#: src/fileio.c:51
#, c-format #, c-format
msgid "%s: illegal field on line %d: `%s'" msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: champ illégal à la ligne %d: « %s »" msgstr "%s: champ illégal à la ligne %d: « %s »"
#: src/fileio.c:64 #: src/fileio.c:55
#, c-format #, c-format
msgid "%s: illegal value on line %d: `%s'" msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: valeur illégale à la ligne %d: « %s »" msgstr "%s: valeur illégale à la ligne %d: « %s »"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393 #: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format #, c-format
msgid "%s: illegal value on line %d" msgid "%s: illegal value on line %d"
msgstr "%s: valeur illégale à la ligne %d" msgstr "%s: valeur illégale à la ligne %d"
#: src/fileio.c:103 #: src/fileio.c:98
#, c-format #, c-format
msgid "%s: illegal characters on line %d" msgid "%s: illegal characters on line %d"
msgstr "%s: caractère illégal à la ligne %d" msgstr "%s: caractère illégal à la ligne %d"
#: src/fileio.c:184 #: src/fileio.c:183
#, c-format #, c-format
msgid "%s: could not convert string" msgid "%s: could not convert string"
msgstr "%s: la chaîne n'a pas pu être convertie" msgstr "%s: la chaîne n'a pas pu être convertie"
#: src/fileio.c:255 #: src/fileio.c:257
#, c-format #, c-format
msgid " Game Not Found " msgid " Game Not Found "
msgstr " Jeu pas trouvé " msgstr " Jeu pas trouvé "
#: src/fileio.c:256 #: src/fileio.c:258
#, c-format #, c-format
msgid "Game %d has not been saved to disk." msgid "Game %d has not been saved to disk."
msgstr "Le jeu %d n'a pas été enregistré sur disque." msgstr "Le jeu %d n'a pas été enregistré sur disque."
#: src/fileio.c:263 #: src/fileio.c:265
#, c-format #, c-format
msgid " Game Not Loaded " msgid " Game Not Loaded "
msgstr " Jeu pas chargé " msgstr " Jeu pas chargé "
#: src/fileio.c:264 #: src/fileio.c:266
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be loaded from disk.\n" "Game %d could not be loaded from disk.\n"
@ -1171,47 +1177,42 @@ msgstr ""
"\n" "\n"
"^{Fichier %s: %s^}" "^{Fichier %s: %s^}"
#: src/fileio.c:316 #: src/fileio.c:319
#, c-format #, c-format
msgid "%s: missing header in game file" msgid "%s: missing header in game file"
msgstr "%s: en-tête manquant dans le fichier du jeu" msgstr "%s: en-tête manquant dans le fichier du jeu"
#: src/fileio.c:319 #: src/fileio.c:322
#, c-format #, c-format
msgid "%s: not a valid game file" msgid "%s: not a valid game file"
msgstr "%s: le fichier n'est pas un jeu valable" msgstr "%s: le fichier n'est pas un jeu valable"
#: src/fileio.c:322 src/fileio.c:329 #: src/fileio.c:325 src/fileio.c:332
#, c-format #, c-format
msgid "%s: missing subheader in game file" msgid "%s: missing subheader in game file"
msgstr "%s: sous-en-tête manquant dans le fichier de jeu" msgstr "%s: sous-en-tête manquant dans le fichier de jeu"
#: src/fileio.c:325 #: src/fileio.c:328
#, c-format #, c-format
msgid "%s: saved under a different version of Star Traders" msgid "%s: saved under a different version of Star Traders"
msgstr "%s: enregistré par une version différente de Star Traders" msgstr "%s: enregistré par une version différente de Star Traders"
#: src/fileio.c:332 #: src/fileio.c:335
#, c-format #, c-format
msgid "%s: saved under an incompatible character encoding" msgid "%s: saved under an incompatible character encoding"
msgstr "%s: enregistré avec un encodage des caractères incompatible" msgstr "%s: enregistré avec un encodage des caractères incompatible"
#: src/fileio.c:340 #: src/fileio.c:343
#, c-format #, c-format
msgid "%s: illegal or missing field on line %d" msgid "%s: illegal or missing field on line %d"
msgstr "%s: champ illégal ou manquant à la ligne %d" msgstr "%s: champ illégal ou manquant à la ligne %d"
#: src/fileio.c:384 #: src/fileio.c:479 src/fileio.c:501
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: champ illégal à la ligne %d"
#: src/fileio.c:466 src/fileio.c:487
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Jeu pas enregistré " msgstr " Jeu pas enregistré "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1222,7 +1223,7 @@ msgstr ""
"\n" "\n"
"^{Répertoire %s: %s^}" "^{Répertoire %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1646,31 +1647,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "Non" msgstr "Non"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "pas assez de mémoire" msgstr "pas assez de mémoire"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: « %s »" msgstr "xmbstowcs: « %s »"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: « %lc »" msgstr "xwcrtomb: « %lc »"

View File

@ -1,7 +1,7 @@
# ************************************************************************* # *************************************************************************
# * * # * *
# * Croatian Translations for Star Traders * # * Croatian Translations for Star Traders *
# * Copyright (C) 2012, John Zaitseff * # * Copyright (C) 2012-14, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
@ -12,10 +12,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:05+1000\n" "PO-Revision-Date: 2014-05-22 11:00+1000\n"
"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n" "Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n" "Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n" "Language: hr\n"
@ -1120,52 +1120,57 @@ msgstr[2] ""
"Tvrtka %ls je izdala\n" "Tvrtka %ls je izdala\n"
"^{%'ld^} novih dionica." "^{%'ld^} novih dionica."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: nedostaje polje u retku %d" msgstr "%s: nedostaje polje u retku %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: nedozvoljeno polje u retku %d"
#: src/fileio.c:51
#, c-format #, c-format
msgid "%s: illegal field on line %d: `%s'" msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: nedozvoljeno polje u retku %d: „%s”" msgstr "%s: nedozvoljeno polje u retku %d: „%s”"
#: src/fileio.c:64 #: src/fileio.c:55
#, c-format #, c-format
msgid "%s: illegal value on line %d: `%s'" msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: nedozvoljena vrijednost u retku %d: „%s”" msgstr "%s: nedozvoljena vrijednost u retku %d: „%s”"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393 #: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format #, c-format
msgid "%s: illegal value on line %d" msgid "%s: illegal value on line %d"
msgstr "%s: nedozvoljena vrijednost u retku %d" msgstr "%s: nedozvoljena vrijednost u retku %d"
#: src/fileio.c:103 #: src/fileio.c:98
#, c-format #, c-format
msgid "%s: illegal characters on line %d" msgid "%s: illegal characters on line %d"
msgstr "%s: nedozvoljeni znak u retku %d" msgstr "%s: nedozvoljeni znak u retku %d"
#: src/fileio.c:184 #: src/fileio.c:183
#, c-format #, c-format
msgid "%s: could not convert string" msgid "%s: could not convert string"
msgstr "%s: ne mogu pretvoriti niz znakova" msgstr "%s: ne mogu pretvoriti niz znakova"
#: src/fileio.c:255 #: src/fileio.c:257
#, c-format #, c-format
msgid " Game Not Found " msgid " Game Not Found "
msgstr " Igra nije pronađena " msgstr " Igra nije pronađena "
#: src/fileio.c:256 #: src/fileio.c:258
#, c-format #, c-format
msgid "Game %d has not been saved to disk." msgid "Game %d has not been saved to disk."
msgstr "Igra %d nije spremljena na disk." msgstr "Igra %d nije spremljena na disk."
#: src/fileio.c:263 #: src/fileio.c:265
#, c-format #, c-format
msgid " Game Not Loaded " msgid " Game Not Loaded "
msgstr " Igra nije učitana " msgstr " Igra nije učitana "
#: src/fileio.c:264 #: src/fileio.c:266
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be loaded from disk.\n" "Game %d could not be loaded from disk.\n"
@ -1176,47 +1181,42 @@ msgstr ""
"\n" "\n"
"^{Datoteka %s: %s^}" "^{Datoteka %s: %s^}"
#: src/fileio.c:316 #: src/fileio.c:319
#, c-format #, c-format
msgid "%s: missing header in game file" msgid "%s: missing header in game file"
msgstr "%s: nedostaje zaglavlje u datoteci igre" msgstr "%s: nedostaje zaglavlje u datoteci igre"
#: src/fileio.c:319 #: src/fileio.c:322
#, c-format #, c-format
msgid "%s: not a valid game file" msgid "%s: not a valid game file"
msgstr "%s: nije ispravna datoteka igre" msgstr "%s: nije ispravna datoteka igre"
#: src/fileio.c:322 src/fileio.c:329 #: src/fileio.c:325 src/fileio.c:332
#, c-format #, c-format
msgid "%s: missing subheader in game file" msgid "%s: missing subheader in game file"
msgstr "%s: nedostaje podzaglavlje u datoteci igre" msgstr "%s: nedostaje podzaglavlje u datoteci igre"
#: src/fileio.c:325 #: src/fileio.c:328
#, c-format #, c-format
msgid "%s: saved under a different version of Star Traders" msgid "%s: saved under a different version of Star Traders"
msgstr "%s: spremljena različitom inačicom igre Star Traders" msgstr "%s: spremljena različitom inačicom igre Star Traders"
#: src/fileio.c:332 #: src/fileio.c:335
#, c-format #, c-format
msgid "%s: saved under an incompatible character encoding" msgid "%s: saved under an incompatible character encoding"
msgstr "%s: spremljena s nekompatibilnim kodiranjem znakova" msgstr "%s: spremljena s nekompatibilnim kodiranjem znakova"
#: src/fileio.c:340 #: src/fileio.c:343
#, c-format #, c-format
msgid "%s: illegal or missing field on line %d" msgid "%s: illegal or missing field on line %d"
msgstr "%s: nedozvoljeno ili nedostaje polje u retku %d" msgstr "%s: nedozvoljeno ili nedostaje polje u retku %d"
#: src/fileio.c:384 #: src/fileio.c:479 src/fileio.c:501
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: nedozvoljeno polje u retku %d"
#: src/fileio.c:466 src/fileio.c:487
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Igra nije spremljena " msgstr " Igra nije spremljena "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1227,7 +1227,7 @@ msgstr ""
"\n" "\n"
"^{Direktorij %s: %s^}" "^{Direktorij %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1639,31 +1639,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "Ne" msgstr "Ne"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "nema dovoljno memorije" msgstr "nema dovoljno memorije"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: „%s”" msgstr "xmbstowcs: „%s”"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: „%lc”" msgstr "xwcrtomb: „%lc”"

1719
po/nb.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,23 +2,23 @@
# * * # * *
# * Russian Translations for Star Traders * # * Russian Translations for Star Traders *
# * Русский перевод для игры «Звёздные торговцы» * # * Русский перевод для игры «Звёздные торговцы» *
# * Copyright (C) 1990-2012, John Zaitseff * # * Copyright (C) 1990-2014, John Zaitseff *
# * * # * *
# ************************************************************************* # *************************************************************************
# #
# This file is distributed under the same license as the trader package. # This file is distributed under the same license as the trader package.
# #
# Contributors: # Contributors:
# John Zaitseff <J.Zaitseff@zap.org.au>, 2011-12. # John Zaitseff <J.Zaitseff@zap.org.au>, 2011-14.
# Vladimir B. Tsarkov <lipetsk-gnu-lug@bk.ru>, 2012. # Vladimir B. Tsarkov <lipetsk-gnu-lug@bk.ru>, 2012.
# Pavel Maryanov <acid@jack.kiev.ua>, 2012. # Pavel Maryanov <acid@jack.kiev.ua>, 2012.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: trader 7.4\n" "Project-Id-Version: trader 7.5\n"
"Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n" "Report-Msgid-Bugs-To: J.Zaitseff@zap.org.au\n"
"POT-Creation-Date: 2012-05-09 13:57+1000\n" "POT-Creation-Date: 2014-05-23 19:00+1000\n"
"PO-Revision-Date: 2012-05-09 07:05+1000\n" "PO-Revision-Date: 2014-05-22 11:01+1000\n"
"Last-Translator: Pavel Maryanov <acid@jack.kiev.ua>\n" "Last-Translator: Pavel Maryanov <acid@jack.kiev.ua>\n"
"Language-Team: Russian <gnu@mx.ru>\n" "Language-Team: Russian <gnu@mx.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -1126,52 +1126,57 @@ msgstr[2] ""
"Фирма %ls выпустила\n" "Фирма %ls выпустила\n"
"ещё ^{%'ld^} акций." "ещё ^{%'ld^} акций."
#: src/fileio.c:55 src/fileio.c:92 src/fileio.c:131 src/fileio.c:381 #: src/fileio.c:43 src/fileio.c:83 src/fileio.c:126 src/fileio.c:387
#, c-format #, c-format
msgid "%s: missing field on line %d" msgid "%s: missing field on line %d"
msgstr "%s: отсутствующее поле в строке %d" msgstr "%s: отсутствующее поле в строке %d"
#: src/fileio.c:60 #: src/fileio.c:47 src/fileio.c:87 src/fileio.c:130 src/fileio.c:390 src/fileio.c:393
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: неверное поле в строке %d"
#: src/fileio.c:51
#, c-format #, c-format
msgid "%s: illegal field on line %d: `%s'" msgid "%s: illegal field on line %d: `%s'"
msgstr "%s: неверное поле в строке %d: «%s»" msgstr "%s: неверное поле в строке %d: «%s»"
#: src/fileio.c:64 #: src/fileio.c:55
#, c-format #, c-format
msgid "%s: illegal value on line %d: `%s'" msgid "%s: illegal value on line %d: `%s'"
msgstr "%s: неверное значение в строке %d: «%s»" msgstr "%s: неверное значение в строке %d: «%s»"
#: src/fileio.c:96 src/fileio.c:135 src/fileio.c:393 #: src/fileio.c:91 src/fileio.c:134 src/fileio.c:402
#, c-format #, c-format
msgid "%s: illegal value on line %d" msgid "%s: illegal value on line %d"
msgstr "%s: неверное значение в строке %d" msgstr "%s: неверное значение в строке %d"
#: src/fileio.c:103 #: src/fileio.c:98
#, c-format #, c-format
msgid "%s: illegal characters on line %d" msgid "%s: illegal characters on line %d"
msgstr "%s: неверные символы в строке %d" msgstr "%s: неверные символы в строке %d"
#: src/fileio.c:184 #: src/fileio.c:183
#, c-format #, c-format
msgid "%s: could not convert string" msgid "%s: could not convert string"
msgstr "%s: невозможно преобразовать строку" msgstr "%s: невозможно преобразовать строку"
#: src/fileio.c:255 #: src/fileio.c:257
#, c-format #, c-format
msgid " Game Not Found " msgid " Game Not Found "
msgstr " Игра не найдена " msgstr " Игра не найдена "
#: src/fileio.c:256 #: src/fileio.c:258
#, c-format #, c-format
msgid "Game %d has not been saved to disk." msgid "Game %d has not been saved to disk."
msgstr "Игра №%d не была сохранена." msgstr "Игра №%d не была сохранена."
#: src/fileio.c:263 #: src/fileio.c:265
#, c-format #, c-format
msgid " Game Not Loaded " msgid " Game Not Loaded "
msgstr " Игра не загружена " msgstr " Игра не загружена "
#: src/fileio.c:264 #: src/fileio.c:266
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be loaded from disk.\n" "Game %d could not be loaded from disk.\n"
@ -1182,47 +1187,42 @@ msgstr ""
"\n" "\n"
"^{Файл %s: %s^}" "^{Файл %s: %s^}"
#: src/fileio.c:316 #: src/fileio.c:319
#, c-format #, c-format
msgid "%s: missing header in game file" msgid "%s: missing header in game file"
msgstr "%s: отсутствует заголовок в игровом файле" msgstr "%s: отсутствует заголовок в игровом файле"
#: src/fileio.c:319 #: src/fileio.c:322
#, c-format #, c-format
msgid "%s: not a valid game file" msgid "%s: not a valid game file"
msgstr "%s: неверный формат игрового файла" msgstr "%s: неверный формат игрового файла"
#: src/fileio.c:322 src/fileio.c:329 #: src/fileio.c:325 src/fileio.c:332
#, c-format #, c-format
msgid "%s: missing subheader in game file" msgid "%s: missing subheader in game file"
msgstr "%s: отсутствует подзаголовок в игровом файле" msgstr "%s: отсутствует подзаголовок в игровом файле"
#: src/fileio.c:325 #: src/fileio.c:328
#, c-format #, c-format
msgid "%s: saved under a different version of Star Traders" msgid "%s: saved under a different version of Star Traders"
msgstr "%s: файл сохранён в другой версии игры «Звёздные торговцы»" msgstr "%s: файл сохранён в другой версии игры «Звёздные торговцы»"
#: src/fileio.c:332 #: src/fileio.c:335
#, c-format #, c-format
msgid "%s: saved under an incompatible character encoding" msgid "%s: saved under an incompatible character encoding"
msgstr "%s: в файле используется неподдерживаемая кодировка символов" msgstr "%s: в файле используется неподдерживаемая кодировка символов"
#: src/fileio.c:340 #: src/fileio.c:343
#, c-format #, c-format
msgid "%s: illegal or missing field on line %d" msgid "%s: illegal or missing field on line %d"
msgstr "%s: неверное поле или отсутствующее поле в строке %d" msgstr "%s: неверное поле или отсутствующее поле в строке %d"
#: src/fileio.c:384 #: src/fileio.c:479 src/fileio.c:501
#, c-format
msgid "%s: illegal field on line %d"
msgstr "%s: неверное поле в строке %d"
#: src/fileio.c:466 src/fileio.c:487
#, c-format #, c-format
msgid " Game Not Saved " msgid " Game Not Saved "
msgstr " Игра не сохранена " msgstr " Игра не сохранена "
#: src/fileio.c:467 #: src/fileio.c:480
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1233,7 +1233,7 @@ msgstr ""
"\n" "\n"
"^{Папка %s: %s^}" "^{Папка %s: %s^}"
#: src/fileio.c:488 #: src/fileio.c:502
#, c-format #, c-format
msgid "" msgid ""
"Game %d could not be saved to disk.\n" "Game %d could not be saved to disk.\n"
@ -1645,31 +1645,31 @@ msgctxt "answer"
msgid "No" msgid "No"
msgstr "Нет" msgstr "Нет"
#: src/utils.c:199 src/utils.c:220 #: src/utils.c:378 src/utils.c:399
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/utils.c:225 #: src/utils.c:404
msgid ": " msgid ": "
msgstr ": " msgstr ": "
#: src/utils.c:238 #: src/utils.c:417
#, c-format #, c-format
msgid "out of memory" msgid "out of memory"
msgstr "недостаточно памяти" msgstr "недостаточно памяти"
#: src/utils.c:571 #: src/utils.c:1041
#, c-format #, c-format
msgid "xmbstowcs: `%s'" msgid "xmbstowcs: `%s'"
msgstr "xmbstowcs: «%s»" msgstr "xmbstowcs: «%s»"
#: src/utils.c:611 #: src/utils.c:1081
#, c-format #, c-format
msgid "xwcrtomb: NUL" msgid "xwcrtomb: NUL"
msgstr "xwcrtomb: NUL" msgstr "xwcrtomb: NUL"
#: src/utils.c:616 #: src/utils.c:1086
#, c-format #, c-format
msgid "xwcrtomb: `%lc'" msgid "xwcrtomb: `%lc'"
msgstr "xwcrtomb: «%lc»" msgstr "xwcrtomb: «%lc»"

View File

@ -1,7 +1,7 @@
######################################################################### #########################################################################
# # # #
# Star Traders: A Game of Interstellar Trading # # Star Traders: A Game of Interstellar Trading #
# Copyright (C) 1990-2012, John Zaitseff # # Copyright (C) 1990-2014, John Zaitseff #
# # # #
######################################################################### #########################################################################

View File

@ -1,7 +1,7 @@
************************************************************************** **************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************** **************************************************************************

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -32,31 +32,22 @@
/************************************************************************ /************************************************************************
* Module-specific constants and macros * * Module-specific macros *
************************************************************************/ ************************************************************************/
// Game loading and saving constants
static const unsigned char game_file_crypt_key[] = {
0x50, 0x52, 0x55, 0x59, 0x5A, 0x5C, 0x5F,
0x90, 0x92, 0x95, 0x99, 0x9A, 0x9C, 0x9F,
0xA0, 0xA2, 0xA5, 0xA9, 0xAA, 0xAC, 0xAF,
0xD0, 0xD2, 0xD5, 0xD9, 0xDA, 0xDC, 0xDF
};
#define GAME_FILE_CRYPT_KEY_SIZE (sizeof(game_file_crypt_key) / sizeof(game_file_crypt_key[0]))
// Macros used in load_game() // Macros used in load_game()
#define load_game_scanf(_fmt, _var, _cond) \ #define load_game_scanf(_fmt, _var, _cond) \
do { \ do { \
if (fgets(buf, BUFSIZE, file) == NULL) { \ if (fgets(inbuf, BIGBUFSIZE, file) == NULL) { \
err_exit(_("%s: missing field on line %d"), \ err_exit(_("%s: missing field on line %d"), \
filename, lineno); \ filename, lineno); \
} \ } \
if (sscanf(unscramble(crypt_key, buf, BUFSIZE), _fmt "\n", \ if (unscramble(buf, inbuf, BUFSIZE, crypt_key_p) == NULL) { \
&(_var)) != 1) { \ err_exit(_("%s: illegal field on line %d"), \
filename, lineno); \
} \
if (sscanf(buf, _fmt "\n", &(_var)) != 1) { \
err_exit(_("%s: illegal field on line %d: `%s'"), \ err_exit(_("%s: illegal field on line %d: `%s'"), \
filename, lineno, buf); \ filename, lineno, buf); \
} \ } \
@ -88,11 +79,15 @@ static const unsigned char game_file_crypt_key[] = {
char *s; \ char *s; \
int len; \ int len; \
\ \
if (fgets(buf, BUFSIZE, file) == NULL) { \ if (fgets(inbuf, BIGBUFSIZE, file) == NULL) { \
err_exit(_("%s: missing field on line %d"), \ err_exit(_("%s: missing field on line %d"), \
filename, lineno); \ filename, lineno); \
} \ } \
if (strlen(unscramble(crypt_key, buf, BUFSIZE)) == 0) { \ if (unscramble(buf, inbuf, BUFSIZE, crypt_key_p) == NULL) { \
err_exit(_("%s: illegal field on line %d"), \
filename, lineno); \
} \
if (strlen(buf) == 0) { \
err_exit(_("%s: illegal value on line %d"), \ err_exit(_("%s: illegal value on line %d"), \
filename, lineno); \ filename, lineno); \
} \ } \
@ -127,11 +122,15 @@ static const unsigned char game_file_crypt_key[] = {
char *s; \ char *s; \
int len; \ int len; \
\ \
if (fgets(buf, BUFSIZE, file) == NULL) { \ if (fgets(inbuf, BIGBUFSIZE, file) == NULL) { \
err_exit(_("%s: missing field on line %d"), \ err_exit(_("%s: missing field on line %d"), \
filename, lineno); \ filename, lineno); \
} \ } \
if (strlen(unscramble(crypt_key, buf, BUFSIZE)) == 0) { \ if (unscramble(buf, inbuf, BUFSIZE, crypt_key_p) == NULL) { \
err_exit(_("%s: illegal field on line %d"), \
filename, lineno); \
} \
if (strlen(buf) == 0) { \
err_exit(_("%s: illegal value on line %d"), \ err_exit(_("%s: illegal value on line %d"), \
filename, lineno); \ filename, lineno); \
} \ } \
@ -157,8 +156,8 @@ static const unsigned char game_file_crypt_key[] = {
#define save_game_printf(_fmt, _var) \ #define save_game_printf(_fmt, _var) \
do { \ do { \
snprintf(buf, BUFSIZE, _fmt "\n", _var); \ snprintf(buf, BUFSIZE, _fmt "\n", _var); \
scramble(crypt_key, buf, BUFSIZE); \ scramble(encbuf, buf, BIGBUFSIZE, crypt_key_p); \
fprintf(file, "%s", buf); \ fprintf(file, "%s", encbuf); \
} while (0) } while (0)
#define save_game_write_int(_var) \ #define save_game_write_int(_var) \
@ -224,10 +223,12 @@ bool load_game (int num)
int saved_errno, lineno; int saved_errno, lineno;
char *prev_locale; char *prev_locale;
char *buf; char *buf, *inbuf;
wchar_t *wcbuf; wchar_t *wcbuf;
int crypt_key; unsigned int crypt_key;
unsigned int *crypt_key_p;
int is_encrypted_input;
int n, i, j; int n, i, j;
#ifdef USE_UTF8_GAME_FILE #ifdef USE_UTF8_GAME_FILE
@ -239,6 +240,7 @@ bool load_game (int num)
assert(num >= 1 && num <= 9); assert(num >= 1 && num <= 9);
buf = xmalloc(BUFSIZE); buf = xmalloc(BUFSIZE);
inbuf = xmalloc(BIGBUFSIZE);
wcbuf = xmalloc(BUFSIZE * sizeof(wchar_t)); wcbuf = xmalloc(BUFSIZE * sizeof(wchar_t));
filename = game_filename(num); filename = game_filename(num);
@ -267,6 +269,7 @@ bool load_game (int num)
} }
free(buf); free(buf);
free(inbuf);
free(wcbuf); free(wcbuf);
free(filename); free(filename);
return false; return false;
@ -335,12 +338,15 @@ bool load_game (int num)
lineno = 4; lineno = 4;
// Read in the game file encryption key // Read in the game file encryption status
if (fscanf(file, "%i\n", &crypt_key) != 1) { if (fscanf(file, "%i\n", &is_encrypted_input) != 1) {
err_exit(_("%s: illegal or missing field on line %d"), filename, lineno); err_exit(_("%s: illegal or missing field on line %d"), filename, lineno);
} }
lineno++; lineno++;
crypt_key = 0;
crypt_key_p = is_encrypted_input ? &crypt_key : NULL;
// Read in various game variables // Read in various game variables
load_game_read_int(n, n == MAX_X); load_game_read_int(n, n == MAX_X);
load_game_read_int(n, n == MAX_Y); load_game_read_int(n, n == MAX_Y);
@ -377,10 +383,13 @@ bool load_game (int num)
// Read in galaxy map // Read in galaxy map
for (int x = 0; x < MAX_X; x++) { for (int x = 0; x < MAX_X; x++) {
if (fgets(buf, BUFSIZE, file) == NULL) { if (fgets(inbuf, BIGBUFSIZE, file) == NULL) {
err_exit(_("%s: missing field on line %d"), filename, lineno); err_exit(_("%s: missing field on line %d"), filename, lineno);
} }
if (strlen(unscramble(crypt_key, buf, BUFSIZE)) != MAX_Y + 1) { if (unscramble(buf, inbuf, BUFSIZE, crypt_key_p) == NULL) {
err_exit(_("%s: illegal field on line %d"), filename, lineno);
}
if (strlen(buf) != MAX_Y + 1) {
err_exit(_("%s: illegal field on line %d"), filename, lineno); err_exit(_("%s: illegal field on line %d"), filename, lineno);
} }
@ -414,6 +423,7 @@ bool load_game (int num)
#endif #endif
free(buf); free(buf);
free(inbuf);
free(wcbuf); free(wcbuf);
free(filename); free(filename);
free(prev_locale); free(prev_locale);
@ -428,14 +438,16 @@ bool load_game (int num)
bool save_game (int num) bool save_game (int num)
{ {
const char *data_dir; const char *data_dir;
char *buf, *filename; char *buf, *encbuf;
char *filename;
FILE *file; FILE *file;
char *codeset; char *codeset;
int saved_errno; int saved_errno;
char *prev_locale; char *prev_locale;
struct stat statbuf; struct stat statbuf;
int crypt_key;
int i, j, x, y; int i, j, x, y;
unsigned int crypt_key;
unsigned int *crypt_key_p;
#ifdef USE_UTF8_GAME_FILE #ifdef USE_UTF8_GAME_FILE
iconv_t icd; iconv_t icd;
@ -446,9 +458,10 @@ bool save_game (int num)
assert(num >= 1 && num <= 9); assert(num >= 1 && num <= 9);
buf = xmalloc(BUFSIZE); buf = xmalloc(BUFSIZE);
encbuf = xmalloc(BIGBUFSIZE);
crypt_key = option_dont_encrypt ? 0 : crypt_key = 0;
game_file_crypt_key[randi(GAME_FILE_CRYPT_KEY_SIZE)]; crypt_key_p = option_dont_encrypt ? NULL : &crypt_key;
// Create the data directory, if needed // Create the data directory, if needed
data_dir = data_directory(); data_dir = data_directory();
@ -469,6 +482,7 @@ bool save_game (int num)
strerror(saved_errno)); strerror(saved_errno));
free(buf); free(buf);
free(encbuf);
return false; return false;
} }
} }
@ -489,6 +503,7 @@ bool save_game (int num)
"^{File %s: %s^}"), num, filename, strerror(saved_errno)); "^{File %s: %s^}"), num, filename, strerror(saved_errno));
free(buf); free(buf);
free(encbuf);
free(filename); free(filename);
return false; return false;
} }
@ -521,9 +536,9 @@ bool save_game (int num)
prev_locale = xstrdup(setlocale(LC_NUMERIC, NULL)); prev_locale = xstrdup(setlocale(LC_NUMERIC, NULL));
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
// Write out the game file header and encryption key // Write out the game file header and encryption status
fprintf(file, "%s\n" "%s\n", GAME_FILE_HEADER, GAME_FILE_API_VERSION); fprintf(file, "%s\n" "%s\n", GAME_FILE_HEADER, GAME_FILE_API_VERSION);
fprintf(file, "%s\n" "%d\n", codeset, crypt_key); fprintf(file, "%s\n" "%d\n", codeset, ! option_dont_encrypt);
// Write out various game variables // Write out various game variables
save_game_write_int(MAX_X); save_game_write_int(MAX_X);
@ -568,8 +583,8 @@ bool save_game (int num)
*p++ = '\n'; *p++ = '\n';
*p = '\0'; *p = '\0';
scramble(crypt_key, buf, BUFSIZE); scramble(encbuf, buf, BIGBUFSIZE, crypt_key_p);
fprintf(file, "%s", buf); fprintf(file, "%s", encbuf);
} }
// Write out a dummy sentinal value // Write out a dummy sentinal value
@ -589,6 +604,7 @@ bool save_game (int num)
#endif #endif
free(buf); free(buf);
free(encbuf);
free(filename); free(filename);
free(prev_locale); free(prev_locale);
return true; return true;

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -622,10 +622,10 @@ extern int gettxchar (WINDOW *win, wint_t *restrict wch);
way (including if the user made any changed, spaces were stripped or if way (including if the user made any changed, spaces were stripped or if
emptyval was copied into buf[]). emptyval was copied into buf[]).
If either KEY_DEFVAL1 or KEY_DEFVAL2 is pressed when the input line is If a key matching any character in the string "input|DefaultValue" (by
empty, the string pointed to by defaultval (if not NULL) is placed in default, "=;") is pressed when the input line is empty, the string
the buffer as if typed by the user. Editing is NOT terminated in this pointed to by defaultval (if not NULL) is placed in the buffer as if
case. typed by the user. Editing is NOT terminated in this case.
If allowed is not NULL, only characters in that string are allowed to If allowed is not NULL, only characters in that string are allowed to
be entered into the input line. For example, if allowed points to be entered into the input line. For example, if allowed points to

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -75,6 +75,7 @@
// Headers defined by the GNU C Library // Headers defined by the GNU C Library
#include <crc.h>
#include <getopt.h> #include <getopt.h>

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -293,7 +293,7 @@ This program is free software that is distributed under the terms of the\n\
GNU General Public License, version 3 or later. You are welcome to\n\ GNU General Public License, version 3 or later. You are welcome to\n\
modify and/or distribute it under certain conditions. This program has\n\ modify and/or distribute it under certain conditions. This program has\n\
NO WARRANTY, to the extent permitted by law; see the License for details.\n\ NO WARRANTY, to the extent permitted by law; see the License for details.\n\
"), program_name, PACKAGE_VERSION, "1990-2012"); "), program_name, PACKAGE_VERSION, "1990-2014");
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -53,7 +53,7 @@
************************************************************************/ ************************************************************************/
#define GAME_FILE_HEADER "Star Traders Saved Game" #define GAME_FILE_HEADER "Star Traders Saved Game"
#define GAME_FILE_API_VERSION "File API 7.2" // For game loads and saves #define GAME_FILE_API_VERSION "File API 7.5" // For game loads and saves
#define GAME_FILE_SENTINEL 42 // End of game file sentinel #define GAME_FILE_SENTINEL 42 // End of game file sentinel
#ifdef USE_UTF8_GAME_FILE #ifdef USE_UTF8_GAME_FILE

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -50,7 +50,7 @@ wchar_t *mon_thousands_sep; // Local monetary thousands separator
/************************************************************************ /************************************************************************
* Module-specific constants and variable definitions * * Module-specific constants and macros *
************************************************************************/ ************************************************************************/
#define GAME_FILENAME_PROTO "game%d" #define GAME_FILENAME_PROTO "game%d"
@ -62,6 +62,122 @@ wchar_t *mon_thousands_sep; // Local monetary thousands separator
#define MOD_POSIX_P_CS_PRECEDES 1 #define MOD_POSIX_P_CS_PRECEDES 1
#define MOD_POSIX_P_SEP_BY_SPACE 0 #define MOD_POSIX_P_SEP_BY_SPACE 0
// Constants used for scrambling and unscrambling game data
#define SCRAMBLE_CRC_LEN 8 // Length of CRC in ASCII (excl NUL)
#define SCRAMBLE_CHKSUM_LEN 3 // For checksum, excluding NUL byte
#define SCRAMBLE_CRC_MASK 0xFFFFFFFF // Bits of CRC to keep
#define SCRAMBLE_CHKSUM_MASK 0x0FFF // Bits of checksum to keep
#define SCRAMBLE_PAD_CHAR '*'
#define SCRAMBLE_IGNORE_CHAR '~'
#define UNSCRAMBLE_INVALID (-1)
#define UNSCRAMBLE_IGNORE (-2)
#define UNSCRAMBLE_PAD_CHAR (-3)
static const char scramble_table[] =
"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz-_";
#define _b(n) \
((n) == '0' ? 0 : (n) == '1' ? 1 : (n) == '2' ? 2 : (n) == '3' ? 3 : \
(n) == '4' ? 4 : (n) == '5' ? 5 : (n) == '6' ? 6 : (n) == '7' ? 7 : \
(n) == '8' ? 8 : (n) == '9' ? 9 : (n) == 'A' ? 10 : (n) == 'a' ? 11 : \
(n) == 'B' ? 12 : (n) == 'b' ? 13 : (n) == 'C' ? 14 : (n) == 'c' ? 15 : \
(n) == 'D' ? 16 : (n) == 'd' ? 17 : (n) == 'E' ? 18 : (n) == 'e' ? 19 : \
(n) == 'F' ? 20 : (n) == 'f' ? 21 : (n) == 'G' ? 22 : (n) == 'g' ? 23 : \
(n) == 'H' ? 24 : (n) == 'h' ? 25 : (n) == 'I' ? 26 : (n) == 'i' ? 27 : \
(n) == 'J' ? 28 : (n) == 'j' ? 29 : (n) == 'K' ? 30 : (n) == 'k' ? 31 : \
(n) == 'L' ? 32 : (n) == 'l' ? 33 : (n) == 'M' ? 34 : (n) == 'm' ? 35 : \
(n) == 'N' ? 36 : (n) == 'n' ? 37 : (n) == 'O' ? 38 : (n) == 'o' ? 39 : \
(n) == 'P' ? 40 : (n) == 'p' ? 41 : (n) == 'Q' ? 42 : (n) == 'q' ? 43 : \
(n) == 'R' ? 44 : (n) == 'r' ? 45 : (n) == 'S' ? 46 : (n) == 's' ? 47 : \
(n) == 'T' ? 48 : (n) == 't' ? 49 : (n) == 'U' ? 50 : (n) == 'u' ? 51 : \
(n) == 'V' ? 52 : (n) == 'v' ? 53 : (n) == 'W' ? 54 : (n) == 'w' ? 55 : \
(n) == 'X' ? 56 : (n) == 'x' ? 57 : (n) == 'Y' ? 58 : (n) == 'y' ? 59 : \
(n) == 'Z' ? 60 : (n) == 'z' ? 61 : (n) == '-' ? 62 : (n) == '_' ? 63 : \
(n) == ' ' ? UNSCRAMBLE_IGNORE : \
(n) == '\t' ? UNSCRAMBLE_IGNORE : \
(n) == '\n' ? UNSCRAMBLE_IGNORE : \
(n) == '\r' ? UNSCRAMBLE_IGNORE : \
(n) == SCRAMBLE_IGNORE_CHAR ? UNSCRAMBLE_IGNORE : \
(n) == SCRAMBLE_PAD_CHAR ? UNSCRAMBLE_PAD_CHAR : \
UNSCRAMBLE_INVALID)
static const signed char unscramble_table[] = {
_b(0), _b(1), _b(2), _b(3), _b(4), _b(5), _b(6), _b(7),
_b(8), _b(9), _b(10) , _b(11), _b(12), _b(13), _b(14), _b(15),
_b(16), _b(17), _b(18), _b(19), _b(20), _b(21), _b(22), _b(23),
_b(24), _b(25), _b(26), _b(27), _b(28), _b(29), _b(30), _b(31),
_b(32), _b(33), _b(34), _b(35), _b(36), _b(37), _b(38), _b(39),
_b(40), _b(41), _b(42), _b(43), _b(44), _b(45), _b(46), _b(47),
_b(48), _b(49), _b(50), _b(51), _b(52), _b(53), _b(54), _b(55),
_b(56), _b(57), _b(58), _b(59), _b(60), _b(61), _b(62), _b(63),
_b(64), _b(65), _b(66), _b(67), _b(68), _b(69), _b(70), _b(71),
_b(72), _b(73), _b(74), _b(75), _b(76), _b(77), _b(78), _b(79),
_b(80), _b(81), _b(82), _b(83), _b(84), _b(85), _b(86), _b(87),
_b(88), _b(89), _b(90), _b(91), _b(92), _b(93), _b(94), _b(95),
_b(96), _b(97), _b(98), _b(99), _b(100), _b(101), _b(102), _b(103),
_b(104), _b(105), _b(106), _b(107), _b(108), _b(109), _b(110), _b(111),
_b(112), _b(113), _b(114), _b(115), _b(116), _b(117), _b(118), _b(119),
_b(120), _b(121), _b(122), _b(123), _b(124), _b(125), _b(126), _b(127),
_b(128), _b(129), _b(130), _b(131), _b(132), _b(133), _b(134), _b(135),
_b(136), _b(137), _b(138), _b(139), _b(140), _b(141), _b(142), _b(143),
_b(144), _b(145), _b(146), _b(147), _b(148), _b(149), _b(150), _b(151),
_b(152), _b(153), _b(154), _b(155), _b(156), _b(157), _b(158), _b(159),
_b(160), _b(161), _b(162), _b(163), _b(164), _b(165), _b(166), _b(167),
_b(168), _b(169), _b(170), _b(171), _b(172), _b(173), _b(174), _b(175),
_b(176), _b(177), _b(178), _b(179), _b(180), _b(181), _b(182), _b(183),
_b(184), _b(185), _b(186), _b(187), _b(188), _b(189), _b(190), _b(191),
_b(192), _b(193), _b(194), _b(195), _b(196), _b(197), _b(198), _b(199),
_b(200), _b(201), _b(202), _b(203), _b(204), _b(205), _b(206), _b(207),
_b(208), _b(209), _b(210), _b(211), _b(212), _b(213), _b(214), _b(215),
_b(216), _b(217), _b(218), _b(219), _b(220), _b(221), _b(222), _b(223),
_b(224), _b(225), _b(226), _b(227), _b(228), _b(229), _b(230), _b(231),
_b(232), _b(233), _b(234), _b(235), _b(236), _b(237), _b(238), _b(239),
_b(240), _b(241), _b(242), _b(243), _b(244), _b(245), _b(246), _b(247),
_b(248), _b(249), _b(250), _b(251), _b(252), _b(253), _b(254), _b(255)
};
#define UNSCRAMBLE_TABLE_SIZE (sizeof(unscramble_table) / sizeof(unscramble_table[0]))
static const unsigned char xor_table[] = {
/* Set of bytes 0x00 to 0xFF in random order; each byte in an input
string is XORed with successive bytes in this table. */
0x00, 0xCE, 0xB1, 0x9F, 0xE4, 0xE0, 0xE3, 0x79,
0xA1, 0x3B, 0x4E, 0x89, 0x81, 0x84, 0x43, 0xC8,
0xBE, 0x0F, 0x67, 0x2A, 0xB4, 0xD8, 0xBA, 0x5D,
0x94, 0x06, 0x69, 0x0E, 0x1C, 0x48, 0x9E, 0x0A,
0x1D, 0x09, 0x02, 0xCD, 0xD4, 0xF6, 0x5B, 0x8A,
0xAE, 0x65, 0xB3, 0xB5, 0xA7, 0x13, 0x03, 0xF2,
0x42, 0xF0, 0xA6, 0xAA, 0x35, 0xCB, 0x2C, 0x55,
0xF5, 0xC7, 0x32, 0xB7, 0x6B, 0xEA, 0xC3, 0x6F,
0x41, 0xFF, 0xD1, 0x24, 0x54, 0xA9, 0xC6, 0xC2,
0x74, 0xEE, 0xBC, 0x99, 0x59, 0x71, 0x3D, 0x85,
0x0B, 0xF7, 0x3A, 0x7E, 0xDB, 0x45, 0xE8, 0x96,
0xD0, 0xC1, 0xE6, 0xFD, 0x86, 0x8C, 0x9B, 0x0C,
0x66, 0x5F, 0xE5, 0x14, 0x98, 0x3C, 0xBD, 0xE2,
0x88, 0xA3, 0x30, 0x38, 0x2F, 0xA2, 0x37, 0x70,
0xB8, 0x11, 0x61, 0x93, 0x52, 0x1B, 0xDD, 0x20,
0x60, 0x19, 0xEF, 0xD2, 0xEC, 0x73, 0x07, 0x92,
0x4C, 0x6A, 0xA8, 0x9D, 0x34, 0x04, 0x87, 0x2E,
0x1E, 0xA4, 0xCA, 0x72, 0x63, 0xD7, 0x7F, 0xFB,
0x68, 0xE1, 0xBF, 0x10, 0x8E, 0xAF, 0x9A, 0xFA,
0xA0, 0xDE, 0x1F, 0x31, 0x15, 0x97, 0xED, 0x2B,
0x36, 0x8D, 0x12, 0xC5, 0x23, 0x95, 0x33, 0x56,
0x4F, 0xE7, 0xAD, 0x5C, 0x4B, 0x83, 0xDC, 0x29,
0xE9, 0xCF, 0x8F, 0x58, 0x4D, 0x5A, 0x08, 0x49,
0xFC, 0x6D, 0x7C, 0xB6, 0xD3, 0x7B, 0xD6, 0x53,
0x57, 0x82, 0x0D, 0xD9, 0x7D, 0xDA, 0x4A, 0xDF,
0x27, 0x40, 0x1A, 0x22, 0xC9, 0x51, 0x3E, 0x6C,
0xC4, 0x18, 0xCC, 0xAC, 0xEB, 0xA5, 0xF4, 0x44,
0xFE, 0x76, 0xF8, 0x75, 0xF3, 0x2D, 0xB0, 0xB9,
0x9C, 0x47, 0x7A, 0x28, 0xBB, 0xF1, 0x16, 0x64,
0x46, 0x21, 0x78, 0x90, 0xD5, 0x80, 0x3F, 0x39,
0x25, 0xB2, 0x6E, 0x8B, 0x77, 0xC0, 0x05, 0x50,
0x17, 0xF9, 0x01, 0x26, 0x91, 0x5E, 0x62, 0xAB
};
#define XOR_TABLE_SIZE (sizeof(xor_table) / sizeof(xor_table[0]))
/************************************************************************ /************************************************************************
* Module-specific variables * * Module-specific variables *
@ -73,6 +189,69 @@ static char *data_directory_str = NULL; // Writable data dir pathname
static bool add_currency_symbol = false; // Do we need to add "$"? static bool add_currency_symbol = false; // Do we need to add "$"?
/************************************************************************
* Module-specific function prototypes *
************************************************************************/
/*
Function: apply_xor - Scramble a buffer using xor_table
Parameters: dest - Location of destination buffer
src - Location of source buffer
n - Number of bytes to scramble
key - Pointer to xor_table index
Returns: (nothing)
This function copies n bytes from *src into *dest, applying a XOR with
the contents of xor_table in the process. It is a reversable function:
apply_xor(apply_xor(buffer)) == buffer. It is used by both scramble()
and unscramble().
*/
static void apply_xor (void *restrict dest, const void *restrict src,
size_t n, unsigned int *restrict key);
/*
Function: b64encode - Convert a block to non-standard Base64 encoding
Parameters: in - Location of input buffer
inlen - Size of input buffer
out - Location of output buffer
outlen - Size of output buffer
Returns: size_t - Number of bytes placed in output buffer
This function encodes inlen bytes in the input buffer into the output
buffer using a non-standard Base64 encoding (as contained above in
scramble_table[]). The resulting encoded string length is returned
(including trailing '\n' but NOT including trailing NUL).
Note that the output buffer must be at least 4/3 the size of the input
buffer; if not, an assert is generated.
This function is used by scramble().
*/
static size_t b64encode (const void *restrict in, size_t inlen,
void *restrict out, size_t outlen);
/*
Function: b64decode - Convert a block from non-standard Base64 encoding
Parameters: in - Location of input buffer
inlen - Size of input buffer
out - Location of output buffer
outlen - Size of output buffer
Returns: ssize_t - Number of bytes placed in output buffer, or -1
This function decodes up to inlen bytes in the input buffer into the
output buffer using a non-standard Base64 encoding (as contained above
in unscramble_table[]). The resulting decoded buffer length is
returned; that buffer may contain NUL bytes. If an error occurs during
decoding, -1 is returned instead.
This function is used by unscramble().
*/
static ssize_t b64decode (const void *restrict in, size_t inlen,
void *restrict out, size_t outlen);
/************************************************************************ /************************************************************************
* Initialisation and environment function definitions * * Initialisation and environment function definitions *
************************************************************************/ ************************************************************************/
@ -415,45 +594,336 @@ ssize_t l_strfmon (char *restrict buf, size_t maxsize,
* Encryption function definitions * * Encryption function definitions *
************************************************************************/ ************************************************************************/
// These functions are documented in the file "utils.h" /* These functions are documented in the file "utils.h" or in the
comments above. */
/***********************************************************************/ /***********************************************************************/
// scramble: Scramble (encrypt) the buffer // scramble: Scramble (encrypt) the buffer
char *scramble (int key, char *restrict buf, int bufsize) char *scramble (char *restrict dest, const char *restrict src,
size_t size, unsigned int *restrict key)
{ {
/* The algorithm used here is reversable: scramble(scramble(...)) unsigned long int crc;
will (or, at least, should!) return the same as the original unsigned int chksum;
buffer. Problematic characters are ignored; however, this size_t srclen;
function assumes all other characters are permitted in files. char *xorbuf, *midxor;
This is true on all POSIX systems. */ char *middest;
char crcbuf[SCRAMBLE_CRC_LEN + 1];
char chksumbuf[SCRAMBLE_CHKSUM_LEN + 1];
if (buf != NULL && key != 0) {
char *p = buf;
unsigned char k = ~key;
for (int i = 0; i < bufsize && *p != '\0'; i++, k++, p++) { assert(dest != NULL);
char c = *p; assert(src != NULL);
char r = c ^ k; // Simple encryption: XOR on a moving key assert(size > 0);
if (c != '\r' && c != '\n' srclen = strlen(src);
&& r != '\r' && r != '\n' && r != '\0') {
*p = r; if (key == NULL) {
// No encryption required
assert(size >= srclen + 2); // Enough room to add "\n"?
strcpy(dest, src);
// Add "\n" if needed
if (dest[srclen - 1] != '\n') {
dest[srclen] = '\n';
dest[srclen + 1] = '\0';
} }
} else {
// Scramble the input
xorbuf = xmalloc(srclen + SCRAMBLE_CRC_LEN + 1);
// Scramble src using *key, leaving room for CRC32 in front
midxor = xorbuf + SCRAMBLE_CRC_LEN;
apply_xor(midxor, src, srclen, key);
// Calculate CRC32 checksum of XORed buffer
crc = crc32(midxor, srclen) & SCRAMBLE_CRC_MASK;
snprintf(crcbuf, SCRAMBLE_CRC_LEN + 1, "%08lx", crc);
memcpy(xorbuf, crcbuf, SCRAMBLE_CRC_LEN);
// Encode whole buffer (including CRC32) using Base64
middest = dest + SCRAMBLE_CHKSUM_LEN;
b64encode(xorbuf, srclen + SCRAMBLE_CRC_LEN,
middest, size - SCRAMBLE_CHKSUM_LEN);
// Calculate simple checksum
chksum = 0;
for (char *p = middest; *p != '\0' && *p != '\n'; p++) {
chksum += *p;
} }
chksum &= SCRAMBLE_CHKSUM_MASK;
// Place checksum in front of Base64 string
snprintf(chksumbuf, SCRAMBLE_CHKSUM_LEN + 1, "%03x", chksum);
memcpy(dest, chksumbuf, SCRAMBLE_CHKSUM_LEN);
free(xorbuf);
} }
return buf; return dest;
} }
/***********************************************************************/ /***********************************************************************/
// unscramble: Unscramble (decrypt) the buffer // unscramble: Unscramble (decrypt) the buffer
char *unscramble (int key, char *restrict buf, int bufsize) char *unscramble (char *restrict dest, const char *restrict src,
size_t size, unsigned int *restrict key)
{ {
return scramble(key, buf, bufsize); unsigned long int crc, crc_input;
unsigned int chksum, chksum_input;
size_t srclen;
char *xorbuf, *midxor;
ssize_t xorlen;
const char *midsrc;
char crcbuf[SCRAMBLE_CRC_LEN + 2]; // Leave room for '\n\0'
char chksumbuf[SCRAMBLE_CHKSUM_LEN + 2];
assert(dest != NULL);
assert(src != NULL);
assert(size > 0);
srclen = strlen(src);
if (key == NULL) {
// No decryption required
assert(size >= srclen + 1);
strcpy(dest, src);
} else {
// Unscramble the input
// Copy out simple checksum from input
memcpy(chksumbuf, src, SCRAMBLE_CHKSUM_LEN);
chksumbuf[SCRAMBLE_CHKSUM_LEN] = '\n';
chksumbuf[SCRAMBLE_CHKSUM_LEN + 1] = '\0';
if (sscanf(chksumbuf, "%x\n", &chksum_input) != 1) {
return NULL;
}
// Calculate and compare checksums
midsrc = src + SCRAMBLE_CHKSUM_LEN;
chksum = 0;
for (const char *p = midsrc; *p != '\0' && *p != '\n'; p++) {
chksum += *p;
}
chksum &= SCRAMBLE_CHKSUM_MASK;
if (chksum != chksum_input) {
return NULL;
}
xorbuf = xmalloc(size + SCRAMBLE_CRC_LEN);
// Decode buffer sans checksum using Base64
xorlen = b64decode(midsrc, srclen - SCRAMBLE_CHKSUM_LEN,
xorbuf, size + SCRAMBLE_CRC_LEN);
if (xorlen < SCRAMBLE_CRC_LEN) {
free(xorbuf);
return NULL;
}
// Copy out CRC32 checksum
memcpy(crcbuf, xorbuf, SCRAMBLE_CRC_LEN);
crcbuf[SCRAMBLE_CRC_LEN] = '\n';
crcbuf[SCRAMBLE_CRC_LEN + 1] = '\0';
if (sscanf(crcbuf, "%lx\n", &crc_input) != 1) {
free(xorbuf);
return NULL;
}
// Calculate and compare CRC32 checksums
midxor = xorbuf + SCRAMBLE_CRC_LEN;
crc = crc32(midxor, xorlen - SCRAMBLE_CRC_LEN) & SCRAMBLE_CRC_MASK;
if (crc != crc_input) {
free(xorbuf);
return NULL;
}
// Descramble xorbuf using *key, ignoring CRC32 in front
apply_xor(dest, midxor, xorlen - SCRAMBLE_CRC_LEN, key);
// Convert the output to a C string
assert(size >= xorlen - SCRAMBLE_CRC_LEN + 1);
dest[xorlen - SCRAMBLE_CRC_LEN] = '\0';
free(xorbuf);
}
return dest;
}
/***********************************************************************/
// apply_xor: Scramble a buffer using xor_table
void apply_xor (void *restrict dest, const void *restrict src,
size_t n, unsigned int *restrict key)
{
assert(dest != NULL);
assert(src != NULL);
assert(key != NULL);
assert(*key < XOR_TABLE_SIZE);
for (size_t i = 0; i < n; i++, dest++, src++) {
*(unsigned char *) dest = *(unsigned char *) src ^ xor_table[*key];
*key = (*key + 1) % XOR_TABLE_SIZE;
}
}
/***********************************************************************/
// b64encode: Convert a block to non-standard Base64 encoding
size_t b64encode (const void *restrict in, size_t inlen,
void *restrict out, size_t outlen)
{
size_t count;
size_t padding;
// Note that bit manipulations on strings require unsigned char!
const unsigned char *u_in = in;
unsigned char *u_out = out;
assert(u_in != NULL);
assert(u_out != NULL);
assert(outlen > 0);
assert(outlen > inlen);
count = 0;
padding = inlen % 3;
for (size_t i = 0; i < inlen; i += 3, u_in += 3) {
unsigned long int n;
unsigned char n0, n1, n2, n3;
// Convert three input bytes into a 24-bit number
n = u_in[0] << 16;
if (i + 1 < inlen) {
n += u_in[1] << 8;
}
if (i + 2 < inlen) {
n += u_in[2];
}
// Convert the 24-bit number into four Base64 bytes
n0 = (unsigned char) (n >> 18) & 0x3F;
n1 = (unsigned char) (n >> 12) & 0x3F;
n2 = (unsigned char) (n >> 6) & 0x3F;
n3 = (unsigned char) n & 0x3F;
assert(count + 3 < outlen);
*u_out++ = scramble_table[n0];
*u_out++ = scramble_table[n1];
count += 2;
if (i + 1 < inlen) {
*u_out++ = scramble_table[n2];
count++;
}
if (i + 2 < inlen) {
*u_out++ = scramble_table[n3];
count++;
}
}
if (padding > 0) {
assert(count + 2 < outlen);
for (; padding < 3; padding++) {
*u_out++ = SCRAMBLE_PAD_CHAR;
count++;
}
}
assert(count + 2 <= outlen);
*u_out++ = '\n';
*u_out = '\0';
count++;
return count;
}
/***********************************************************************/
// b64decode: Convert a block from non-standard Base64 encoding
ssize_t b64decode (const void *restrict in, size_t inlen,
void *restrict out, size_t outlen)
{
size_t count;
unsigned long int n;
// Note that bit manipulations on strings require unsigned char!
// Using char * results in very subtle bugs indeed...
const unsigned char *u_in = in;
unsigned char *u_out = out;
assert(u_in != NULL);
assert(u_out != NULL);
assert(outlen > 0);
count = 0;
n = 1;
for (size_t i = 0; i < inlen && *u_in != '\0'; i++, u_in++) {
char c = *u_in > UNSCRAMBLE_TABLE_SIZE ?
UNSCRAMBLE_INVALID : unscramble_table[*u_in];
switch (c) {
case UNSCRAMBLE_INVALID:
return -1;
case UNSCRAMBLE_IGNORE:
continue;
case UNSCRAMBLE_PAD_CHAR:
// Assume end of data
i = inlen;
continue;
default:
n = n << 6 | c; // c is 0 .. 63
if (n & 0x1000000) {
// Convert 24-bit number into three output bytes
count += 3;
if (count > outlen) {
return -1;
}
*u_out++ = n >> 16;
*u_out++ = n >> 8;
*u_out++ = n;
n = 1;
}
}
}
if (n & 0x40000) {
count += 2;
if (count > outlen) {
return -1;
}
*u_out++ = n >> 10;
*u_out++ = n >> 2;
} else if (n & 0x1000) {
count += 1;
if (count > outlen) {
return -1;
}
*u_out++ = n >> 4;
}
return count;
} }

View File

@ -1,7 +1,7 @@
/************************************************************************ /************************************************************************
* * * *
* Star Traders: A Game of Interstellar Trading * * Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2012, John Zaitseff * * Copyright (C) 1990-2014, John Zaitseff *
* * * *
************************************************************************/ ************************************************************************/
@ -260,46 +260,58 @@ extern ssize_t l_strfmon (char *restrict buf, size_t maxsize,
************************************************************************/ ************************************************************************/
/* /*
The functions described here are simple in the extreme: they are only The functions described here are NOT cryptographically secure: they are
designed to stop casual cheating! only designed to stop casual cheating!
*/ */
/* /*
Function: scramble - Scramble (encrypt) the buffer Function: scramble - Scramble (encrypt) the buffer
Parameters: key - Encryption key Parameters: dest - Pointer to output buffer
buf - Pointer to buffer to encrypt src - Pointer to input buffer to encrypt
bufsize - Size of buffer size - Size of output buffer
Returns: char * - Pointer to buffer key - Pointer to encryption/decryption key
Returns: char * - Pointer to output buffer
This function scrambles (encrypts) the buffer *buf using a trivial This function scrambles (encrypts) the buffer *src and places the
in-place encryption algorithm. If key is zero, or buf is NULL or result in *dest. It uses *key to keep a running encryption key. If
bufsize is less than 1, no encryption takes place. the key is NULL, no encryption is performed.
The buffer should contain a C-style string terminated by '\0'. The The input buffer should contain a C-style string terminated by '\0'.
characters '\r', '\n' and '\0' are guaranteed to remain the same before The output buffer will be terminated with '\n\0', even if the input
and after encryption. At most bufsize bytes are encrypted; buf is does not have a terminating '\n'. The pointer dest is returned as the
returned as the result. output.
Note that src and dest MUST point to different buffers, and that *dest
typically must be twice as large as *src. In addition, *key MUST be
initialised to zero before calling scramble() for the first time.
*/ */
extern char *scramble (int key, char *restrict buf, int bufsize); extern char *scramble (char *restrict dest, const char *restrict src,
size_t size, unsigned int *restrict key);
/* /*
Function: unscramble - Unscramble (decrypt) the buffer Function: unscramble - Unscramble (decrypt) the buffer
Parameters: key - Encryption/decryption key Parameters: dest - Pointer to output buffer
buf - Pointer to buffer to decrypt src - Pointer to input buffer to decrypt
bufsize - Size of buffer size - Size of output buffer
Returns: char * - Pointer to buffer key - Pointer to encryption/decryption key
Returns: char * - Pointer to output buffer or NULL on error
This function does the reverse of scramble(): it unscrambles (decrypts) This function does the reverse of scramble(): it unscrambles (decrypts)
the buffer *buf using an in-place algorithm. If key is zero, or buf is the buffer *src and places the result in *dest. If key is NULL, no
NULL or bufsize is less than 1, no decryption takes place. decryption takes place: the input buffer is copied to the output buffer
without changes.
The buffer should contain a C-style string terminated by '\0'. As for The buffer should contain a C-style string terminated by '\0'. Note
scramble(), the characters '\r', '\n' and '\0' will not be changed (nor that src and dest MUST point to different buffers. The pointer dest is
will any encrypted character map back to these values). At most returned as the output, unless there is an error in the data (such as a
bufsize bytes are decrypted; buf is returned as the result. corrupted checksum), in which case NULL is returned.
Note that *key MUST be initialised to zero before calling unscramble()
for the first time.
*/ */
extern char *unscramble (int key, char *restrict buf, int bufsize); extern char *unscramble (char *restrict dest, const char *restrict src,
size_t size, unsigned int *restrict key);
/************************************************************************ /************************************************************************