Index: trunk/ppNorm/src/ppNormErrorCodes.c.in
===================================================================
--- trunk/ppNorm/src/ppNormErrorCodes.c.in	(revision 11259)
+++ trunk/ppNorm/src/ppNormErrorCodes.c.in	(revision 11259)
@@ -0,0 +1,26 @@
+/*
+ * The line
+    { PPNORM_ERR_$X{ErrorCode}, "$X{ErrorDescription}"},
+ * (without the Xs)
+ * will be replaced by values from errorCodes.dat
+ */
+#include "pslib.h"
+#include "ppNormErrorCodes.h"
+
+void ppNormErrorRegister(void)
+{
+    static psErrorDescription errors[] = {
+       { PPNORM_ERR_BASE, "First value we use; lower values belong to psLib" },
+       { PPNORM_ERR_${ErrorCode}, "${ErrorDescription}"},
+    };
+    static int nerror = PPNORM_ERR_NERROR - PPNORM_ERR_BASE; // number of values in enum
+
+    for (int i = 0; i < nerror; i++) {
+       psErrorDescription *tmp = psAlloc(sizeof(psErrorDescription));
+       p_psMemSetPersistent(tmp, true);
+       *tmp = errors[i];
+       psErrorRegister(tmp, 1);
+       psFree(tmp);			/* it's on the internal list */
+    }
+    nerror = 0;			                // don't register more than once
+}
Index: trunk/ppNorm/src/ppNormErrorCodes.dat
===================================================================
--- trunk/ppNorm/src/ppNormErrorCodes.dat	(revision 11259)
+++ trunk/ppNorm/src/ppNormErrorCodes.dat	(revision 11259)
@@ -0,0 +1,10 @@
+#
+# This file is used to generate ppNormErrorClasses.h
+#
+BASE = 600		First value we use; lower values belong to psLib
+# these errors correspond to standard exit conditions
+ARGUMENTS               Incorrect arguments
+SYS                     System error
+CONFIG                  Problem in configure files
+PROG                    Programming error
+DATA                    invalid data
Index: trunk/ppNorm/src/ppNormErrorCodes.h.in
===================================================================
--- trunk/ppNorm/src/ppNormErrorCodes.h.in	(revision 11259)
+++ trunk/ppNorm/src/ppNormErrorCodes.h.in	(revision 11259)
@@ -0,0 +1,18 @@
+#if !defined(PPNORM_ERROR_CODES_H)
+#define PPNORM_ERROR_CODES_H
+/*
+ * The line
+ *  PPNORM_ERR_$X{ErrorCode},
+ * (without the X)
+ *
+ * will be replaced by values from errorCodes.dat
+ */
+typedef enum {
+    PPNORM_ERR_BASE = 512,
+    PPNORM_ERR_${ErrorCode},
+    PPNORM_ERR_NERROR
+} ppNormErrorCode;
+
+void ppNormErrorRegister(void);
+
+#endif
