~ubuntu-branches/ubuntu/feisty/aspell/feisty

« back to all changes in this revision

Viewing changes to auto/mk-src.in

  • Committer: Bazaar Package Importer
  • Author(s): Brian Nelson
  • Date: 2005-10-25 23:43:21 UTC
  • mfrom: (0.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051025234321-6mttbd3m82liomkh
Tags: 0.60.4-1
* New upstream release

* debian/patches/10_autotools: regenerated

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# mk-src.in -- Input file for the Perl program to automatically 
 
2
# mk-src.in -- Input file for the Perl program to automatically
3
3
#              generate interface code.
4
4
#
5
5
# This file is part of The New Aspell
6
 
# Copyright (C) 2001 by Kevin Atkinson under the GNU LGPL
 
6
# Copyright (C) 2001-2005 by Kevin Atkinson under the GNU LGPL
7
7
# license version 2.0 or 2.1.  You should have received a copy of the
8
8
# LGPL license along with this library if you did not you can find it
9
9
# at http://www.gnu.org/.
12
12
 
13
13
The format of mk-src.in is as follows:
14
14
 
15
 
  The following charaters are literals: { } / '\ ' \n = >
 
15
  The following characters are literals: { } / '\ ' \n = >
16
16
 
17
17
  <items>
18
18
  <items> := (<item>\n)+
23
23
 
24
24
  <<tab>> means everything should be indented by one tab
25
25
 
26
 
See MkSrc::Info for a description of the categorys and options
 
26
See MkSrc::Info for a description of the categories and options
27
27
 
28
28
=cut
29
29
 
44
44
methods: destructible
45
45
        /
46
46
        destructor
47
 
        
 
47
 
48
48
#       int: ref count
49
49
#               default => 0
50
50
#
51
51
#       method: ref count
52
 
#               desc => returns a pointer to an int which may be used
53
 
#                       for refrence counting.  It will default to 0.
 
52
#               desc => Returns a pointer to an int which may be used
 
53
#                       for reference counting. It will default to 0.
54
54
#                       This integer is not used by the actual library
55
55
#                       but may be used my some of the front ends.
56
56
#               c only
65
65
#       type id: type id
66
66
#
67
67
#       method: type id
68
 
#               desc => To objects of the same pointer type may be
69
 
#                       assigned to each other only if there type ids 
 
68
#               desc => Two objects of the same pointer type may be
 
69
#                       assigned to each other only if their type ids
70
70
#                       are the same.
71
71
#               cxx impl => return type_id_.num
72
72
#               /
77
77
#
78
78
#       method: copyable
79
79
#               desc => Returns 0 if this object can not be copied,
80
 
#                       1 if it may be copies, 2 if it should be
81
 
#                       copyied.  Used by some of the front end to
82
 
#                       detrime if a deep or shallow copy should be 
 
80
#                       1 if it may be copied, 2 if it should be
 
81
#                       copied.  Used by some of the front ends to
 
82
#                       determine if a deep or shallow copy should be
83
83
#                       made.
84
84
#               cxx impl => return copyable_
85
85
#               /
89
89
                const
90
90
                /
91
91
                $
92
 
        
 
92
 
93
93
        method: assign
94
94
                /
95
95
                void
154
154
        mutable container methods
155
155
}
156
156
methods: list
157
 
        
 
157
 
158
158
        strip => 1
159
159
        /
160
160
        method: empty
175
175
methods: enumeration
176
176
 
177
177
        strip => 1
178
 
        
 
178
 
179
179
        /
180
180
        method: at end
181
181
                const
199
199
 
200
200
struct: key info
201
201
        desc => The Key Info object is used for holding information
202
 
                about a valid key
 
202
                about a valid key.
203
203
        /
204
204
        string: name
205
 
                desc => the name of the key
 
205
                desc => The name of the key.
206
206
        key info type: type
207
 
                desc => the key type
 
207
                desc => The key type.
208
208
        string: def
209
 
                desc => the default value of the key
 
209
                desc => The default value of the key.
210
210
        string: desc
211
 
                desc => a brief description of the key or null if internal value
 
211
                desc => A brief description of the key or NULL if internal value.
212
212
        int: flags
