aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--Makefile.am19
-rw-r--r--configure.ac14
-rw-r--r--src/Makefile.am12
-rw-r--r--src/err-codes.h.in50
-rw-r--r--src/err-sources.h.in51
-rw-r--r--src/gpg/error.h15
-rw-r--r--src/mkstrtable.awk72
-rw-r--r--src/strerror.c17
-rw-r--r--src/strsource.c15
-rw-r--r--tests/Makefile.am13
-rw-r--r--tests/t-strerror.c15
12 files changed, 206 insertions, 111 deletions
diff --git a/ChangeLog b/ChangeLog
index 17cce48..e047951 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
2003-05-15 Marcus Brinkmann <[email protected]>
+ * src/mkstrtable.awk: Add exception clause to license about the
+ output of the script.
+ * configure.ac: Change license to LGPL 2.1 or later.
+ * Makefile.am: Likewise.
+ * src/Makefile.am: Likewise.
+ * src/err-codes.h.in: Likewise.
+ * src/err-sources.h.in: Likewise.
+ * src/strsource.c: Likewise.
+ * src/strerror.c: Likewise.
+ * src/gpg/error.h: Likewise.
+ * tests/Makefile.am: Likewise.
+
+ * src/mkstrtable.awk: New variable HEADER. Copy input until first
+ line with an actual code and description occurs.
+ * src/err-codes.h.in: Uncomment license, so it is copied into the
+ output.
+ * src/err-sources.h.in: Likewise.
+
+2003-05-15 Marcus Brinkmann <[email protected]>
+
+ * COPYING.LIB: New file.
+
+2003-05-15 Marcus Brinkmann <[email protected]>
+
* Initial check-in.
Copyright 2003 g10 Code GmbH
diff --git a/Makefile.am b/Makefile.am
index fcf05d8..fc97ad9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,22 @@
+# Makefile.am for libgpg-error.
+# Copyright (C) 2003 g10 Code GmbH
+#
+# This file is part of libgpg-error.
+#
+# libgpg-error is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# libgpg-error is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
SUBDIRS = m4 src tests po
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 4906531..2016894 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,19 +4,19 @@
# This file is part of libgpg-error.
#
# libgpg-error is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
#
# libgpg-error is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# GNU Lesser General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
+
# (Process this file with autoconf to produce a configure script.)
# Version number: Remember to change it immediately *after* a release.
diff --git a/src/Makefile.am b/src/Makefile.am
index 2972be5..76b2b5b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,17 +4,17 @@
# This file is part of libgpg-error.
#
# libgpg-error is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
#
# libgpg-error is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# GNU Lesser General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in
diff --git a/src/err-codes.h.in b/src/err-codes.h.in
index 708a82e..982005b 100644
--- a/src/err-codes.h.in
+++ b/src/err-codes.h.in
@@ -1,27 +1,31 @@
-# List of error codes and their description.
-# Copyright (C) 2003 g10 Code GmbH
-#
-# This file is part of libgpg-error.
-#
-# libgpg-error is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# libgpg-error is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# err-codes.h.in - List of error codes and their description input file.
+/* err-codes.h - List of error codes and their description.
+ Copyright (C) 2003 g10 Code GmbH
-# Empty lines are ignored. Other lines must have an error code
-# number, followed by exactly one <tab>, followed by the error
-# message. Trailing whitespace is removed. The error codes should be
-# sorted. The last line should not have a number, but only a <tab>,
-# followed by a description for error codes that are not in the list.
+ This file is part of libgpg-error.
+
+ libgpg-error is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ libgpg-error is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+# Everything up to the first line that starts with a number in the
+# first column is copied into the output verbatim. Then, empty lines
+# are ignored. Other lines must have an error code number, followed
+# by exactly one <tab>, followed by the error message. Trailing
+# whitespace is removed. The error codes should be sorted. The last
+# line should not have a number, but only a <tab>, followed by a
+# description for error codes that are not in the list.
0 Success
1 General error
diff --git a/src/err-sources.h.in b/src/err-sources.h.in
index 62d2437..9e3b7e8 100644
--- a/src/err-sources.h.in
+++ b/src/err-sources.h.in
@@ -1,28 +1,31 @@
-# List of error sources and their description.
-# Copyright (C) 2003 g10 Code GmbH
-#
-# This file is part of libgpg-error.
-#
-# libgpg-error is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# libgpg-error is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# err-sources.h.in - List of error sources and their description input file.
+/* err-sources.h - List of error sources and their description.
+ Copyright (C) 2003 g10 Code GmbH
-# Empty lines are ignored. Other lines must have an error code
-# number, followed by exactly one <tab>, followed by the error
-# message. Trailing whitespace is removed. The error sources should
-# be sorted. The last line should not have a number, but only a
-# <tab>, followed by a description for error sources that are not in
-# the list.
+ This file is part of libgpg-error.
+
+ libgpg-error is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ libgpg-error is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+# Everything up to the first line that starts with a number in the
+# first column is copied into the output verbatim. Then, empty lines
+# are ignored. Other lines must have an error code number, followed
+# by exactly one <tab>, followed by the error message. Trailing
+# whitespace is removed. The error sources should be sorted. The
+# last line should not have a number, but only a <tab>, followed by a
+# description for error sources that are not in the list.
0 Unspecified source
1 gcrypt
diff --git a/src/gpg/error.h b/src/gpg/error.h
index 9ddf09b..990a265 100644
--- a/src/gpg/error.h
+++ b/src/gpg/error.h
@@ -4,18 +4,19 @@
This file is part of libgpg-error.
libgpg-error is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
libgpg-error is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GPGME; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#ifndef GPG_ERROR_H
#define GPG_ERROR_H 1
diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
index a42bc07..8af96d2 100644
--- a/src/mkstrtable.awk
+++ b/src/mkstrtable.awk
@@ -1,20 +1,47 @@
+# mkstrtable.awk
# Copyright (C) 2003 g10 Code GmbH
+#
# This file is part of libgpg-error.
-
+#
# libgpg-error is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
# libgpg-error is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with libgnupg-error; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, g10 Code GmbH gives unlimited permission to
+# copy, distribute and modify the C source files that are the output
+# of mkstrtable.awk. You need not follow the terms of the GNU General
+# Public License when using or distributing such scripts, even though
+# portions of the text of mkstrtable.awk appear in them. The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the mkstrtable.awk program.
+#
+# Certain portions of the mkstrtable.awk source text are designed to be
+# copied (in certain cases, depending on the input) into the output of
+# mkstrtable.awk. We call these the "data" portions. The rest of the
+# mkstrtable.awk source text consists of comments plus executable code
+# that decides which of the data portions to output in any given case.
+# We call these comments and executable code the "non-data" portions.
+# mkstrtable.h never copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of mkstrtable.awk
+# released by g10 Code GmbH. When you make and distribute a modified version
+# of mkstrtable.awk, you may extend this special exception to the GPL to
+# apply to your modified version as well, *unless* your modified version
+# has the potential to copy into its output some of the text that was the
+# non-data portion of the version that you started with. (In other words,
+# unless your change moves or copies text from the non-data portions to the
+# data portions.) If your modification has such potential, you must delete
+# any notice of this special exception to the GPL from your modified version.
# This script outputs a source file that does define the following
# symbols:
@@ -53,15 +80,28 @@ BEGIN {
msg = 0;
print "/* Output of mkstrtable.awk. DO NOT EDIT. */";
print "";
- print "/* The purpose of this complex string table is to produce";
- print " optimal code with a minimum of relocations. */";
- print "";
- print "static const char msgstr[] = ";
+ header = 1;
+}
+
+/^#/ { next; }
+
+header {
+ if ($1 ~ /^[0123456789]+$/)
+ {
+ print "/* The purpose of this complex string table is to produce";
+ print " optimal code with a minimum of relocations. */";
+ print "";
+ print "static const char msgstr[] = ";
+ header = 0;
+ }
+ else
+ print;
}
-{
+!header {
sub (/\#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
if (/^$/)
next;
diff --git a/src/strerror.c b/src/strerror.c
index 8c41c38..8f78018 100644
--- a/src/strerror.c
+++ b/src/strerror.c
@@ -2,20 +2,21 @@
Copyright (C) 2003 g10 Code GmbH
This file is part of libgpg-error.
-
+
libgpg-error is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
libgpg-error is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GPGME; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#if HAVE_CONFIG_H
#include <config.h>
diff --git a/src/strsource.c b/src/strsource.c
index c0c4c8f..1d31ee2 100644
--- a/src/strsource.c
+++ b/src/strsource.c
@@ -4,18 +4,19 @@
This file is part of libgpg-error.
libgpg-error is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
libgpg-error is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GPGME; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#if HAVE_CONFIG_H
#include <config.h>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 57024de..c116a83 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,19 +1,20 @@
+# Makefile.am for libgpg-error/tests.
# Copyright (C) 2003 g10 Code GmbH
#
# This file is part of libgpg-error.
#
# libgpg-error is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
#
# libgpg-error is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# GNU Lesser General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
## Process this file with automake to produce Makefile.in
diff --git a/tests/t-strerror.c b/tests/t-strerror.c
index 6ff5440..499dd0a 100644
--- a/tests/t-strerror.c
+++ b/tests/t-strerror.c
@@ -4,18 +4,19 @@
This file is part of libgpg-error.
libgpg-error is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
libgpg-error is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GPGME; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with libgpgme-error; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#if HAVE_CONFIG_H
#include <config.h>