mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
60a69daec6
This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
52 lines
2.3 KiB
Plaintext
52 lines
2.3 KiB
Plaintext
README file for pspell (spellchecker) module for PHP
|
|
----------------------------------------------------
|
|
|
|
The latest release of pspell is always available from
|
|
|
|
http://aspell.net/
|
|
|
|
This module was developed and tested with aspell-.31.1 and pspell-.11.0.2,
|
|
although slightly earlier (and hopefully later) versions of those libraries
|
|
should work as well.
|
|
|
|
General notes
|
|
-------------
|
|
|
|
Please, note that somewhere around version .27.x (I believe) aspell stopped
|
|
working with the aspell module for php. This is due to the fact that the
|
|
author changed things around a bit, and suggested that people link to pspell
|
|
in the future rather than to aspell. That's exactly what this module is for.
|
|
It has the same basic functionality as aspell (and more features are being
|
|
added). I did not want to modify existing aspell module, because it would
|
|
break things for those who are using older aspell, or result in very ugly code.
|
|
Rather, I wrote a new module - pspell.
|
|
|
|
|
|
Building pspell on a Unix system
|
|
--------------------------------
|
|
|
|
In order to use pspell, you need to have *both* aspell and pspell libraries
|
|
installed, and they have to be compatible with each other. Get the latest
|
|
release of both at the URL given above.
|
|
|
|
I expect the libraries to be in /usr/local (that's the default when you
|
|
cofigure pspell and aspell with their 'configure' scripts woth no parameters).
|
|
If that location is different, please specify it in --with-pspell=PATH, where
|
|
PATH is the path you specified for pspell libraries.
|
|
|
|
Notes on personalized dictionaries
|
|
----------------------------------
|
|
|
|
It is now possible to have personalized dictionaries with pspell. This is
|
|
achieved by opening a dictionary with pspell_new_personal() rather than
|
|
pspell_new() and specifying the custom dictionary as the first parameter.
|
|
The parameter probably should begin with '/' because otherwise it will
|
|
be relative to $HOME, which is probably set to "/root". This is probably not
|
|
what you want because you need write access for nobody to be able to write
|
|
to a dictionary. Once the dictionary is open, you can use
|
|
pspell_add_to_personal() to add words to the wordlist and finally
|
|
pspell_save_wordlist() to save it.
|
|
|
|
Note that at this moment pspell_save_wordlist() will return TRUE, even if
|
|
there was an error. This will be changed once pspell library is fixed.
|