Lines Matching defs:gettok_state

2230  *	gettok_state - gettok state block to use
2239 gettok_init(GETTOK_STATE *gettok_state, char *buf, int inc_null_final)
2241 gettok_state->gtok_buf = gettok_state->gtok_cur_buf = buf;
2242 gettok_state->gtok_inc_null_final = inc_null_final;
2243 gettok_state->gtok_null_seen = 0;
2251 * gettok_state - State of gettok() operation. Initialized
2255 * If a token is found, gettok_state->gtok_last_token is filled in
2258 * gettok_state->gtok_last_token are undefined.
2261 * - The token returned references the memory in gettok_state->gtok_buf.
2264 * - This routine will modify the contents of gettok_state->gtok_buf
2269 gettok(GETTOK_STATE *gettok_state)
2271 char *str = gettok_state->gtok_cur_buf;
2284 if (gettok_state->gtok_inc_null_final &&
2285 !gettok_state->gtok_null_seen) {
2286 gettok_state->gtok_inc_null_final = 0;
2287 gettok_state->gtok_null_seen = 1;
2288 gettok_state->gtok_last_token.tok_str = str;
2289 gettok_state->gtok_last_token.tok_len = 0;
2290 gettok_state->gtok_last_token.tok_line_off =
2291 str - gettok_state->gtok_buf;
2294 gettok_state->gtok_null_seen = 1;
2303 gettok_state->gtok_last_token.tok_str = look = str;
2304 gettok_state->gtok_last_token.tok_line_off =
2305 look - gettok_state->gtok_buf;
2370 gettok_state->gtok_last_token.tok_len = str -
2371 gettok_state->gtok_last_token.tok_str;
2372 gettok_state->gtok_null_seen = *look == '\0';
2373 if (!gettok_state->gtok_null_seen)
2376 gettok_state->gtok_cur_buf = look;
2380 elfedit_str_to_c_literal(gettok_state->gtok_last_token.tok_str,
2383 gettok_state->gtok_last_token.tok_len,
2384 gettok_state->gtok_last_token.tok_line_off);
2428 GETTOK_STATE gettok_state;
2450 gettok_init(&gettok_state, str.buf, inc_null_final);
2452 for (tokst.tokst_cnt = 0; gettok(&gettok_state) != 0;
2464 gettok_state.gtok_last_token.tok_len + 1;
2465 tokst.tokst_buf[tokst.tokst_cnt] = gettok_state.gtok_last_token;