213
213
        int: other data
214
 
}       
 
214
}
215
215
group: config
216
216
{
217
217
no native
231
231
        can have error methods
232
232
 
233
233
        method: set extra
234
 
                desc => sets extra keys which this config class should accept
235
 
                        begin and end are expected to point to the begging 
236
 
                        and end of an array of Aspell Key Info
 
234
                desc => Sets extra keys which this config class should
 
235
                        accept. begin and end are expected to point to
 
236
                        the beginning and ending of an array of Aspell
 
237
                        Key Info.
237
238
                /
238
239
                void
239
240
                const key info: begin
241
242
 
242
243
        method: keyinfo
243
244
                posib err
244
 
                desc => returns the KeyInfo object for the
245
 
                        corresponding key or returns null and sets
 
245
                desc => Returns the KeyInfo object for the
 
246
                        corresponding key or returns NULL and sets
246
247
                        error_num to PERROR_UNKNOWN_KEY if the key is
247
248
                        not valid. The pointer returned is valid for
248
249
                        the lifetime of the object.
251
252
                string: key
252
253
 
253
254
        method: possible elements
254
 
                desc => returns a newly allocated enumeration of all the 
255
 
                        possible objects this config class uses
 
255
                desc => Returns a newly allocated enumeration of all
 
256
                        the possible objects this config class uses.
256
257
                /
257
258
                key info enumeration
258
259
                int: include extra
259
260
 
260
261
        method: get default
261
262
                posib err
262
 
                desc => returns the default value for given key which
263
 
                        way involve substating variables, thus it is
264
 
                        not the same as keyinfo(key)->def returns null
 
263
                desc => Returns the default value for given key which
 
264
                        may involve substituting variables, thus it is
 
265
                        not the same as keyinfo(key)->def returns NULL
265
266
                        and sets error_num to PERROR_UNKNOWN_KEY if
266
267
                        the key is not valid. Uses the temporary
267
268
                        string.
270
271
                string: key
271
272
 
272
273
        method: elements
273
 
                desc => returns a newly alloacted enumeration of all the
274
 
                        key/value pairs. This DOES not include ones
275
 
                        which are set to their default values
 
274
                desc => Returns a newly allocated enumeration of all
 
275
                        the key/value pairs. This DOES not include ones
 
276
                        which are set to their default values.
276
277
                /
277
278
                string pair enumeration
278
279
 
279
280
        method: replace
280
281
                posib err
281
 
                desc => inserts an item, if the item already exists it
282
 
                        will be replaced. returns true if it succesed
283
 
                        or false on error. If the key in not valid it
 
282
                desc => Inserts an item, if the item already exists it
 
283
                        will be replaced. Returns TRUE if it succeeded
 
284
                        or FALSE on error. If the key in not valid it
284
285
                        sets error_num to PERROR_UNKNOWN_KEY, if the
285
 
                        value is not valid it will sets error_num to
 
286
                        value is not valid it will set error_num to
286
287
                        PERROR_BAD_VALUE, if the value can not be
287
288
                        changed it sets error_num to
288
289
                        PERROR_CANT_CHANGE_VALUE, and if the value is
289
 
                        a list and you are trying to set it directory
 
290
                        a list and you are trying to set its directory,
290
291
                        it sets error_num to PERROR_LIST_SET
291
292
                /
292
293
                void
295
296
 
296
297
        method: remove
297
298
                posib err
298
 
                desc => remove a key and returns true if it exists 
299
 
                        otherise return false. This effictly sets the
300
 
                        key to its default value. Calling replace with
301
 
                        a value of "<default>" will also call
302
 
                        remove. If the key does not exists sets
303
 
                        error_num to 0 or PERROR_NOT, if the key in
304
 
                        not valid sets error_num to
 
299
                desc => Remove a key and returns TRUE if it exists
 
300
                        otherwise return FALSE. This effectively sets
 
301
                        the key to its default value. Calling replace
 
302
                        with a value of "<default>" will also call
 
303
                        remove. If the key does not exist then it sets
 
304
                        error_num to 0 or PERROR_NOT, if the key is
 
305
                        not valid then it sets error_num to
305
306
                        PERROR_UNKNOWN_KEY, if the value can not be
306
 
                        changed sets error_num to
 
307
                        changed then it sets error_num to
307
308
                        PERROR_CANT_CHANGE_VALUE
308
309
                /
309
310
                void
317
318
 
318
319
        method: retrieve
319
320
                posib err
320
 
                desc => returns null on error
 
321
                desc => Returns NULL on error.
321
322
                /
322
323
                string obj
323
324
                string: key
331
332
 
332
333
        method: retrieve bool
333
334
                posib err
334
 
                desc => return -1 on error, 0 if false, 1 if true
 
335
                desc => Return -1 on error, 0 if false, 1 if true.
335
336
                /
336
337
                bool
337
338
                string: key
338
339
 
339
340
        method: retrieve int
340
341
                posib err
341
 
                desc => return -1 on error
 
342
                desc => Return -1 on error.
342
343
                /
343
344
                unsigned int
344
345
                string: key
383
384
                /
384
385
                error: e
385
386
        can have error methods
386
 
                prefix => 
 
387
                prefix =>
387
388
        destructible methods
388
389
}
389
390
group: errors
420
421
                /
