.Dd 2020-10-22 .Dt gemtext 3 .Os .Sh NAME .Nm gemtext_type , .Nm gemtext_link_has_label .Nd read information from gemtext objects .Sh SYNOPSIS .In gemtext.h .Ft int .Fn gemtext_type "struct gemtext *line" .Ft int .Fn gemtext_link_has_label "struct gemtext *line" .Sh DESCRIPTION .Fn gemtext_type returns the type of gemtext object specified in .Em line . .Pp .Fn gemtext_link_has_label operates under the assumption that .Em line is of type .Em GEMTEXT_LINK and returns non-zero if link object contained in .Em line has a label, or .Em 0 if it doesn't. .Sh TYPES This is a list of all possible return values for .Fn gemtext_type : .Bd -literal -offset indent #define GEMTEXT_TEXT 1 /* plain text line */ #define GEMTEXT_LINK 2 /* link */ #define GEMTEXT_PRE 3 /* preformatted text */ #define GEMTEXT_H1 4 /* heading (level 1) */ #define GEMTEXT_H2 5 /* heading (level 2) */ #define GEMTEXT_H3 6 /* heading (level 3) */ #define GEMTEXT_UL 7 /* unordered list */ #define GEMTEXT_QT 8 /* quoteed text */ .Ed .Sh ERRORS .Fn gemtext_type never fails. .Sh SEE ALSO .Xr gemtext_decode 3 , .Xr gemtext_encode 3 , .Xr gemtext_text_new 3 , .Xr gemtext_text_string 3 , .Xr gemtext_text_strlen 3 , .Xr gemtext_list_append 3 , .Xr gemtext_free 3 .Sh AUTHORS .An Ali Fardan Aq Mt raiz@stellarbound.space