binsrch man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

BINSRCH(3)		  WordNet™ Library Functions		    BINSRCH(3)

NAME
       bin_search, copyfile, replace_line, insert_line - general purpose func‐
       tions for performing a binary search

SYNOPSIS
       char *bin_search(char *key, FILE *fp);

       void copyfile(FILE *fromfp, FILE *tofp);

       char *replace_line(char *new_line, char *key, FILE *fp);

       char *insert_line(char *new_line, char *key, FILE *fp);

DESCRIPTION
       The WordNet library contains several general purpose functions for per‐
       forming a binary search and modifying sorted files.

       bin_search()  is	 the primary binary search algorithm to search for key
       as the first item on a line in the file pointed to by fp.   The	delim‐
       iter  between  the  key and the rest of the fields on the line, if any,
       must be a space.	 A pointer to a static variable containing the	entire
       line is returned.  NULL is returned if a match is not found.

       The  remaining  functions are not used by WordNet, and are only briefly
       described.

       copyfile() copies the contents of one file to another.

       replace_line() replaces a line in a file having searchkey key with  the
       contents	 of new_line.  It returns the original line or NULL in case of
       error.

       insert_line()  finds  the  proper  place	 to  insert  the  contents  of
       new_line, having searchkey key in the sorted file pointed to by fp.  It
       returns NULL if a line with this searchkey is already in the file.

NOTES
       The maximum length of key is 1024.

       The maximum line length in a file is 25K.

       If there are no additional fields after the search key, the key must be
       followed by at least one space before the newline character.

SEE ALSO
       wnintro(3), morph(3), wnsearch(3), wnutil(3), wnintro(5).

WARNINGS
       binsearch()  returns  a	pointer	 to  a	static	character buffer.  The
       returned string should be copied by the caller if the results  need  to
       be  saved, as a subsequent call will replace the contents of the static
       buffer.

WordNet 3.0			   Dec 2006			    BINSRCH(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net