421
422
                cant read dir
422
423
                        mesg => The directory "%dir" can not be opened for reading.
423
 
                        
 
424
 
424
425
        config
425
426
                parms => key
426
427
                /
446
447
                no_value_reset
447
448
                        mesg => The key "%key" does not take any parameters when prefixed by a "reset-".
448
449
                no_value_enable
449
 
                        mesg => The key "%key" does not take any parameters when prefixed by a "enable-".
 
450
                        mesg => The key "%key" does not take any parameters when prefixed by an "enable-".
450
451
                no_value_disable
451
452
                        mesg => The key "%key" does not take any parameters when prefixed by a "dont-" or "disable-".
452
453
                no_value_clear
510
511
                        mesg => The affix flag '%aff' can not be applied to word "%word".
511
512
                        parms => aff, word
512
513
                unknown unichar
513
 
                        mesg => 
 
514
                        mesg =>
514
515
                word list flags
515
516
                        /
516
517
                        invalid flag
522
523
        filter
523
524
                /
524
525
                cant dlopen file
525
 
                        mesg => dlopen returned "%return". 
 
526
                        mesg => dlopen returned "%return".
526
527
                        parms => return
527
528
                empty filter
528
529
                        mesg => The file "%filter" does not contain any filters.
546
547
                /
547
548
                mode option name
548
549
                        mesg => Empty option specifier.
549
 
                no filter to option 
 
550
                no filter to option
550
551
                        mesg => Option "%option" possibly specified prior to filter.
551
552
                        parms => option
552
 
                bad mode key 
 
553
                bad mode key
553
554
                        mesg => Unknown mode description key "%key".
554
555
                        parms => key
555
556
                expect mode key
582
583
                        mesg => "%mode": no start for magic search given for magic "%magic".
583
584
                file magic range
584
585
                        mesg => "%mode": no range for magic search given for magic "%magic".
585
 
                missing magic 
 
586
                missing magic
586
587
                        mesg => "%mode": no magic expression available for magic "%magic".
587
588
                bad magic
588
589
                        mesg => "%mode": Magic "%magic": bad regular expression after location specifier; regexp reports: "%regerr".
601
602
class: speller
602
603
        c impl headers => error
603
604
        /
604
 
        # FIME make a "methods" of the next two contractors
605
 
        #      which will probaly involve modifying mk-src.pl
 
605
        # FIXME: make a "methods" of the next two contractors
 
606
        #      which will probably involve modifying mk-src.pl
606
607
 
607
608
        constructor: new aspell speller
608
609
                returns alt type
633
634
        method: check
634
635
 
635
636
                posib err
636
 
                desc => returns  0 if it is not in the dictionary, 
 
637
                desc => Returns 0 if it is not in the dictionary,
637
638
                        1 if it is, or -1 on error.
638
639
                /
639
640
                bool
640
641
                encoded string: word
641
 
        
 
642
 
642
643
        method: add to personal
643
 
                
 
644
 
644
645
                posib err
 
646
                desc => Add this word to your own personal word list.
645
647
                /
