Little better error messages.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Thu, 13 Dec 2001 19:47:20 +0000 (19:47 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Thu, 13 Dec 2001 19:47:20 +0000 (19:47 +0000)
gedcom/encoding.c
gedcom/gedcom_lex_common.c

index 0c7af44d652b855ed6e71912b430e0484bc7ac4a..8b980acb944a74a976a1148fb3387a20442e1a1c 100644 (file)
@@ -81,7 +81,7 @@ char* get_encoding(char* gedcom_n, ENCODING enc)
   datum = tfind(&search_node, &encoding_mapping, node_compare);
   free(buffer);
   if (datum == NULL) {
-    gedcom_error(_("No encoding found for '%s'"), gedcom_n);
+    gedcom_error(_("No encoding defined for '%s'"), gedcom_n);
     return NULL;
   }
   else {
@@ -118,8 +118,7 @@ void init_encodings()
                GCONV_SEARCH_PATH, gconv_path, PKGDATADIR);
       }
       if (putenv(new_gconv_path) != 0) {
-       gedcom_warning(_("Failed updating environment variable %s"),
-                      GCONV_SEARCH_PATH);
+       gedcom_warning(_("Failed updating conversion module path"));
       }
     }
     
@@ -135,6 +134,7 @@ void init_encodings()
                     ENCODING_CONF_FILE);
     }
     else {
+      line_no = 1;
       while (fgets(buffer, sizeof(buffer), in) != NULL) {
        if (buffer[strlen(buffer) - 1] != '\n') {
          gedcom_error(_("Line too long in encoding configuration file '%s'"),
index 93c26f3bf6197f4e772f80b154b3d1297dd9f33d..e1c17bb78b12dfb89b510a086d4cdc5d1282d7f4 100644 (file)
@@ -97,7 +97,7 @@ int test_loop(ENCODING enc, char* code)
   { if (line_len != (size_t)-1) {                                             \
       line_len += strlen(yytext);                                             \
       if (line_len > MAXGEDCLINELEN * encoding_width) {                       \
-        gedcom_error(_("Line too long, max %d characters"),                   \
+        gedcom_error(_("Line too long, max %d characters allowed"),           \
                     MAXGEDCLINELEN);                                         \
         line_len = (size_t)-1;                                                \
         return BADTOKEN;                                                      \
@@ -170,7 +170,7 @@ int test_loop(ENCODING enc, char* code)
 
 
 #define ACTION_0_DIGITS                                                       \
-   { gedcom_error (_("Level number with leading zero"));                      \
+   { gedcom_error (_("Level number with leading zero not allowed"));          \
      return BADTOKEN;                                                         \
    } 
 
@@ -206,7 +206,7 @@ int test_loop(ENCODING enc, char* code)
 
 #define ACTION_ALPHANUM                                                       \
    { if (strlen(yytext) > MAXGEDCTAGLEN * encoding_width) {                   \
-       gedcom_error(_("Tag '%s' too long, max %d characters"),                \
+       gedcom_error(_("Tag '%s' too long, max %d characters allowed"),        \
                    yytext, MAXGEDCTAGLEN);                                   \
        return BADTOKEN;                                                       \
      }                                                                        \
@@ -248,7 +248,7 @@ int test_loop(ENCODING enc, char* code)
 #define ACTION_POINTER                                                        \
   { CHECK_LINE_LEN;                                                           \
     if (strlen(yytext) > MAXGEDCPTRLEN * encoding_width) {                    \
-      gedcom_error(_("Pointer '%s' too long, max %d characters"),             \
+      gedcom_error(_("Pointer '%s' too long, max %d characters allowed"),     \
                   yytext, MAXGEDCPTRLEN);                                    \
       return BADTOKEN;                                                        \
     }                                                                         \