File: scanner.h

package info (click to toggle)
ruby-ferret 0.11.8.4%2Bdebian-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,368 kB
  • sloc: ansic: 69,786; ruby: 8,131; makefile: 5
file content (36 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FRT_SCANNER_H
#define FRT_SCANNER_H

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Scan +in+ and copy the token into +out+, up until +out_size+ bytes.
 * The +start+ and +end+ are pointers to the original untouched token
 * somewhere inside +in+.  This token may not always be copied
 * verbatim into +out+.  For example, the http://google.com token will
 * be truncated down to just google.com during the copy.
 * +token_length+ is the size of the resulting token.
 */
void frt_std_scan(const char *in,
                  char *out, size_t out_size,
                  const char **start, const char **end,
                  int *token_length);


void frt_std_scan_mb(const char *in,
                     char *out, size_t out_size,
                     const char **start, const char **end,
                     int *token_length);

void frt_std_scan_utf8(const char *in,
                       char *out, size_t out_size,
                       const char **start, const char **end,
                       int *token_length);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* FRT_SCANNER */