Date: Mon, 16 Jul 2001 16:44:42 -0700
From: Neil Rhodes <neil-list@calliopeinc.com>
To: Aaron Ardiri <ardiri@hig.se>
Subject: Requested changes to 2.8p6

Aaron,

I've updated to 2.8p6.

There are only a few changes I need in order to use the PilRC sources as-is
(thanks for the changes you've made so far).

Here they are:

In makekbd.c:

In createAndSaveCountryKeyboard(),
change the *two* occurences of:
  pRunning = (char *)(pkeyboardLayout + 5);
to:
 pRunning = (unsigned char *)(pkeyboardLayout + 5);

I
In util.c,
change:
#include "Extra.h"                               // <-- neil, where is this
file? :P
to:
#include "Extra.h"     // This file is part of the plugin sources; not part
of the regular pilrc sources

In ErrorLine2(),
change:
  CWErrorLine2(sz, sz2);
to:
  CWErrorLine2(sz, sz2, iline);

In WarningLine()
change:
  CWWarningLine(sz);
to:
  CWWarningLine(sz, iline);

In DumpBytes(),
change:
#ifdef CW_PLUGIN
  CWDumpBytes(pv, cb);
#else
to:
#ifdef CW_PLUGIN
  CWDumpBytes(pv, cb);
  ibOut += cb;
#else

In OpenOutput()
change:
#ifdef CW_PLUGIN
  CWOpenOutput(szBase, id);
#else
to:
#ifdef CW_PLUGIN
  CWOpenOutput(szBase, id);
  ibOut = 0;
#else

In util.h
change:
#define MAXPATHS 64
extern char *includePaths[];
extern int totalIncludePaths;

#endif
to:
#define MAXPATHS 64
extern char *includePaths[];
extern int totalIncludePaths;

#ifdef CW_PLUGIN
// XXX ncr
#undef feof
#define feof(f)    MyFeof(f)
#endif

#endif


n pilrc.c, there's a memory leak which can be fixed.
In ParseFile(),
change:
  FreeSymTable();
  FreeTranslations();
  CloseResFile();
  if (vfPrc)
    CloseResDBFile();
to:
  FreeSymTable();
  FreeTranslations();
  CloseResFile();
  FreeRcpfile(prcpfile);
  if (vfPrc)
    CloseResDBFile();


Also, I've changed the webpage to:
<http://www.calliopeinc.com/pilrcplugin.html>

If you can make those changes, I can drop in the PilRC sources unchanged and
rebuild very quickly from now on.

Thanks,

Neil

----
Date: Wed, 01 Aug 2001 10:12:33 -0700
From: Neil Rhodes <neil-list@calliopeinc.com>
To: Aaron Ardiri <ardiri@hig.se>
Subject: PilRC bug in : Incorrect default button ID

Aaron:

Two problems with respect to default buttons and alerts in PilRC 2.8p6:

1) There's an off-by-one error in checking for valid button numbers (it
allows default button IDs from 0 to number of buttons rather than number of
buttons - 1.

2) If there's only one button, the default is incorrect (it should be 0 and
it's 1).

To fix both, in ParseDumpAlert , change:

WriteAlert:
  at.numButtons = itm.numItems;
  if (at.numButtons > 0 && at.defaultButton > at.numButtons)
    ErrorLine("Invalid default button number");

  if ((!at.defaultButton) && (at.numButtons == 1))
    at.defaultButton = 1;


to:
WriteAlert:
  at.numButtons = itm.numItems;
  if (at.numButtons > 0 && at.defaultButton >= at.numButtons)
    ErrorLine("Invalid default button number");

  if ((!at.defaultButton) && (at.numButtons == 1))
    at.defaultButton = 0;


----
Date: Wed, 01 Aug 2001 13:11:38 -0700
From: Neil Rhodes <neil@pobox.com>
To: Ardiri@hig.se
Subject: Updated fix for default button in alert

Aaron,

Correct fix is:

WriteAlert:
  at.numButtons = itm.numItems;
  if (at.numButtons > 0 && at.defaultButton >= at.numButtons)
    ErrorLine("Invalid default button number");

Neil