#include <stdio.h>#include "strings.h"Go to the source code of this file.
Defines | |
| #define | DEBUG |
| #define | new_hdr(p, first, last) |
| #define | STACK_SIZE 1024 |
| #define | TOS_MARK ((char *)0x55555555) |
| #define | PUSH(y) *stack_ptr++ = (y) |
| #define | POP s = *(--stack_ptr) |
| #define | STACK_SIZE 10240 |
| #define | TOS_MARK ((char *)0x55555555) |
| #define | PUSH(y) *stack_ptr++ = (y) |
| #define | POP s = *(--stack_ptr) |
Functions | |
| char * | concat (char *x, char *y) |
| char * | placeholder () |
| void | set_ph (struct str_hdr *p, char *s) |
| int | str_length (char *x) |
| void | str_firstn (char *buf, int n, char *s) |
| char | str_last (char *s) |
| void | str_to_contig1 () |
| void | str_to_contig (char *s, char **buf) |
| void | str_to_contig1 (char *x, char **buf) |
| char * | flatten (char *s, long *sz) |
| int | str_eq (char *s, char *t) |
| #define new_hdr | ( | p, | |||
| first, | |||||
| last | ) |
| #define POP s = *(--stack_ptr) |
| #define POP s = *(--stack_ptr) |
| #define PUSH | ( | y | ) | *stack_ptr++ = (y) |
| #define PUSH | ( | y | ) | *stack_ptr++ = (y) |
| #define STACK_SIZE 10240 |
| #define STACK_SIZE 1024 |
Referenced by str_length(), and str_to_contig1().
| #define TOS_MARK ((char *)0x55555555) |
| #define TOS_MARK ((char *)0x55555555) |
Referenced by str_length().
| char* concat | ( | char * | x, | |
| char * | y | |||
| ) |
Definition at line 18 of file strings.c.
References new_hdr.
Referenced by add_idt(), arg_list(), binary_op(), coerce(), finish_idt(), flush_expr(), flush_slm(), for_each_vr(), main(), nilary_op(), par_names(), tmp_decls(), and unary_op().
| char* flatten | ( | char * | s, | |
| long * | sz | |||
| ) |
Definition at line 185 of file strings.c.
References GC_malloc_atomic(), str_length(), and str_to_contig().
| char* placeholder | ( | ) |
Definition at line 35 of file strings.c.
References CS_NIL, str_hdr::first_part, GC_malloc(), HDR_MARK, str_hdr::hdr_mark, and str_hdr::last_part.
Referenced by binary_op(), main(), and unary_op().
| void set_ph | ( | struct str_hdr * | p, | |
| char * | s | |||
| ) |
Definition at line 47 of file strings.c.
References str_hdr::first_part.
Referenced by flush_slm(), and main().
| int str_eq | ( | char * | s, | |
| char * | t | |||
| ) |
Definition at line 205 of file strings.c.
References GC_malloc_atomic(), str_length(), and str_to_contig().
| void str_firstn | ( | char * | buf, | |
| int | n, | |||
| char * | s | |||
| ) |
Definition at line 103 of file strings.c.
References CS_NIL, str_hdr::first_part, HDR_MARK, and str_hdr::last_part.
| char str_last | ( | char * | s | ) |
Definition at line 121 of file strings.c.
References str_hdr::first_part, HDR_MARK, and str_hdr::last_part.
| int str_length | ( | char * | x | ) |
Definition at line 67 of file strings.c.
References str_hdr::first_part, HDR_MARK, str_hdr::last_part, POP, PUSH, STACK_SIZE, and TOS_MARK.
| void str_to_contig | ( | char * | s, | |
| char ** | buf | |||
| ) |
| void str_to_contig1 | ( | char * | x, | |
| char ** | buf | |||
| ) |
Definition at line 151 of file strings.c.
References str_hdr::first_part, HDR_MARK, str_hdr::last_part, POP, PUSH, and STACK_SIZE.
| void str_to_contig1 | ( | ) |
Referenced by str_to_contig().
1.5.4