646
648
                void
647
649
                encoded string: word
649
651
        method: add to session
650
652
 
651
653
                posib err
 
654
                desc => Add this word to the current spelling session.
652
655
                /
653
656
                void
654
657
                encoded string: word
656
659
        method: personal word list
657
660
 
658
661
                posib err
 
662
                desc => This is your own personal word list file plus
 
663
                        any extra words added during this session to
 
664
                        your own personal word list.
659
665
                /
660
666
                const word list
661
 
                
 
667
 
662
668
        method: session word list
663
669
 
664
670
                posib err
 
671
                desc => This is a list of words added to this session
 
672
                        that are not in the main word list or in your
 
673
                        own personal list but are considered valid for
 
674
                        this spelling session.
665
675
                /
666
676
                const word list
667
677
 
668
678
        method: main word list
669
679
 
670
680
                posib err
 
681
                desc => This is the main list of words used during this
 
682
                        spelling session.
671
683
                /
672
684
                const word list
673
685
 
674
686
        method: save all word lists
675
 
        
 
687
 
676
688
                posib err
677
689
                /
678
690
                void
686
698
        method: suggest
687
699
 
688
700
                posib err
689
 
                desc => Return null on error. 
690
 
                        the word list returned by suggest is only valid until the next
691
 
                        call to suggest
 
701
                desc => Return NULL on error.
 
702
                        The word list returned by suggest is only
 
703
                        valid until the next call to suggest.
692
704
                /
693
705
                const word list
694
706
                encoded string: word
695
 
                
 
707
 
696
708
        method: store replacement
697
709
 
698
710
                posib err
711
723
        c impl headers => error
712
724
        /
713
725
        destructible methods
714
 
        
 
726
 
715
727
        can have error methods
716
728
 
717
 
        # FIME make a "methods" of the next two contractors
 
729
        # FIXME: make a "methods" of the next two contractors
718
730
 
719
731
#       constructor: new aspell filter
720
732
#               returns alt type
748
760
#               void
749
761
#
750
762
#       method: process
751
 
#       
 
763
#
752
764
#               /
753
765
#               void
754
766
#               char pointer: str
773
785
        c impl headers => error
774
786
        /
775
787
        destructible methods
776
 
        
 
788
 
777
789
        can have error methods
778
790
 
779
 
        # FIME make a "methods" of the next two contractors
 
791
        # FIXME: make a "methods" of the next two contractors
780
792
 
781
793
        constructor: new aspell document checker
782
794
                returns alt type
788
800
                          return ret;
789
801
                        \}
790
802
                desc => Creates a new document checker.
791
 
                        The speller class is expect to last until this
792
 
                        class is destroyed.
793
 
                        If config is given it will be used to overwide
 
803
                        The speller class is expected to last until
 
804
                        this class is destroyed.
 
805
                        If config is given it will be used to override
794
806
                        any relevent options set by this speller class.
795
807
                        The config class is not once this function is done.
796
 
                        If filter is given then it will take ownership of 
 
808
                        If filter is given then it will take ownership of
797
809
                        the filter class and use it to do the filtering.
798
810
                        You are expected to free the checker when done.
799
811
                /
807
819
 
808
820
        method: reset
809
821
 
810
 
                desc => reset the internal state of the filter.
811
 
                        should be called whenever a new document is being filtered
 
822
                desc => Reset the internal state of the filter.
 
823
                        Should be called whenever a new document is
 
824
                        being filtered.
812
825
                /
813
826
                void
814
827
 
815
828
        method: process
816
 
        
817
 
                desc => process a string
818
 
                        The string passed in should only be split on white space
819
 
                        characters.  Furthermore, between calles to reset, each string
820
 
                        should be passed in exactly once and in the order they appeared
821
 
                        in the document.  Passing in stings out of order, skipping
822
 
                        strings or passing them in more than once may lead to undefined
823
 
                        results.
 
829
 
 
830
                desc => Process a string.
 
831
                        The string passed in should only be split on
 
832
                        white space characters.  Furthermore, between
 
833
                        calls to reset, each string should be passed
 
834
                        in exactly once and in the order they appeared
 
835
                        in the document.  Passing in strings out of
 
