summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/misc.c b/src/misc.c
index 9cecd5c..5c1664e 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -606,57 +606,6 @@ void *reallocate_array (void *array, int size, size_t element_size)
}
-/* skelout - write out one section of the skeleton file
- *
- * Description
- * Copies skelfile or skel array to stdout until a line beginning with
- * "%%" or EOF is found.
- */
-void skelout (bool announce)
-{
- char buf_storage[MAXLINE];
- char *buf = buf_storage;
- bool do_copy = true;
-
- /* Loop pulling lines either from the skelfile, if we're using
- * one, or from the selected back end's skel[] array.
- */
- while (env.skelfile != NULL ?
- (fgets (buf, MAXLINE, env.skelfile) != NULL) :
- ((buf = (char *) backend->skel[skel_ind++]) != 0)) {
-
- if (env.skelfile != NULL)
- chomp (buf);
-
- /* copy from skel array */
- if (buf[0] == '%') { /* control line */
- /* print the control line as a comment. */
- if (ctrl.ddebug && buf[1] != '#') {
- comment(buf);
- outc ('\n');
- }
- if (buf[1] == '#') {
- /* %# indicates comment line to be ignored */
- }
- else if (buf[1] == '%') {
- /* %% is a break point for skelout() */
- if (announce) {
- comment(buf);
- outc ('\n');
- }
- return;
- }
- else {
- flexfatal (_("bad line in skeleton file"));
- }
- }
-
- else if (do_copy)
- outn (buf);
- } /* end while */
-}
-
-
/* transition_struct_out - output a yy_trans_info structure
*
* outputs the yy_trans_info structure with the two elements, element_v and
@@ -740,20 +689,4 @@ void comment(const char *txt)
outc ('\n');
}
-/* Search for a string in the skeleton prolog, where macros are defined.
- */
-bool boneseeker(const char *bone)
-{
- int i;
-
- for (i = 0; i < sizeof(backend->skel)/sizeof(backend->skel[0]); i++) {
- const char *line = backend->skel[i];
- if (strstr(line, bone) != NULL)
- return true;
- else if (strncmp(line, "%%", 2) == 0)
- break;
- }
- return false;
-}
-