Date: Wed, 07 Nov 2001 23:15:04 +0100
From: Gert-Jan Vons <gert-jan@bigfoot.com>
To: aaron@ardiri.com
Subject: Pilrc

Hello Aaron,

some feedback on the pilrc manual page:

- the attached patch fixes some typos (calcuations ->
   calculations, widht -> width, seperate -> separate)

- the manpage does not mention that pilrc replaces any
   "..." it finds in any string (menu or other) with the
   0x85 char, which is the PalmOS <3.1 code for the ellipsis.

   This even works fine for most PalmOS >=3.1 versions since
   both 0x18 and 0x85 represent the ellipsis. Except for
   Japanese ROMs, where 0x85 is some kind of grey rectangle...

   I'm not sure if (and how) pilrc can help working around this
   incompatibility (an option that disables the special handling
   of the "..." ?), but it would help if the manpage mentions
   that pilrc replaces all occurrences of "..." with the old,
   PalmOS <3.1 code for the ellipsis char (0x85) and that there
   can be a problem with (japanese versions of) PalmOS >=3.1 .

   It seems that the -PalmRez option forces the use of the 0x18
   code for the ellipsis, but that option also seems to trigger
   other things that I don't fully understand after a quick glance
   through the code (the manual page doesn't help much either :)

Regards,

         Gert-Jan


--- manual.html.org     Wed Nov  7 22:49:10 2001
+++ manual.html Wed Nov  7 22:58:25 2001
@@ -252,7 +252,7 @@
    </td>
    <td valign=top>
    <font face="Arial,Helvetica">
-  Use Chinese (Big5) font widhts for AUTO width calcuations.
+  Use Chinese (Big5) font widths for AUTO width calculations.
    </font>
    </td>
  </tr>
@@ -264,7 +264,7 @@
    </td>
    <td valign=top>
    <font face="Arial,Helvetica">
-  Use Chinese (GB) font widhts for AUTO width calcuations.
+  Use Chinese (GB) font widths for AUTO width calculations.
    </font>
    </td>
  </tr>
@@ -276,7 +276,7 @@
    </td>
    <td valign=top>
    <font face="Arial,Helvetica">
-  Use Korean font widhts for AUTO width calcuations (Hanme font)
+  Use Korean font widths for AUTO width calculations (Hanme font)
    </font>
    </td>
  </tr>
@@ -288,7 +288,7 @@
    </td>
    <td valign=top>
    <font face="Arial,Helvetica">
-  Use Korean font widhts for AUTO width calcuations (Hantip font)
+  Use Korean font widths for AUTO width calculations (Hantip font)
    </font>
    </td>
  </tr>
@@ -471,7 +471,7 @@
      <td valign=top>
      <font face="Arial,Helvetica">
      multi line string <br>
-    <tt>PilRC</tt> will concatenate strings on seperate lines <br>
+    <tt>PilRC</tt> will concatenate strings on separate lines <br>
      example: <tt>"Now is the time for all good " \</tt> <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@@ -1407,7 +1407,7 @@
  and increase sequentially.
  <li>
  The bitmap referenced by the <tt>FORMBITMAP</tt> tag must appear as a
-seperate resource in the rcp file via the
+separate resource in the rcp file via the
  <tt><a href="#lang_bitmap">BITMAP</a></tt> tag.
  <li>
  <tt>MAXCHARS</tt> is required for <tt>FIELD</tt> tag to work properly.


Date: Sat, 10 Nov 2001 21:20:18 +0100 
From: Gert-Jan Vons <vons@iname.com> 
To: aaron@ardiri.com 
Subject: pilrc -noEllipsis 

Hello Aaron, 

the attached patch adds a "-noEllipsis" option to pilrc, which 
disables all the special ellipsis treatment. 

This way, I can get real "..." dots in my resource, and not worry 
about 0x85 being replaced with 0x18 or vice versa. 

Since it may be of interest to other users (and it would avoid building my 
own version every time :), I'm sending you the patch so that it can be 
integrated. But that is up to you of course... 

I only build pilrc under Windows, the patch should also work fine 
for Unix builds. 

Regards, 

     Gert-Jan 

===
diff -rc old/pilrc-2.8p7/doc/manual.html pilrc-2.8p7/doc/manual.html
*** old/pilrc-2.8p7/doc/manual.html     Thu Aug 09 14:52:34 2001
--- pilrc-2.8p7/doc/manual.html Sat Nov 10 20:05:08 2001
***************
*** 109,116 ****
  <pre>
  pilrc   [-L LANGUAGE] [-I INCLUDE PATH] [-D MACRO(=VAL)]
        [-R RESFILE] [-H INCLUDE PATH] [-ro] [-q] [-V]
!       [-Fh] [-Fj] [-F5] [-Fg] [-Fkm] [-Fkt] [-allowEditID] [-LE32]
!       [-o OUTPUTPATH] file.rcp [output path]
  pilrcui [-L LANGUAGE] file.rcp</pre>
  <font face="Arial,Helvetica">

--- 109,116 ----
  <pre>
  pilrc   [-L LANGUAGE] [-I INCLUDE PATH] [-D MACRO(=VAL)]
        [-R RESFILE] [-H INCLUDE PATH] [-ro] [-q] [-V]
!       [-Fh] [-Fj] [-F5] [-Fg] [-Fkm] [-Fkt] [-allowEditID]
!       [-noEllipsis] [-LE32] [-o OUTPUTPATH] file.rcp [output path]
  pilrcui [-L LANGUAGE] file.rcp</pre>
  <font face="Arial,Helvetica">

***************
*** 301,306 ****
--- 301,318 ----
    <td valign=top>
    <font face="Arial,Helvetica">
    Allow the use of "edit menu" ID values (10000-10007 inclusive).
+   </font>
+   </td>
+ </tr>
+ <tr>
+   <td valign=top>
+   <font face="Arial,Helvetica">
+   -noEllipsis
+   </font>
+   </td>
+   <td valign=top>
+   <font face="Arial,Helvetica">
+   Disable special handling of "..." and ellipsis character.
    </font>
    </td>
  </tr>
diff -rc old/pilrc-2.8p7/main.c pilrc-2.8p7/main.c
*** old/pilrc-2.8p7/main.c      Thu Aug 09 14:52:30 2001
--- pilrc-2.8p7/main.c  Sat Nov 10 20:07:29 2001
***************
*** 73,78 ****
--- 73,79 ----
       "        -q           Less noisy output\n"
       "        -V           Generate M$ (VS-type) error/warning output\n"
       "        -allowEditID Allow edit menu IDs (10000-10007)\n"
+      "        -noEllipsis  Disable special handling of \"...\" and ellipsis char\n"
       "        -PalmRez     Generate res with PalmRez option\n"
       "        -LE32        Generate 32 bit little endian (ARM, NT) resources\n"
       "        -Loc <code>  Compile only res with the attribute LOCALE \"code\"\n"
***************
*** 228,233 ****
--- 229,241 ----
      if (FSzEqI(rgszArg[i], "-allowEditID"))
      {
        vfAllowEditIDs = fTrue;
+       continue;
+     }
+
+     // disable ellipsis processing ?
+     if (FSzEqI(rgszArg[i], "-noEllipsis"))
+     {
+       vfNoEllipsis = fTrue;
        continue;
      }

diff -rc old/pilrc-2.8p7/pilrc.c pilrc-2.8p7/pilrc.c
*** old/pilrc-2.8p7/pilrc.c     Thu Aug 09 14:52:30 2001
--- pilrc-2.8p7/pilrc.c Sat Nov 10 20:14:45 2001
***************
*** 121,126 ****
--- 121,131 ----
  BOOL vfAllowEditIDs;

  /*
+  *  Disables ellipsis processing
+  */
+ BOOL vfNoEllipsis;
+
+ /*
   * Quiet output
   */
  BOOL vfQuiet;
***************
*** 3015,3035 ****
            UngetTok();
            mi.itemStr = PchGetSz("Item Text");
            cch = strlen(mi.itemStr);
!           // pilot has a special ... character
!           // the ASCII value can be 0x18 or 0x85
!           if (cch >= 3 && strcmp(&mi.itemStr[cch - 3], "...") == 0)
!           {
!             if (vfPalmRez)
!               mi.itemStr[cch - 3] = (char)0x18;
!             else
!               mi.itemStr[cch - 3] = (char)0x85;
!             mi.itemStr[cch - 2] = 0;
!           }
!           else                                   // RMa
!           if ((vfPalmRez) && (mi.itemStr[cch - 1] == (char)0x85))
!           {
!             mi.itemStr[cch - 1] = (char)0x18;
!           }
            mi.id = WGetId("CommandId", fFalse);
            if (vfPalmRez)
              previousID = mi.id + 1;              // RMa
--- 3020,3045 ----
            UngetTok();
            mi.itemStr = PchGetSz("Item Text");
            cch = strlen(mi.itemStr);
!
!         // Only apply special treatment of Ellipsis if user is ok
!           if (!vfNoEllipsis)
!         {
!           // pilot has a special ... character
!           // the ASCII value can be 0x18 or 0x85
!           if (cch >= 3 && strcmp(&mi.itemStr[cch - 3], "...") == 0)
!           {
!             if (vfPalmRez)
!               mi.itemStr[cch - 3] = (char)0x18;
!               else
!               mi.itemStr[cch - 3] = (char)0x85;
!             mi.itemStr[cch - 2] = 0;
!           }
!           else                                   // RMa
!           if ((vfPalmRez) && (mi.itemStr[cch - 1] == (char)0x85))
!           {
!             mi.itemStr[cch - 1] = (char)0x18;
!           }
!         }
            mi.id = WGetId("CommandId", fFalse);
            if (vfPalmRez)
              previousID = mi.id + 1;              // RMa
***************
*** 3551,3570 ****
    }

    cch = strlen(pchString);                       // RMa add
