[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for a pine source code maven



On Fri, 25 Dec 1998, Omer Zak wrote:

> So if there is anyone on Linux-IL mailing list, who is already familiar
> with the algorithms and source code of pine, can he/she help me by
> directing me to the relevant parts of the source code, and get me up to
> speed with modifying pine?

I have read some of the pine source. The viewer is what needs to be
modified first, then the hpico editor will have to be modified, but that's
another story.

There are three items here imho:

1. email subjects (appear in the inbox etc. listing)
2. email bodies
3. mime extensions

There are two major problems imho:

1. Detect logical vs. visual Hebrew and select the resp. algorythm
2. Handle mime extensions (which can be anything and include logical
Hebrew)

Mime extensions are recognized by pine and routed to the resp. program. 
(man pine: @MIME ; /etc/mailcap). The same mechanism can be used to make
pine route logical Hebrew (declared to be a bogus MIME type by the logical
detection algorythm) into a new viewer/module. 

This assumes that the part of the pine viewer that determines whether the
current message is a MIME or not, is to be patched, with a system() or
spawn() interface to an external program that can tell whether the message
is Hebrew (or Apache or Eskimo) and return a bogus MIME type for that
language/encoding, and then an external viewer specified for that bogus
MIME type in /etc/mailcap will be invoked for displaying. 

For index subjects, this will not work, so the logical detection algorythm
must be called twice for each message, once for the $SUBJ and once for the
body. It needs to be able to determine whether the text it sees is LTR,
RTL or non-Hebrew and return a flag. This function should become a part of
pine (lucky you: you get to write it ;).

Then, for a $SUBJ, the bidir converter should be called or execd before
the curses function call displays the resp. line, and ditto for the
viewer, unless a metamail viewer is used.

The easiest incarnation of the viewer, imho, is a UNIX filter that
converts logical to visual Hebrew and pipes the output to less or such.
See /etc/mailcap @ ISO-8859-8 for more on this. 

My mailcap is antique:
-rw-r--r--   1 root     root        10203 Dec 11  1995 /etc/mailcap

Also rtfm metamail(1) imho.

I will look into the sources over the weekend.

hope this helps,

Peter