[imp] Libhttpd.ep and ispell

Brad Hazledine brad.hazledine@caledoncard.com
Wed, 27 Feb 2002 09:07:49 -0500 (EST)


>From man ispell...

  It is recommended that programmatic interfaces prefix every data line
with an uparrow to protect themselves
against future changes in ispell.

It has made a huge difference...no more problems at all. ..(we are still
calling the C code).

Brad


On Tue, 26 Feb 2002, Chuck Hagenbuch wrote:

> Quoting Brad Hazledine <brad.hazledine@caledoncard.com>:
>
> > This seems to work....
> >
> > #include<stdio.h>
> >
> > int main(void) {
> >         int i,c;
> >         i=0;
> >         fputc('^',stdout);
> >         while ((i<4000000) && (!feof(stdin))) {
> >                 i++;
> >                 c=fgetc(stdin);
> >                 if (!feof(stdin)) {
> >                         if (c=='\r') c='\n';
> >                         fputc(c,stdout);
> >                         if (c=='\n') fputc('^',stdout);
> >                 }
> >         }
> >         fclose(stdout);
> >         fclose(stdin);
> > }
> >
> > And we changed the line to...
> > exec("echo $tocheck | prefixer | " . $conf['utils']['spellchecker'] . ' -a '
> > .
> > $spell_opt, $warnings);
>
> I'm not entirely sure I'm processing what that's doing correctly, but adding
> this:
>
> $tocheck = str_replace("\n", "\n^", $tocheck);
>
> before the exec line seems to have the same effect? Can anyone confirm this?
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> "A dream which helps you to live your reality with dignity
>  and justice is a good dream." - Tariq Ramadan
>
>


Brad Hazledine <brad.hazledine@caledoncard.com>
Caledon Card Services
P.O. Box 81, 11672 Trafalgar Rd.
Georgetown, Ontario L7G 4T1
Phone (905) 702-9909
Fax   (905) 702-9907

WWW: http://www.caledoncard.com

-------------------------------------------------------------------------------------------------
This email and any files transmitted with it are CONFIDENTIAL
and are intended solely for the use of the individual or entity
to whom it is addressed. If you are not the intended recipient
or the person responsible for delivering the email to the intended
recipient, be advised that you have received this email in error
and that any use, dissemination, forwarding, printing or copying
of this email is strictly prohibited.
-------------------------------------------------------------------------------------------------