!   // pilot has a special ... character
!   // the ASCII value can be 0x18 or 0x85
!   if (cch >= 3 && strcmp((pchString + cch - 3), "...") == 0)
!   {
!     if (vfPalmRez)
!       *(pchString + cch - 3) = (char)0x18;
!     else
!       *(pchString + cch - 3) = (char)0x85;
!     *(pchString + cch - 2) = 0;
!   }
!   else                                           // RMa
!   if ((vfPalmRez) && (*(pchString + cch - 1) == (char)0x85))
    {
!     *(pchString + cch - 1) = (char)0x18;
    }

    OpenOutput(kPalmResType[kStrRscType], id);     /* RMa "tSTR" */
--- 3561,3585 ----
    }

    cch = strlen(pchString);                       // RMa add
!
!   // Only apply special treatment of Ellipsis if user is ok
!   if (!vfNoEllipsis)
    {
!     // pilot has a special ... character
!     // the ASCII value can be 0x18 or 0x85
!     if (cch >= 3 && strcmp((pchString + cch - 3), "...") == 0)
!     {
!       if (vfPalmRez)
!       *(pchString + cch - 3) = (char)0x18;
!       else
!       *(pchString + cch - 3) = (char)0x85;
!       *(pchString + cch - 2) = 0;
!     }
!     else                                           // RMa
!     if ((vfPalmRez) && (*(pchString + cch - 1) == (char)0x85))
!     {
!       *(pchString + cch - 1) = (char)0x18;
!     }
    }

    OpenOutput(kPalmResType[kStrRscType], id);     /* RMa "tSTR" */
diff -rc old/pilrc-2.8p7/pilrc.h pilrc-2.8p7/pilrc.h
*** old/pilrc-2.8p7/pilrc.h     Thu Aug 09 14:52:32 2001
--- pilrc-2.8p7/pilrc.h Sat Nov 10 07:22:53 2001
***************
*** 2342,2347 ****
--- 2342,2348 ----
  extern BOOL vfAutoId;
  extern BOOL vfQuiet;
  extern BOOL vfAllowEditIDs;
+ extern BOOL vfNoEllipsis;
  extern BOOL vfPalmRez;
  extern BOOL vfVSErrors;
  extern BOOL vfCheckDupes;