*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> getobjformat (3)              
Title
Content
Arch
Section
 

GETOBJFORMAT(3)

Contents


NAME    [Toc]    [Back]

     getobjformat -- get preferred object file format

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <objformat.h>

     int
     getobjformat(char *buf, size_t bufsize, int *argcp, char **argv);

DESCRIPTION    [Toc]    [Back]

     The getobjformat() function queries several sources to determine the preferred
 object file format, and copies its name into a buffer provided by
     the caller.

     The object file format is determined as follows.  If argv is non-NULL and
     an explicit command line argument such as -aout or -elf is present, then
     that determines the object file format.

     Otherwise, if the variable OBJFORMAT is set in the environment, the
     object file format is taken from its value.

     Otherwise, if the file /etc/objformat is readable and contains a line of
     the form `OBJFORMAT=xxx', the object file format is taken from there.

     Otherwise, a built-in system default object file format is returned.

     buf points to a user-supplied buffer into which the name of the object
     file format is copied.  bufsize gives the size of the buffer in bytes.
     The string placed in buf is always null-terminated.  It is an error if
     the buffer is too small to hold the null-terminated name.

     argv points to a NULL-terminated argument vector to be scanned for object
     format options.  argv may be NULL, in which case the argument vector is
     not scanned.

     If argcp is non-NULL, any object format options are deleted from the
     argument vector, and the updated argument count is stored into the integer
 referenced by argcp.  If argcp is NULL, the argument vector is left
     unchanged.

RETURN VALUES    [Toc]    [Back]

     On success, getobjformat() returns the length of the object file format
     name, not counting the null terminator.  If the supplied buffer is too
     small to hold the object file format and its null terminator,
     getobjformat() returns -1.  In that case, the contents of the buffer and
     argument vector supplied by the caller are indeterminate.

ENVIRONMENT    [Toc]    [Back]

     OBJFORMAT	If the environment variable OBJFORMAT is set, it overrides the
		default object file format.  OBJFORMAT takes precedence over
		/etc/objformat.

FILES    [Toc]    [Back]

     /etc/objformat  If present, specifies the object file format to use.
		     Syntax is `OBJFORMAT=xxx'.

SEE ALSO    [Toc]    [Back]

      
      
     objformat(1)

HISTORY    [Toc]    [Back]

     The getobjformat() function first appeared in FreeBSD 3.0.


FreeBSD 5.2.1		       September 7, 1998		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
DxfToIv IRIX converts an Autodesk Data Exchange File format (.DXF) file to Open Inventor 2.0 format
papersize Linux specify preferred paper size
prefsize IRIX specifies the preferred size of a graphics window
prefposition IRIX specifies the preferred location and size of a graphics window
elf2olf OpenBSD convert between ELF and OLF object module format
olf2elf OpenBSD convert between ELF and OLF object module format
set_cdscp_preferred_clearinghouse HP-UX Specifies a preferred clearinghouse to use for satisfying read requests that result from CDS control program c
show_cdscp_preferred_clearinghouse HP-UX Displays the preferred clearinghouse for satisfying read requests that result from CDS control program command
xlate IRIX the address translation object file section of an ELF object
dcecp_audtrail HP-UX A dcecp object that converts the audit trail into a readable format
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service