about summary refs log tree commit diff stats
path: root/html/067random.cc.html
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-13 22:29:30 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-13 22:35:15 -0700
commitc4412d299ee983da5bfca64f33cf6f3eb478d232 (patch)
tree7ea872481e6b02f056c31030ba702ac1323d079a /html/067random.cc.html
parentc4aa819a5d651554b3a5cc52b67cac36889cada8 (diff)
downloadmu-c4412d299ee983da5bfca64f33cf6f3eb478d232.tar.gz
.
Diffstat (limited to 'html/067random.cc.html')
0 files changed, 0 insertions, 0 deletions
> ^
3f2b7b2 ^
d297d84 ^
3f2b7b2 ^





d297d84 ^

3f2b7b2 ^




d297d84 ^





3f2b7b2 ^


d297d84 ^

3f2b7b2 ^










d297d84 ^




3f2b7b2 ^










80174ef ^









d297d84 ^

2ff8a2f ^


3f2b7b2 ^
d297d84 ^

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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88





                       



                            


                                 
                    
                               
                    
                              
                    
                                          





                                               

                  




                                                     





                       


                                                               

          










                                                                       




                       










                                                           









                                       

                      


                           
                  

                                            
.Dd 2020-10-22
.Dt gemtext 3
.Os
.Sh NAME
.Nm gemtext_decode ,
.Nm gemtext_decode_fd ,
.Nm gemtext_decode_file ,
.Nm gemtext_list_decode ,
.Nm gemtext_list_decode_fd ,
.Nm gemtext_list_decode_file
.Nd Gemini text parsing functions
.Sh SYNOPSIS
.In gemtext.h
.Ft struct gemtext *
.Fn gemtext_decode "char *text"
.Ft struct gemtext *
.Fn gemtext_decode_fd "int fd"
.Ft struct gemtext *
.Fn gemtext_decode_file "const char *path"
.Ft struct gemtext **
.Fn gemtext_list_decode "char *text"
.Ft struct gemtext **
.Fn gemtext_list_decode_fd "int fd"
.Ft struct gemtext **
.Fn gemtext_list_decode_file "const char *path"
.Sh DESCRIPTION
.Fn gemtext_decode
takes string consisting of a single line specified in
.Em text
and converts it to
.Em struct gemtext*
returned.
.Pp
.Fn gemtext_decode_fd
and
.Fn gemtext_decode_file
are wrappers for
.Fn gemtext_decode
where the former takes input from file descriptor specified int
.Em fd ,
and the latter reads input from file specified in
.Em file .
.Pp
.Fn gemtext_list_decode ,
.Fn gemtext_list_decode_fd
and
.Fn gemtext_list_decode_file
behave similar to
.Fn gemtext_decode
family of functions except text specified in
.Em text
can consist of multiple lines and the returned value would be a list of
.Em struct gemtext*
terminated by a NULL pointer.
.Sh RETURN VALUES
.Fn gemtext_decode ,
.Fn gemtext_decode_fd
and
.Fn gemtext_decode_file
return a valid pointer to
.Em struct gemtext
consisting of the parsed text on success, or NULL on error.
.Pp
.Fn gemtext_list_decode ,
.Fn gemtext_list_decode_fd
and
.Fn gemtext_list_decode_file
return a list of
.Em struct gemtext*
terminated by NULL pointer, or NULL on error.
.Pp
Pointers returned by
.Fn gemtext_decode
and it's wrappers should be freed using
.Xr gemtext_free(3) .
.Pp
Pointers returned by
.Fn gemtext_list_decode
and it's wrappers should be freed using
.Xr gemtext_list_free(3) .
.Sh SEE ALSO
.Xr gemtext_encode 3 ,
.Xr gemtext_text_new 3 ,
.Xr gemtext_type 3 ,
.Xr gemtext_text_string 3 ,
.Xr gemtext_free 3
.Sh AUTHORS
.An Ali Fardan Aq Mt raiz@stellarbound.space