Lines Matching defs:th
80 * @param th The uninitialized structure
84 int yytbl_hdr_init (struct yytbl_hdr *th, const char *version_str,
87 memset (th, 0, sizeof (struct yytbl_hdr));
89 th->th_magic = YYTBL_MAGIC;
90 th->th_hsize = 14 + strlen (version_str) + 1 + strlen (name) + 1;
91 th->th_hsize += yypad64 (th->th_hsize);
92 th->th_ssize = 0; // Not known at this point.
93 th->th_flags = 0;
94 th->th_version = copy_string (version_str);
95 th->th_name = copy_string (name);
142 * @param th table header to be written
145 int yytbl_hdr_fwrite (struct yytbl_writer *wr, const struct yytbl_hdr *th)
150 if (yytbl_write32 (wr, th->th_magic) < 0
151 || yytbl_write32 (wr, th->th_hsize) < 0)
158 if (yytbl_write32 (wr, th->th_ssize) < 0
159 || yytbl_write16 (wr, th->th_flags) < 0)
163 sz = strlen (th->th_version) + 1;
164 if ((rv = yytbl_writen (wr, th->th_version, sz)) != sz)
168 sz = strlen (th->th_name) + 1;
169 if ((rv = yytbl_writen (wr, th->th_name, sz)) != sz)
179 if (bwritten != (int) th->th_hsize)