836
                        order, skipping strings or passing them in
 
837
                        more than once may lead to undefined results.
824
838
                /
825
839
                void
826
840
                string: str
827
841
                int: size
828
842
 
829
843
        method: next misspelling
830
 
        
831
 
                desc => returns the next misspelled word in the processed string
832
 
                        if there are no more misspelled word than token.word
833
 
                        will be null and token.size will be 0
 
844
 
 
845
                desc => Returns the next misspelled word in the
 
846
                        processed string.  If there are no more
 
847
                        misspelled words, then token.word will be
 
848
                        NULL and token.size will be 0
834
849
                /
835
850
                token object
836
851
 
837
852
        method: filter
838
853
 
839
 
                desc => returns the underlying filter class
 
854
                desc => Returns the underlying filter class.
840
855
                /
841
856
                filter
842
857
}
911
926
struct: dict info
912
927
        /
913
928
        string: name
914
 
                desc => name to identify the dictionary by
 
929
                desc => The Name to identify this dictionary by.
915
930
        string: code
 
931
                desc => The language code to identify this dictionary.
 
932
                        A two letter UPPER-CASE ISO 639 language code
 
933
                        and an optional two letter ISO 3166 country
 
934
                        code after a dash or underscore.
916
935
        string: jargon
 
936
                desc => Any extra information to distinguish this
 
937
                        variety of dictionary from other dictionaries
 
938
                        which may have the same language and size.
917
939
        int: size
918
940
        string: size str
 
941
                desc => A two char digit code describing the size of
 
942
                        the dictionary: 10=tiny, 20=really small,
 
943
                        30=small, 40=med-small, 50=med, 60=med-large,
 
944
                        70=large, 80=huge, 90=insane.  Please check
 
945
                        the README in aspell-lang-200?????.tar.bz2 or
 
946
                        see SCOWL (http://wordlist.sourceforge.net)
 
947
                        for an example of how these sizes are used.
919
948
        module info: module
920
949
 
921
950
class: module info list
971
1000
        copyable methods
972
1001
 
973
1002
        list methods: string pair
974
 
        
 
1003
 
975
1004
        method: insert
976
 
                desc => Insert a new element. 
977
 
                        Will NOT overright an existing entry.
978
 
                        Returns false if the element already exists.
 
1005
                desc => Insert a new element.
 
1006
                        Will NOT overwrite an existing entry.
 
1007
                        Returns FALSE if the element already exists.
979
1008
                /
980
1009
                bool
981
1010
                string: key
982
1011
                string: value
983
1012
 
984
1013
        method: replace
985
 
                desc => Insert a new element. 
986
 
                        Will overright an existing entry.
987
 
                        Always returns true.
 
1014
                desc => Insert a new element.
 
1015
                        Will overwrite an existing entry.
 
1016
                        Always returns TRUE.
988
1017
                /
989
1018
                bool
990
1019
                string: key
992
1021
 
993
1022
        method: lookup
994
1023
                const
995
 
                desc => Looks up an element.
996
 
                        Returns null if the element did not exist.
997
 
                        Returns an empty string if the element exists but has a null value.
998
 
                        Otherwises returns the value
 
1024
                desc => Looks up an element and returns the value.
 
1025
                        Returns NULL if the element does not exist.
 
1026
                        Returns an empty string if the element exists
 
1027
                        but has a NULL value.
999
1028
                /
1000
1029
                string
1001
1030
                string: key
1024
1053
{
1025
1054
/
1026
1055
func: reset cache
1027
 
        desc => Reset the global cache(s) so that cache queries will create a new
1028
 
                object.  If exiting objects are still in use they are not deleted.
1029
 
                If which is NULL than ALL caches will be reset.  Current caches are
1030
 
                "encode", "decode", "dictionary", "language", and "keyboard".
 
1056
        desc => Reset the global cache(s) so that cache queries will
 
1057
                create a new object. If existing objects are still in
 
1058
                use they are not deleted. If which is NULL then all
 
1059
                caches will be reset. Current caches are "encode",
 
1060
                "decode", "dictionary", "language", and "keyboard".
1031
1061
        /
1032
1062
        bool
1033
1063
        string: which