defopen man page on Xenix

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



     DEFOPEN(S)		      XENIX System V		    DEFOPEN(S)

     Name
	  defopen, defread - Reads default entries.

     Syntax
	  int defopen(filename)
	  char *filename;

	  char *defread(pattern)
	  char *pattern;

     Description
	  defopen and defread are a pair of routines designed to allow
	  easy access to default definition files.  XENIX is normally
	  distributed in binary form; the use of default files allows
	  OEMs or site administrators to customize utility defaults
	  without having the source code.

	  defopen opens the default file named by the pathname in
	  filename.  defopen returns null if it is successful in
	  opening the file, or the fopen failure code (errno) if the
	  open fails.

	  defread reads the previously opened file from the beginning
	  until it encounters a line beginning with pattern. defread
	  then returns a pointer to the first character in the line
	  after the initial pattern. If a trailing newline character
	  is read it is replaced by a null byte.

	  When all items of interest have been extracted from the
	  opened file the program may call defopen with the name of
	  another file to be searched, or it may call defopen with
	  NULL, which closes the default file without opening another.

     Files
	  The XENIX convention is for a system program xyz to store
	  its defaults (if any) in the file /etc/default/xyz.

     Diagnostics
	  defopen returns zero on success and nonzero if the open
	  fails. The return value is the errno value set by fopen(S).

	  defread returns NULL if a default file is not open, if the
	  indicated pattern could not be found, or if it encounters
	  any line in the file greater than the maximum length of 128
	  characters.

     Notes
	  The return value points to static data, whose contents are
	  overwritten by each call.

     Page 1					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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