pilot-link-0.9.5-pre6 patches

2001-07-04 Thread Vadim Zaliva

Hi!

Currently 'read-expenses' application included with pilot-link package is
not very useful, since it produces unstructured output, which is difficult
to parse and process.

For personal needs, I've done small hack: I've modified 'read-expenses' to
produce XML output. Then I wrote small XSLT transformation to convert this
XML file into HTML page, which could be printed and attached to your
expense report.

To run XSLT transformation, you need command 'xsltproc' which is part
of 'libxslt' package, which could be downloaded from
http://xmlsoft.org/

My code could be freely distributed under GPL. I hope you find it usefule
and it perhaps be included into pilot-link contrib.

The file is attached.

Sincerely,
Vadim Zaliva [EMAIL PROTECTED]


-- 
;;--+---+
;; Vadim Zaliva + Those who do not understand Unix  +
;; mailto:[EMAIL PROTECTED]+ are condemned to reinvent it, +
;; http://www.crocodile.org + poorly.  (H. Spencer) +
;;--+---+

 expense-xml.tar.gz


pilot-link-0.9.5-pre6 patches

2001-05-16 Thread Oliver Schmidt

Hi,

in file dlp.c in line 239 the following was inserted:

  /* Seems like year comes back as all zeros if the date is empty
   * (but other fields can vary).  And mktime() chokes on 1900 B.C.
   * (result of 0 minus 1900), returning -1, which the higher level
   * code can't deal with (passes it straight on to utime(), which
   * simply leaves the file's timestamp as-is).
   *
   * So, since year 0 appears to mean no date, we'll return an odd
   * number that works out to precisely one day before the start of
   * the Palm's clock (thus little chance of being run into by any
   * Palm-based time stamp).
   */
  if (data[0] == 0  data[1] == 0)
return (time_t) 0x83D8FE00;  /* Dec 31, 1903 00:00:00 GMT */

While the year 1903 is surely a cool idea using a negative value causes some 
unnecessary problems - at least for the MS VC++ 6.0 c-runtime. For example the 
function gmtime() begins like this:

struct tm * __cdecl gmtime (const time_t *timp)
{
  long caltim = *timp;/* calendar time to convert */

[...]

  if ( caltim  0L )
return(NULL);

After all this leads to the effect that the change in dlp.c simply doesn't work. 
Therefore I'd vote to rather returning 0 meaning Jan 1, 1970 00:00:00 GMT.

Oliver Schmidt
__
Ferienklick.de - 225 Reisekataloge auf einen Blick!
Direkt zu Ihrem Traumurlaub: http://ferienklick.de/?PP=2-0-100-105-0

___
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix



RE: pilot-link-0.9.5-pre6 patches

2001-05-04 Thread Oliver Schmidt

  file: winserial.c, reason: poor error handling, fixes:
 
  56c56
 errno = ENOENT;
  ---
 errno = GetLastError();
 
   Can you resend this in a unified diff, assuming your OS 
 can create
 a sane diff? Manual diffing is a pain sometimes.

A 'unified' diff ??? ... and I was already proud to get produced what I sent before 
... obviously I didn't manage not outing myself as a non-unix guy ...

   diff -urBb should do that.

That helps :-)


--- orgwinserial.c  Mon Apr 30 09:15:33 2001
+++ winserial.c Wed May 02 13:58:50 2001
@@ -53,7 +53,7 @@
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (fd == INVALID_HANDLE_VALUE) {
/*can't open */
-   errno = ENOENT;
+   errno = GetLastError();
return -1;
}

@@ -119,7 +119,8 @@

if (rc)
return 0;
-   else
+
+   errno = GetLastError();
return -1;
 }


--- orgserial.c Mon Apr 30 09:15:31 2001
+++ serial.cWed May 02 14:05:37 2001
@@ -127,7 +127,8 @@
if (c.flags  0x80) {
/* Change baud rate */
ps-rate = c.baudrate;
-   ps-serial_changebaud(ps);
+   if (ps-serial_changebaud(ps)  0)
+   return -1;
}

} else if (c.type == 3) {
@@ -276,7 +277,8 @@
pi_serial_flush(accept);

/* We always reconfigure our port, no matter what */
-   accept-serial_changebaud(accept);
+   if (accept-serial_changebaud(accept)  0)
+   goto fail;

/* Palm device needs some time to reconfigure its port */
 #ifdef WIN32


eof
___
Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://web.de
Die große Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.web.de

___
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix



Re: pilot-link-0.9.5-pre6 patches

2001-05-02 Thread David A. Desrosiers


 file: winserial.c, reason: poor error handling, fixes:

 56c56
errno = ENOENT;
 ---
errno = GetLastError();

Can you resend this in a unified diff, assuming your OS can create
a sane diff? Manual diffing is a pain sometimes.

diff -urBb should do that.


/d


___
Pilot-unix mailing list
[EMAIL PROTECTED]
http://hcirisc.cs.binghamton.edu/mailman/listinfo/pilot-unix