Skip to content

Commit

Permalink
Remove unused code from hao.c
Browse files Browse the repository at this point in the history
Also remove obsolete README.HAO which has been
superseded by html/hercinst.html#HAO
  • Loading branch information
rbowler committed Jun 14, 2013
1 parent d11281e commit 5fa14b0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 136 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Expand Up @@ -566,7 +566,6 @@ EXTRA_DIST = autoconf/config.rpath \
README.SVN \
README.DYNMOD \
README.ECPSVM \
README.HAO \
README.HDL \
README.NETWORKING \
README.OSX \
Expand Down
97 changes: 0 additions & 97 deletions README.HAO

This file was deleted.

38 changes: 0 additions & 38 deletions hao.c
Expand Up @@ -628,41 +628,3 @@ DLL_EXPORT void hao_message(char *buf)

#endif /* defined(OPTION_HAO) */

///////////////////////////////////////////////////////////////////////////////
// Fish notes for possible future enhancement: I was thinking we should
// probably at some point support command rules that allow a custom
// command to be constructed based on the string(s) that was/were found.

#if 0
/*
The following demonstrates how the REG_NOTBOL flag could be used
with regexec() to find all substrings in a line that match a pattern
supplied by a user. (For simplicity of the example, very little
error checking is done.)
*/

regex_t re; /* regular expression */
regmatch_t pm; /* match info */
int error; /* rc from regexec */

char buffer[] = "The quick brown dog jumps over the lazy fox";
char pattern[] = "lazy";

/* Compile the search pattern */

(void)regcomp( &re, pattern, 0 );

/* This call to regexec() finds the first match on the line */

error = regexec( &re, &buffer[0], 1, &pm, 0 );

while (error == 0) /* while matches found */
{
/* Substring found between 'pm.rm_so' and 'pm.rm_eo' */
/* This call to regexec() finds the next match */

error = regexec( &re, buffer + pm.rm_eo, 1, &pm, REG_NOTBOL );
}

#endif
///////////////////////////////////////////////////////////////////////////////

0 comments on commit 5fa14b0

Please sign in to comment.