From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/MAN/Makefile.am | 5 + reference/C/MAN/Makefile.in | 410 +++++++++++++++++++ reference/C/MAN/abs.htm | 101 +++++ reference/C/MAN/access.htm | 166 ++++++++ reference/C/MAN/acos.htm | 102 +++++ reference/C/MAN/alarm.htm | 102 +++++ reference/C/MAN/asctime.htm | 233 +++++++++++ reference/C/MAN/asin.htm | 102 +++++ reference/C/MAN/assert.htm | 98 +++++ reference/C/MAN/atan.htm | 102 +++++ reference/C/MAN/atan2.htm | 102 +++++ reference/C/MAN/calloc.htm | 97 +++++ reference/C/MAN/ceil.htm | 101 +++++ reference/C/MAN/chdir.htm | 98 +++++ reference/C/MAN/chown.htm | 93 +++++ reference/C/MAN/chroot.htm | 97 +++++ reference/C/MAN/clock.htm | 97 +++++ reference/C/MAN/close.htm | 100 +++++ reference/C/MAN/closedir.htm | 102 +++++ reference/C/MAN/cos.htm | 102 +++++ reference/C/MAN/cosh.htm | 101 +++++ reference/C/MAN/ctermid.htm | 97 +++++ reference/C/MAN/cuserid.htm | 27 ++ reference/C/MAN/difftime.htm | 101 +++++ reference/C/MAN/div.htm | 97 +++++ reference/C/MAN/dup.htm | 98 +++++ reference/C/MAN/dup2.htm | 98 +++++ reference/C/MAN/exp.htm | 98 +++++ reference/C/MAN/fabs.htm | 101 +++++ reference/C/MAN/feof.htm | 98 +++++ reference/C/MAN/ferror.htm | 98 +++++ reference/C/MAN/fflush.htm | 100 +++++ reference/C/MAN/fgetpos.htm | 163 ++++++++ reference/C/MAN/fgetpwent.htm | 101 +++++ reference/C/MAN/floor.htm | 100 +++++ reference/C/MAN/fmod.htm | 97 +++++ reference/C/MAN/fopen.htm | 164 ++++++++ reference/C/MAN/fpathconf.htm | 166 ++++++++ reference/C/MAN/fputs.htm | 167 ++++++++ reference/C/MAN/fread.htm | 100 +++++ reference/C/MAN/freopen.htm | 164 ++++++++ reference/C/MAN/frexp.htm | 98 +++++ reference/C/MAN/fscanf.htm | 365 +++++++++++++++++ reference/C/MAN/fseek.htm | 163 ++++++++ reference/C/MAN/fwrite.htm | 100 +++++ reference/C/MAN/getc.htm | 169 ++++++++ reference/C/MAN/getdid.htm | 98 +++++ reference/C/MAN/getenv.htm | 99 +++++ reference/C/MAN/getgroupd.htm | 163 ++++++++ reference/C/MAN/gethostname.htm | 99 +++++ reference/C/MAN/getlogin.htm | 27 ++ reference/C/MAN/getopt.htm | 291 +++++++++++++ reference/C/MAN/getpgrp.htm | 166 ++++++++ reference/C/MAN/getpid.htm | 102 +++++ reference/C/MAN/getpw.htm | 101 +++++ reference/C/MAN/getpwent.htm | 99 +++++ reference/C/MAN/getpwnam.htm | 101 +++++ reference/C/MAN/gets.htm | 169 ++++++++ reference/C/MAN/getuid.htm | 98 +++++ reference/C/MAN/index.htm | 103 +++++ reference/C/MAN/ioctl.htm | 101 +++++ reference/C/MAN/isatty.htm | 98 +++++ reference/C/MAN/labs.htm | 101 +++++ reference/C/MAN/ldexp.htm | 98 +++++ reference/C/MAN/ldiv.htm | 97 +++++ reference/C/MAN/link.htm | 167 ++++++++ reference/C/MAN/longjmp.htm | 99 +++++ reference/C/MAN/lseek.htm | 165 ++++++++ reference/C/MAN/mblen.htm | 100 +++++ reference/C/MAN/mbstowcs.htm | 100 +++++ reference/C/MAN/mbtowc.htm | 100 +++++ reference/C/MAN/memchr.htm | 103 +++++ reference/C/MAN/memcmp.htm | 101 +++++ reference/C/MAN/memcpy.htm | 101 +++++ reference/C/MAN/memmove.htm | 101 +++++ reference/C/MAN/memset.htm | 98 +++++ reference/C/MAN/mkdir.htm | 172 ++++++++ reference/C/MAN/modf.htm | 98 +++++ reference/C/MAN/opendir.htm | 102 +++++ reference/C/MAN/pause.htm | 99 +++++ reference/C/MAN/perlembed.htm | 885 ++++++++++++++++++++++++++++++++++++++++ reference/C/MAN/perror.htm | 98 +++++ reference/C/MAN/printf.htm | 362 ++++++++++++++++ reference/C/MAN/putenv.htm | 99 +++++ reference/C/MAN/putpwent.htm | 101 +++++ reference/C/MAN/puts.htm | 167 ++++++++ reference/C/MAN/raise.htm | 99 +++++ reference/C/MAN/rand.htm | 166 ++++++++ reference/C/MAN/readdir.htm | 164 ++++++++ reference/C/MAN/realloc.htm | 97 +++++ reference/C/MAN/remove.htm | 169 ++++++++ reference/C/MAN/rename.htm | 231 +++++++++++ reference/C/MAN/rewinddir.htm | 101 +++++ reference/C/MAN/rmdir.htm | 166 ++++++++ reference/C/MAN/scandir.htm | 101 +++++ reference/C/MAN/scanf.htm | 365 +++++++++++++++++ reference/C/MAN/seekdir.htm | 102 +++++ reference/C/MAN/setbuf.htm | 167 ++++++++ reference/C/MAN/setegid.htm | 98 +++++ reference/C/MAN/setenv.htm | 98 +++++ reference/C/MAN/seteuid.htm | 98 +++++ reference/C/MAN/setgid.htm | 99 +++++ reference/C/MAN/setjmp.htm | 99 +++++ reference/C/MAN/setlocale.htm | 168 ++++++++ reference/C/MAN/setpgid.htm | 166 ++++++++ reference/C/MAN/setsid.htm | 97 +++++ reference/C/MAN/setuid.htm | 99 +++++ reference/C/MAN/signal.htm | 104 +++++ reference/C/MAN/sin.htm | 102 +++++ reference/C/MAN/sinh.htm | 101 +++++ reference/C/MAN/sleep.htm | 98 +++++ reference/C/MAN/sprintf.htm | 362 ++++++++++++++++ reference/C/MAN/sqrt.htm | 97 +++++ reference/C/MAN/stat.htm | 232 +++++++++++ reference/C/MAN/stderr.htm | 99 +++++ reference/C/MAN/strcasecmp.htm | 101 +++++ reference/C/MAN/strcat.htm | 101 +++++ reference/C/MAN/strcoll.htm | 101 +++++ reference/C/MAN/strcspn.htm | 103 +++++ reference/C/MAN/strftime.htm | 233 +++++++++++ reference/C/MAN/strlen.htm | 97 +++++ reference/C/MAN/strpbrk.htm | 103 +++++ reference/C/MAN/strspn.htm | 103 +++++ reference/C/MAN/strstr.htm | 103 +++++ reference/C/MAN/strtod.htm | 101 +++++ reference/C/MAN/sysconf.htm | 233 +++++++++++ reference/C/MAN/tan.htm | 102 +++++ reference/C/MAN/tanh.htm | 101 +++++ reference/C/MAN/telldir.htm | 101 +++++ reference/C/MAN/test | 4 + reference/C/MAN/time.htm | 100 +++++ reference/C/MAN/tmpfile.htm | 100 +++++ reference/C/MAN/tmpnam.htm | 100 +++++ reference/C/MAN/togetpgrp.htm | 492 ++++++++++++++++++++++ reference/C/MAN/toupper.htm | 99 +++++ reference/C/MAN/ttyname.htm | 98 +++++ reference/C/MAN/uname.htm | 99 +++++ reference/C/MAN/ungetc.htm | 169 ++++++++ reference/C/MAN/unlink.htm | 168 ++++++++ reference/C/MAN/unsetenv.htm | 98 +++++ reference/C/MAN/va_start.htm | 159 ++++++++ reference/C/MAN/vfprintf.htm | 362 ++++++++++++++++ reference/C/MAN/wcstombs.htm | 100 +++++ reference/C/MAN/wctomb.htm | 100 +++++ 144 files changed, 19346 insertions(+) create mode 100644 reference/C/MAN/Makefile.am create mode 100644 reference/C/MAN/Makefile.in create mode 100644 reference/C/MAN/abs.htm create mode 100644 reference/C/MAN/access.htm create mode 100644 reference/C/MAN/acos.htm create mode 100644 reference/C/MAN/alarm.htm create mode 100644 reference/C/MAN/asctime.htm create mode 100644 reference/C/MAN/asin.htm create mode 100644 reference/C/MAN/assert.htm create mode 100644 reference/C/MAN/atan.htm create mode 100644 reference/C/MAN/atan2.htm create mode 100644 reference/C/MAN/calloc.htm create mode 100644 reference/C/MAN/ceil.htm create mode 100644 reference/C/MAN/chdir.htm create mode 100644 reference/C/MAN/chown.htm create mode 100644 reference/C/MAN/chroot.htm create mode 100644 reference/C/MAN/clock.htm create mode 100644 reference/C/MAN/close.htm create mode 100644 reference/C/MAN/closedir.htm create mode 100644 reference/C/MAN/cos.htm create mode 100644 reference/C/MAN/cosh.htm create mode 100644 reference/C/MAN/ctermid.htm create mode 100644 reference/C/MAN/cuserid.htm create mode 100644 reference/C/MAN/difftime.htm create mode 100644 reference/C/MAN/div.htm create mode 100644 reference/C/MAN/dup.htm create mode 100644 reference/C/MAN/dup2.htm create mode 100644 reference/C/MAN/exp.htm create mode 100644 reference/C/MAN/fabs.htm create mode 100644 reference/C/MAN/feof.htm create mode 100644 reference/C/MAN/ferror.htm create mode 100644 reference/C/MAN/fflush.htm create mode 100644 reference/C/MAN/fgetpos.htm create mode 100644 reference/C/MAN/fgetpwent.htm create mode 100644 reference/C/MAN/floor.htm create mode 100644 reference/C/MAN/fmod.htm create mode 100644 reference/C/MAN/fopen.htm create mode 100644 reference/C/MAN/fpathconf.htm create mode 100644 reference/C/MAN/fputs.htm create mode 100644 reference/C/MAN/fread.htm create mode 100644 reference/C/MAN/freopen.htm create mode 100644 reference/C/MAN/frexp.htm create mode 100644 reference/C/MAN/fscanf.htm create mode 100644 reference/C/MAN/fseek.htm create mode 100644 reference/C/MAN/fwrite.htm create mode 100644 reference/C/MAN/getc.htm create mode 100644 reference/C/MAN/getdid.htm create mode 100644 reference/C/MAN/getenv.htm create mode 100644 reference/C/MAN/getgroupd.htm create mode 100644 reference/C/MAN/gethostname.htm create mode 100644 reference/C/MAN/getlogin.htm create mode 100644 reference/C/MAN/getopt.htm create mode 100644 reference/C/MAN/getpgrp.htm create mode 100644 reference/C/MAN/getpid.htm create mode 100644 reference/C/MAN/getpw.htm create mode 100644 reference/C/MAN/getpwent.htm create mode 100644 reference/C/MAN/getpwnam.htm create mode 100644 reference/C/MAN/gets.htm create mode 100644 reference/C/MAN/getuid.htm create mode 100644 reference/C/MAN/index.htm create mode 100644 reference/C/MAN/ioctl.htm create mode 100644 reference/C/MAN/isatty.htm create mode 100644 reference/C/MAN/labs.htm create mode 100644 reference/C/MAN/ldexp.htm create mode 100644 reference/C/MAN/ldiv.htm create mode 100644 reference/C/MAN/link.htm create mode 100644 reference/C/MAN/longjmp.htm create mode 100644 reference/C/MAN/lseek.htm create mode 100644 reference/C/MAN/mblen.htm create mode 100644 reference/C/MAN/mbstowcs.htm create mode 100644 reference/C/MAN/mbtowc.htm create mode 100644 reference/C/MAN/memchr.htm create mode 100644 reference/C/MAN/memcmp.htm create mode 100644 reference/C/MAN/memcpy.htm create mode 100644 reference/C/MAN/memmove.htm create mode 100644 reference/C/MAN/memset.htm create mode 100644 reference/C/MAN/mkdir.htm create mode 100644 reference/C/MAN/modf.htm create mode 100644 reference/C/MAN/opendir.htm create mode 100644 reference/C/MAN/pause.htm create mode 100644 reference/C/MAN/perlembed.htm create mode 100644 reference/C/MAN/perror.htm create mode 100644 reference/C/MAN/printf.htm create mode 100644 reference/C/MAN/putenv.htm create mode 100644 reference/C/MAN/putpwent.htm create mode 100644 reference/C/MAN/puts.htm create mode 100644 reference/C/MAN/raise.htm create mode 100644 reference/C/MAN/rand.htm create mode 100644 reference/C/MAN/readdir.htm create mode 100644 reference/C/MAN/realloc.htm create mode 100644 reference/C/MAN/remove.htm create mode 100644 reference/C/MAN/rename.htm create mode 100644 reference/C/MAN/rewinddir.htm create mode 100644 reference/C/MAN/rmdir.htm create mode 100644 reference/C/MAN/scandir.htm create mode 100644 reference/C/MAN/scanf.htm create mode 100644 reference/C/MAN/seekdir.htm create mode 100644 reference/C/MAN/setbuf.htm create mode 100644 reference/C/MAN/setegid.htm create mode 100644 reference/C/MAN/setenv.htm create mode 100644 reference/C/MAN/seteuid.htm create mode 100644 reference/C/MAN/setgid.htm create mode 100644 reference/C/MAN/setjmp.htm create mode 100644 reference/C/MAN/setlocale.htm create mode 100644 reference/C/MAN/setpgid.htm create mode 100644 reference/C/MAN/setsid.htm create mode 100644 reference/C/MAN/setuid.htm create mode 100644 reference/C/MAN/signal.htm create mode 100644 reference/C/MAN/sin.htm create mode 100644 reference/C/MAN/sinh.htm create mode 100644 reference/C/MAN/sleep.htm create mode 100644 reference/C/MAN/sprintf.htm create mode 100644 reference/C/MAN/sqrt.htm create mode 100644 reference/C/MAN/stat.htm create mode 100644 reference/C/MAN/stderr.htm create mode 100644 reference/C/MAN/strcasecmp.htm create mode 100644 reference/C/MAN/strcat.htm create mode 100644 reference/C/MAN/strcoll.htm create mode 100644 reference/C/MAN/strcspn.htm create mode 100644 reference/C/MAN/strftime.htm create mode 100644 reference/C/MAN/strlen.htm create mode 100644 reference/C/MAN/strpbrk.htm create mode 100644 reference/C/MAN/strspn.htm create mode 100644 reference/C/MAN/strstr.htm create mode 100644 reference/C/MAN/strtod.htm create mode 100644 reference/C/MAN/sysconf.htm create mode 100644 reference/C/MAN/tan.htm create mode 100644 reference/C/MAN/tanh.htm create mode 100644 reference/C/MAN/telldir.htm create mode 100644 reference/C/MAN/test create mode 100644 reference/C/MAN/time.htm create mode 100644 reference/C/MAN/tmpfile.htm create mode 100644 reference/C/MAN/tmpnam.htm create mode 100644 reference/C/MAN/togetpgrp.htm create mode 100644 reference/C/MAN/toupper.htm create mode 100644 reference/C/MAN/ttyname.htm create mode 100644 reference/C/MAN/uname.htm create mode 100644 reference/C/MAN/ungetc.htm create mode 100644 reference/C/MAN/unlink.htm create mode 100644 reference/C/MAN/unsetenv.htm create mode 100644 reference/C/MAN/va_start.htm create mode 100644 reference/C/MAN/vfprintf.htm create mode 100644 reference/C/MAN/wcstombs.htm create mode 100644 reference/C/MAN/wctomb.htm (limited to 'reference/C/MAN') diff --git a/reference/C/MAN/Makefile.am b/reference/C/MAN/Makefile.am new file mode 100644 index 0000000..28d46b6 --- /dev/null +++ b/reference/C/MAN/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = $(wildcard *.html) $(wildcard *.htm) $(wildcard *.gif) +docs_DATA = $(EXTRA_DIST) + +docsdir = $(kde_htmldir)/en/kdevelop/$(subdir) + diff --git a/reference/C/MAN/Makefile.in b/reference/C/MAN/Makefile.in new file mode 100644 index 0000000..25161e6 --- /dev/null +++ b/reference/C/MAN/Makefile.in @@ -0,0 +1,410 @@ +# KDE tags expanded automatically by am_edit - $Revision: 1.2 $ +# Makefile.in generated automatically by automake 1.5 from Makefile.am. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AMTAR = @AMTAR@ +ARTSCCONFIG = @ARTSCCONFIG@ +AS = @AS@ +AUTODIRS = @AUTODIRS@ +AWK = @AWK@ +CC = @CC@ +CONF_FILES = @CONF_FILES@ +CPP = @CPP@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DCOPIDL = @DCOPIDL@ +DCOPIDL2CPP = @DCOPIDL2CPP@ +DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DPMSINC = @DPMSINC@ +DPMSLIB = @DPMSLIB@ +EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GLINC = @GLINC@ +GLLIB = @GLLIB@ +GMSGFMT = @GMSGFMT@ +IDL = @IDL@ +IDL_DEPENDENCIES = @IDL_DEPENDENCIES@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVAC = @JAVAC@ +JAVAH = @JAVAH@ +JVMLIBS = @JVMLIBS@ +KDECONFIG = @KDECONFIG@ +KDE_CXXFLAGS = @KDE_CXXFLAGS@ +KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@ +KDE_INCLUDES = @KDE_INCLUDES@ +KDE_LDFLAGS = @KDE_LDFLAGS@ +KDE_PLUGIN = @KDE_PLUGIN@ +KDE_RPATH = @KDE_RPATH@ +KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@ +KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@ +KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@ +KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@ +KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@ +LIBCOMPAT = @LIBCOMPAT@ +LIBCRYPT = @LIBCRYPT@ +LIBDL = @LIBDL@ +LIBGEN = @LIBGEN@ +LIBJPEG = @LIBJPEG@ +LIBMICO = @LIBMICO@ +LIBOBJS = @LIBOBJS@ +LIBPNG = @LIBPNG@ +LIBPTHREAD = @LIBPTHREAD@ +LIBPYTHON = @LIBPYTHON@ +LIBQIMGIO = @LIBQIMGIO@ +LIBRESOLV = @LIBRESOLV@ +LIBSHADOW = @LIBSHADOW@ +LIBSM = @LIBSM@ +LIBSOCKET = @LIBSOCKET@ +LIBTIFF = @LIBTIFF@ +LIBTOOL = @LIBTOOL@ +LIBUCB = @LIBUCB@ +LIBUTIL = @LIBUTIL@ +LIBXINERAMA = @LIBXINERAMA@ +LIBZ = @LIBZ@ +LIB_KAB = @LIB_KAB@ +LIB_KDECORE = @LIB_KDECORE@ +LIB_KDEUI = @LIB_KDEUI@ +LIB_KFILE = @LIB_KFILE@ +LIB_KFM = @LIB_KFM@ +LIB_KFORMULA = @LIB_KFORMULA@ +LIB_KHTML = @LIB_KHTML@ +LIB_KIMGIO = @LIB_KIMGIO@ +LIB_KIO = @LIB_KIO@ +LIB_KPARTS = @LIB_KPARTS@ +LIB_KSPELL = @LIB_KSPELL@ +LIB_KSYCOCA = @LIB_KSYCOCA@ +LIB_KWRITE = @LIB_KWRITE@ +LIB_QT = @LIB_QT@ +LIB_SMB = @LIB_SMB@ +LIB_X11 = @LIB_X11@ +LN_S = @LN_S@ +MCOPIDL = @MCOPIDL@ +MEINPROC = @MEINPROC@ +MICO_INCLUDES = @MICO_INCLUDES@ +MICO_LDFLAGS = @MICO_LDFLAGS@ +MOC = @MOC@ +MSGFMT = @MSGFMT@ +NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@ +NOREPO = @NOREPO@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PAMLIBS = @PAMLIBS@ +PASSWDLIBS = @PASSWDLIBS@ +PYTHONINC = @PYTHONINC@ +PYTHONLIB = @PYTHONLIB@ +PYTHONMODDIR = @PYTHONMODDIR@ +QT_INCLUDES = @QT_INCLUDES@ +QT_LDFLAGS = @QT_LDFLAGS@ +RANLIB = @RANLIB@ +REPO = @REPO@ +SETUIDFLAGS = @SETUIDFLAGS@ +STRIP = @STRIP@ +TOPSUBDIRS = @TOPSUBDIRS@ +UIC = @UIC@ +UIC_TR = @UIC_TR@ +USER_INCLUDES = @USER_INCLUDES@ +USER_LDFLAGS = @USER_LDFLAGS@ +USE_EXCEPTIONS = @USE_EXCEPTIONS@ +USE_RTTI = @USE_RTTI@ +USE_THREADS = @USE_THREADS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XPMINC = @XPMINC@ +XPMLIB = @XPMLIB@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_INCLUDES = @X_INCLUDES@ +X_LDFLAGS = @X_LDFLAGS@ +X_PRE_LIBS = @X_PRE_LIBS@ +all_includes = @all_includes@ +all_libraries = @all_libraries@ +am__include = @am__include@ +am__quote = @am__quote@ +idldir = @idldir@ +install_sh = @install_sh@ +jni_includes = @jni_includes@ +kde_appsdir = @kde_appsdir@ +kde_bindir = @kde_bindir@ +kde_confdir = @kde_confdir@ +kde_datadir = @kde_datadir@ +kde_htmldir = @kde_htmldir@ +kde_icondir = @kde_icondir@ +kde_includes = @kde_includes@ +kde_libraries = @kde_libraries@ +kde_libs_htmldir = @kde_libs_htmldir@ +kde_libs_prefix = @kde_libs_prefix@ +kde_locale = @kde_locale@ +kde_mimedir = @kde_mimedir@ +kde_moduledir = @kde_moduledir@ +kde_qtver = @kde_qtver@ +kde_servicesdir = @kde_servicesdir@ +kde_servicetypesdir = @kde_servicetypesdir@ +kde_sounddir = @kde_sounddir@ +kde_templatesdir = @kde_templatesdir@ +kde_wallpaperdir = @kde_wallpaperdir@ +micodir = @micodir@ +qt_includes = @qt_includes@ +qt_libraries = @qt_libraries@ +x_includes = @x_includes@ +x_libraries = @x_libraries@ + +EXTRA_DIST = $(wildcard *.html) $(wildcard *.htm) $(wildcard *.gif) +docs_DATA = $(EXTRA_DIST) + +docsdir = $(kde_htmldir)/en/kdevelop/$(subdir) +subdir = reference/C/MAN +mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DATA = $(docs_DATA) + +DIST_COMMON = Makefile.am Makefile.in +#>- all: all-am +#>+ 1 +all: docs-am all-am + +.SUFFIXES: + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +#>- cd $(top_srcdir) && \ +#>- $(AUTOMAKE) --gnu reference/C/MAN/Makefile +#>+ 3 + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu reference/C/MAN/Makefile + cd $(top_srcdir) && perl admin/am_edit reference/C/MAN/Makefile.in +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status +uninstall-info-am: +install-docsDATA: $(docs_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(docsdir) + @list='$(docs_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(docsdir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(docsdir)/$$f; \ + done + +uninstall-docsDATA: + @$(NORMAL_UNINSTALL) + @list='$(docs_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(docsdir)/$$f"; \ + rm -f $(DESTDIR)$(docsdir)/$$f; \ + done +tags: TAGS +TAGS: + + +#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +#>+ 4 +KDE_DIST=fputs.htm rename.htm modf.htm assert.htm labs.htm asctime.htm setpgid.htm longjmp.htm scanf.htm sleep.htm closedir.htm getpwnam.htm ldexp.htm sysconf.htm wcstombs.htm perror.htm seekdir.htm setlocale.htm toupper.htm realloc.htm calloc.htm fmod.htm seteuid.htm fpathconf.htm frexp.htm telldir.htm readdir.htm ungetc.htm memchr.htm atan2.htm putenv.htm getpw.htm tmpnam.htm ttyname.htm stat.htm memcpy.htm rmdir.htm time.htm cos.htm abs.htm close.htm unsetenv.htm strspn.htm remove.htm strpbrk.htm setjmp.htm pause.htm mbstowcs.htm lseek.htm alarm.htm strtod.htm chroot.htm getopt.htm strcasecmp.htm sinh.htm tan.htm mkdir.htm mbtowc.htm uname.htm sqrt.htm fabs.htm chdir.htm dup2.htm setenv.htm rand.htm getenv.htm stderr.htm setuid.htm perlembed.htm getuid.htm difftime.htm ldiv.htm tanh.htm tmpfile.htm strcoll.htm gets.htm acos.htm floor.htm freopen.htm putpwent.htm exp.htm strlen.htm setegid.htm togetpgrp.htm ceil.htm ctermid.htm index.htm scandir.htm sin.htm atan.htm strstr.htm strcat.htm getpgrp.htm memmove.htm memcmp.htm ioctl.htm opendir.htm unlink.htm fread.htm ferror.htm fgetpwent.htm access.htm chown.htm strftime.htm mblen.htm test getgroupd.htm signal.htm getlogin.htm isatty.htm va_start.htm vfprintf.htm cosh.htm div.htm gethostname.htm setsid.htm memset.htm fflush.htm wctomb.htm getpid.htm cuserid.htm fscanf.htm getpwent.htm fgetpos.htm asin.htm strcspn.htm link.htm setgid.htm clock.htm raise.htm rewinddir.htm setbuf.htm getdid.htm + +DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + + +top_distdir = ../../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + $(mkinstalldirs) "$(distdir)/$$dir"; \ + fi; \ + if test -d $$d/$$file; then \ + cp -pR $$d/$$file $(distdir) \ + || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(docsdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +#>- clean: clean-am +#>+ 1 +clean: kde-rpo-clean clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-docsDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +uninstall-am: uninstall-docsDATA uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-docsDATA install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool uninstall uninstall-am uninstall-docsDATA \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +#>+ 2 +docs-am: + +#>+ 6 +force-reedit: + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu reference/C/MAN/Makefile + cd $(top_srcdir) && perl admin/am_edit reference/C/MAN/Makefile.in + + +#>+ 2 +final: + $(MAKE) all-am +#>+ 2 +final-install: + $(MAKE) install-am +#>+ 2 +no-final: + $(MAKE) all-am +#>+ 2 +no-final-install: + $(MAKE) install-am +#>+ 3 +cvs-clean: + $(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean + +#>+ 3 +kde-rpo-clean: + -rm -f *.rpo diff --git a/reference/C/MAN/abs.htm b/reference/C/MAN/abs.htm new file mode 100644 index 0000000..3472024 --- /dev/null +++ b/reference/C/MAN/abs.htm @@ -0,0 +1,101 @@ +abs + +
+
+
+
+
+

ABS(3) Linux Programmer's Manual ABS(3) +

+ +

NAME +

abs - computes the absolute value of an integer. + +

SYNOPSIS +

#include <stdlib.h> + + int abs(int j); + +

DESCRIPTION +

The abs() function computes the absolute value of the + integer argument j. + +

RETURN VALUE +

Returns the absolute value of the integer argument. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +

NOTES +

Trying to take the absolute value of the most negative + integer is not defined. + +
+
+

SEE ALSO +

+ceil, +floor, +fabs, +, +rint, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU June 6, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/access.htm b/reference/C/MAN/access.htm new file mode 100644 index 0000000..71154b7 --- /dev/null +++ b/reference/C/MAN/access.htm @@ -0,0 +1,166 @@ +access + +
+
+
+
+
+

ACCESS(2) Linux Programmer's Manual ACCESS(2) +

+ +

NAME +

access - check user's permissions for a file + +

SYNOPSIS +

#include <unistd.h> + + int access(const char *pathname, int mode); + +

DESCRIPTION +

access checks whether the process would be allowed to + read, write or test for existence of the file (or other + file system object) whose name is pathname. + + mode is a mask consisting of one or more of R_OK, W_OK, + X_OK and F_OK. + + R_OK, W_OK and X_OK request testing for reading, writing + and executing the file, respectively. F_OK requests + checking whether merely testing for the existence of the + file would be allowed (this depends on the permissions of + the directories in the path to the file, as given in path- + name.) + + The check is done with the process's real uid and gid, + rather than with the effective ids as is done when actu- + ally attempting an operation. This is to allow set-UID + programs to easily determine the invoking user's author- + ity. + + Only access bits are checked, not the file type or con- + tents. Therefore, if a directory is found to be + "writable," it probably means that files can be created in + the directory, and not that the directory can be written + as a file. Similarly, a DOS file may be found to be "exe- + cutable," but the execve(2) call will still fail. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EACCES The requested access would be denied, either to + the file itself or one of the directories in path- + name. + + EFAULT pathname points outside your accessible address + space. + + EINVAL mode was incorrectly specified. + + ENAMETOOLONG + pathname is too long. + + ENOENT A directory component in pathname would have been + + + +

Linux 1.1.46 21 August 1994 1 +

+ + + + +

ACCESS(2) Linux Programmer's Manual ACCESS(2) +

+ + accessible but does not exist or was a dangling + symbolic link. + + ENOTDIR A component used as a directory in pathname is + not, in fact, a directory. + + ENOMEM Insufficient kernel memory was available. + + ELOOP pathname contains a reference to a circular sym- + bolic link, i.e., a symbolic link containing a + reference to itself. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+stat, +open, +chmod, +chown, +setuid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.1.46 21 August 1994 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/acos.htm b/reference/C/MAN/acos.htm new file mode 100644 index 0000000..e8dce6a --- /dev/null +++ b/reference/C/MAN/acos.htm @@ -0,0 +1,102 @@ +acos + +
+
+
+
+
+

ACOS(3) Linux Programmer's Manual ACOS(3) +

+ +

NAME +

acos - arc cosine function + +

SYNOPSIS +

#include <math.h> + + double acos(double x); + +

DESCRIPTION +

The acos() function calculates the arc cosine of x; that + is the value whose cosine is x. If x falls outside the + range -1 to 1, acos() fails and errno is set. + +

RETURN VALUE +

The acos() function returns the arc cosine in radians and + the value is mathematically defined to be between 0 and PI + (inclusive). + +

ERRORS +

EDOM x is out of range. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+asin, +atan, +atan2, +cos, +sin, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/alarm.htm b/reference/C/MAN/alarm.htm new file mode 100644 index 0000000..1400610 --- /dev/null +++ b/reference/C/MAN/alarm.htm @@ -0,0 +1,102 @@ +alarm + +
+
+
+
+
+

ALARM(2) Linux Programmer's Manual ALARM(2) +

+ +

NAME +

alarm - set an alarm clock for delivery of a signal + +

SYNOPSIS +

#include <unistd.h> + + long alarm(long seconds); + +

DESCRIPTION +

alarm arranges for a SIGALRM signal to be delivered to the + process in seconds seconds. + + If seconds is zero, no new alarm is scheduled. + + In any event any previously set alarm is cancelled. + +

RETURN VALUE +

alarm returns the number of seconds remaining until any + previously scheduled alarm was due to be delivered, or + zero if there was no previously scheduled alarm. + +

NOTES +

alarm and setitimer share the same timer; calls to one + will interfere with use of the other. + + Scheduling delays can, as ever, cause the execution of the + process to be delayed by an arbitrary amount of time. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+setitimer, +signal, +sigaction, +gettimeofday, +select, +pause, +sleep, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 21 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/asctime.htm b/reference/C/MAN/asctime.htm new file mode 100644 index 0000000..d40f4cb --- /dev/null +++ b/reference/C/MAN/asctime.htm @@ -0,0 +1,233 @@ +asctime + +
+
+
+
+
+

CTIME(3) Linux Programmer's Manual CTIME(3) +

+ +

NAME +

asctime, ctime, gmtime, localtime, mktime - transform + binary date and time to ASCII + +

SYNOPSIS +

#include <time.h> + + char *asctime(const struct tm *timeptr); + + char *ctime(const time_t *timep); + + struct tm *gmtime(const time_t *timep); + + struct tm *localtime(const time_t *timep); + + time_t mktime(struct tm *timeptr); + + extern char *tzname[2]; + long int timezone; + extern int daylight; + +

DESCRIPTION +

The ctime(), gmtime() and localtime() functions all take + an argument of data type time_t which represents calendar + time. When interpreted as an absolute time value, it rep- + resents the number of seconds elapsed since 00:00:00 on + January 1, 1970, Coordinated Universal Time (UTC). + + The asctime() and mktime() functions both take an argument + representing broken-down time which is a binary represen- + tation separated into year, month, day, etc. Broken-down + time is stored in the structure tm which is defined in + <time.h> as follows: + + struct tm + { + int tm_sec; /* seconds */ + int tm_min; /* minutes */ + int tm_hour; /* hours */ + int tm_mday; /* day of the month */ + int tm_mon; /* month */ + int tm_year; /* year */ + int tm_wday; /* day of the week */ + int tm_yday; /* day in the year */ + int tm_isdst; /* daylight saving time */ + }; + + The members of the tm structure are: + + tm_sec The number of seconds after the minute, normally in + the range 0 to 59, but can be up to 61 to allow for + leap seconds. + + tm_min The number of minutes after the hour, in the range + + + +

BSD June 30, 1993 1 +

+ + + + +

CTIME(3) Linux Programmer's Manual CTIME(3) +

+ + 0 to 59. + + tm_hour + The number of hours past midnight, in the range 0 + to 23. + + tm_mday + The day of the month, in the range 1 to 31. + + tm_mon The number of months since January, in the range 0 + to 11. + + tm_year + The number of years since 1900. + + tm_wday + The number of days since Sunday, in the range 0 to + 6. + + tm_yday + The number of days since January 1, in the range 0 + to 365. + + tm_isdst + A flag that indicates whether daylight saving time + is in effect at the time described. The value is + positive if daylight saving time is in effect, zero + if it is not, and negative if the information is + not available. + + The ctime() function converts the calendar time timep into + a string of the form + + "Wed Jun 30 21:49:08 1993\n" + + The abbreviations for the days of the week are `Sun', + `Mon', `Tue', `Wed', `Thu', `Fri', and `Sat'. The abbre- + viations for the months are `Jan', `Feb', `Mar', `Apr', + `May', `Jun', `Jul', `Aug', `Sep', `Oct', `Nov', and + `Dec'. The return value points to a statically allocated + string which might be overwritten by subsequent calls to + any of the date and time functions. The function also + sets the external variable tzname with information about + the current time zone. + + The gmtime() function converts the calendar time timep to + broken-down time representation, expressed in Coordinated + Universal Time (UTC). + + The localtime() function converts the calendar time timep + to broken-time representation, expressed relative to the + user's specified time zone. The function sets the + external variables tzname with information about the cur- + rent time zone, timezone with the difference between + + + +

BSD June 30, 1993 2 +

+ + + + +

CTIME(3) Linux Programmer's Manual CTIME(3) +

+ + Coordinated Universal Time (UTC) and local standard time + in seconds, and daylight to a non-zero value if standard + US daylight savings time rules apply. + + The asctime() function converts the broken-down time value + timeptr into a string with the same format as ctime(). + The return value points to a statically allocated string + which might be overwritten by subsequent calls to any of + the date and time functions. + + The mktime() function converts a broken-down time struc- + ture to calendar time representation. The function + ignores the specified contents of the structure members + tm_wday and tm_yday and recomputes them from the other + information in the broken-down time structure. Calling + mktime() also sets the external variable tzname with + information about the current time zone. If the specified + broken-down time cannot be represented as calendar time, + mktime() returns a value of (time_t)(-1) and does not + alter the tm_wday and tm_yday members of the broken-down + time structure. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+date, +gettimeofday, +time, +tzset, +difftime, +strftime, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

BSD June 30, 1993 3 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/asin.htm b/reference/C/MAN/asin.htm new file mode 100644 index 0000000..b742beb --- /dev/null +++ b/reference/C/MAN/asin.htm @@ -0,0 +1,102 @@ +asin + +
+
+
+
+
+

ASIN(3) Linux Programmer's Manual ASIN(3) +

+ +

NAME +

asin - arc sine function + +

SYNOPSIS +

#include <math.h> + + double asin(double x); + +

DESCRIPTION +

The asin() function calculates the arc sine of x; that is + the value whose sine is x. If x falls outside the range + -1 to 1, asin() fails and errno is set. + +

RETURN VALUE +

The asin() function returns the arc sine in radians and + the value is mathematically defined to be between -PI/2 + and PI/2 (inclusive). + +

ERRORS +

EDOM x is out of range. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +atan, +atan2, +cos, +sin, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/assert.htm b/reference/C/MAN/assert.htm new file mode 100644 index 0000000..f5656d1 --- /dev/null +++ b/reference/C/MAN/assert.htm @@ -0,0 +1,98 @@ +assert + +
+
+
+
+
+

ASSERT(3) Linux Programmer's Manual ASSERT(3) +

+ +

NAME +

assert - Abort the program if assertion is false. + +

SYNOPSIS +

#include <assert.h> + + void assert (int expression); + +

DESCRIPTION +

assert() prints an error message to standard output and + terminates the program by calling abort() if expression is + false (i.e., compares equal to zero). This only happens + when the macro NDEBUG is undefined. + +

RETURN VALUE +

No value is returned. + +

CONFORMS TO +

ANSI - C + +

BUGS +

assert() is implemented as a macro; if the expression + tested has side - effects, program behaviour will be dif- + ferent depending on whether NDEBUG is defined. This may + create Heisenbugs which go away when debugging is turned + on. + +
+
+

SEE ALSO +

+exit, +abort, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/atan.htm b/reference/C/MAN/atan.htm new file mode 100644 index 0000000..2c4509a --- /dev/null +++ b/reference/C/MAN/atan.htm @@ -0,0 +1,102 @@ +atan + +
+
+
+
+
+

ATAN(3) Linux Programmer's Manual ATAN(3) +

+ +

NAME +

atan - arc tangent function + +

SYNOPSIS +

#include <math.h> + + double atan(double x); + +

DESCRIPTION +

The atan() function calculates the arc tangent of x; that + is the value whose tangent is x. + +

RETURN VALUE +

The atan() function returns the arc tangent in radians and + the value is mathematically defined to be between -PI/2 + and PI/2 (inclusive). + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +asin, +atan2, +cos, +sin, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/atan2.htm b/reference/C/MAN/atan2.htm new file mode 100644 index 0000000..c5910e4 --- /dev/null +++ b/reference/C/MAN/atan2.htm @@ -0,0 +1,102 @@ +atan2 + +
+
+
+
+
+

ATAN2(3) Linux Programmer's Manual ATAN2(3) +

+ +

NAME +

atan2 - arc tangent function of two variables + +

SYNOPSIS +

#include <math.h> + + double atan2(double y, double x); + +

DESCRIPTION +

The atan2() function calculates the arc tangent of the two + variables x and y. It is similar to calculating the arc + tangent of y / x, except that the signs of both arguments + are used to determine the quadrant of the result. + +

RETURN VALUE +

The atan2() function returns the result in radians, which + is between -PI and PI (inclusive). + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +asin, +atan, +cos, +sin, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/calloc.htm b/reference/C/MAN/calloc.htm new file mode 100644 index 0000000..fadf4e7 --- /dev/null +++ b/reference/C/MAN/calloc.htm @@ -0,0 +1,97 @@ +calloc + +
+
+
+
+
+

MALLOC(3) Linux Programmer's Manual MALLOC(3) +

+ +

NAME +

calloc, malloc, free, realloc - Allocate and free dynamic + memory + +

SYNOPSIS +

#include <stdlib.h> + + void *calloc(size_t nmemb, size_t size); + void *malloc(size_t size); + void free(void *ptr); + void *realloc(void *ptr, size_t size); + +

DESCRIPTION +

calloc() allocates memory for an array of nmemb elements + of size bytes each and returns a pointer to the allocated + memory. The memory is set to zero. + + malloc() allocates size bytes and returns a pointer to the + allocated memory. The memory is not cleared. + + free() frees the memory space pointed to by ptr, which + must have been returned by a previous call to malloc(), + calloc() or realloc(). If ptr is NULL, no operation is + performed. + + realloc() changes the size of the memory block pointed to + by ptr to size bytes. The contents will be unchanged to + the minimum of the old an new sizes; newly allocated mem- + ory will be uninitialized. If ptr is NULL, the call is + equivalent to malloc(size); if size is equal to zero, the + call is equivalent to free(ptr). Unless ptr is NULL, it + must have been returned by an earlier call to malloc(), + calloc() or realloc(). + +

RETURN VALUES +

For calloc() and malloc(), the value returned is a pointer + to the allocated memory, which is suitably aligned for any + kind of variable, or NULL if the request fails. + + free() returns no value. + + realloc() returns a pointer to the newly allocated memory, + which is suitably aligned for any kind of variable and may + be different from ptr, or NULL if the request fails or if + size was equal to 0. If realloc() fails the original + block is left untouched - it is not freed or moved. + +

CONFORMS TO +

ANSI - C + +
+
+

SEE ALSO +

+brk, +

+
+
+
+
+
+

GNU April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ceil.htm b/reference/C/MAN/ceil.htm new file mode 100644 index 0000000..aa474c3 --- /dev/null +++ b/reference/C/MAN/ceil.htm @@ -0,0 +1,101 @@ +ceil + +
+
+
+
+
+

CEIL(3) Linux Programmer's Manual CEIL(3) +

+ +

NAME +

ceil - smallest integral value not less than x + +

SYNOPSIS +

#include <math.h> + + double ceil (double x); + +

DESCRIPTION +

The ceil() function rounds x upwards to the nearest inte- + ger, returning that value as a double. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+abs, +fabs, +floor, +, +rint, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 6, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/chdir.htm b/reference/C/MAN/chdir.htm new file mode 100644 index 0000000..da59d26 --- /dev/null +++ b/reference/C/MAN/chdir.htm @@ -0,0 +1,98 @@ +chdir + +
+
+
+
+
+

CHDIR(2) Linux Programmer's Manual CHDIR(2) +

+ +

NAME +

chdir, fchdir - change working directory + +

SYNOPSIS +

#include <unistd.h> + + int chdir(const char *path); + int fchdir(int fd); + +

DESCRIPTION +

chdir changes the current directory to that specified in + path. + + fchdir is identical to chdir, only that the directory is + given as an open file descriptor. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

Depending on the file system, other errors can be + returned. The more general errors are listed below: + + + EPERM The process does not have execute permission on + the directory. + + EFAULT path points outside your accessible address space. + + ENAMETOOLONG + path is too long. + + EBADF The fd is not a valid file descriptor. + + ENOENT The file does not exist. + + ENOMEM Insufficient kernel memory was available. + + ENOTDIR A component of the path prefix is not a directory. + + EACCES Search permission is denied on a component of the + path prefix. + + ELOOP path contains a circular reference (i.e., via a + symbolic link) + +
+
+

SEE ALSO +

+getcwd, +chroot, +

+
+
+
+
+
+
+
+
+

Linux 1.2.4 15 April 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/chown.htm b/reference/C/MAN/chown.htm new file mode 100644 index 0000000..51106de --- /dev/null +++ b/reference/C/MAN/chown.htm @@ -0,0 +1,93 @@ +chown + +
+
+
+
+
+

CHOWN(1L) CHOWN(1L) +

+ +

NAME +

chown - change the user and group ownership of files + +

SYNOPSIS +

chown [-Rcfv] [--recursive] [--changes] [--help] [--ver- + sion] [--silent] [--quiet] [--verbose] [user][:.][group] + file... + +

DESCRIPTION +

This manual page documents the GNU version of chown. + chown changes the user and/or group ownership of each + given file, according to its first non-option argument, + which is interpreted as follows. If only a user name (or + numeric user ID) is given, that user is made the owner of + each given file, and the files' group is not changed. If + the user name is followed by a colon or dot and a group + name (or numeric group ID), with no spaces between them, + the group ownership of the files is changed as well. If a + colon or dot but no group name follows the user name, that + user is made the owner of the files and the group of the + files is changed to that user's login group. If the colon + or dot and group are given, but the user name is omitted, + only the group of the files is changed; in this case, + chown performs the same function as chgrp. + + OPTIONS + -c, --changes + Verbosely describe only files whose ownership actu- + ally changes. + + -f, --silent, --quiet + Do not print error messages about files whose own- + ership cannot be changed. + + -v, --verbose + Verbosely describe ownership changes. + + -R, --recursive + Recursively change ownership of directories and + their contents. + + --help Print a usage message on standard output and exit + successfully. + + --version + Print version information on standard output then + exit successfully. + + + + + + + + + + +

FSF GNU File Utilities 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/chroot.htm b/reference/C/MAN/chroot.htm new file mode 100644 index 0000000..0863dbb --- /dev/null +++ b/reference/C/MAN/chroot.htm @@ -0,0 +1,97 @@ +chroot + +
+
+
+
+
+

CHROOT(2) Linux Programmer's Manual CHROOT(2) +

+ +

NAME +

chroot - change root directory + +

SYNOPSIS +

#include <unistd.h> + + int chroot(const char *path); + +

DESCRIPTION +

chroot changes the root directory to that specified in + path. This directory will be used for path name beginning + with /. The root directory is inherited by all children + of the current process. + + Only the super-user may change the root directory. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

Depending on the file system, other errors can be + returned. The more general errors are listed below: + + + EPERM The effective UID does not match the owner of the + file, and is not zero; or the owner or group were + specified incorrectly. + + EROFS The named file resides on a read-only file system. + + EFAULT path points outside your accessible address space. + + ENAMETOOLONG + path is too long. + + ENOENT The file does not exist. + + ENOMEM Insufficient kernel memory was available. + + ENOTDIR A component of the path prefix is not a directory. + + EACCES Search permission is denied on a component of the + path prefix. + + ELOOP path contains a circular reference (i.e., via a + symbolic link) + +
+
+

SEE ALSO +

+chdir, +

+
+
+
+
+
+
+
+

Linux 1.1.46 21 August 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/clock.htm b/reference/C/MAN/clock.htm new file mode 100644 index 0000000..fd844a8 --- /dev/null +++ b/reference/C/MAN/clock.htm @@ -0,0 +1,97 @@ +clock + +
+
+
+
+
+

CLOCK(3) Linux Programmer's Manual CLOCK(3) +

+ +

NAME +

clock - Determine processor time + +

SYNOPSIS +

#include <time.h> + + clock_t clock(void); + +

DESCRIPTION +

The clock() function returns an approximation of processor + time used by the program. + +

RETURN VALUE +

The value returned is the CPU time used so far as a + clock_t; to get the number of seconds used, divide by + CLOCKS_PER_SEC. + +

CONFORMS TO +

ANSI C + +

BUGS +

The C standard allows for arbitrary values at the start of + the program; take the difference between the value + returned from a call to clock() at the start of the pro- + gram and the end to get maximum portability. + + The times() function call returns more information. + +
+
+

SEE ALSO +

+times, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 21, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/close.htm b/reference/C/MAN/close.htm new file mode 100644 index 0000000..a2164bc --- /dev/null +++ b/reference/C/MAN/close.htm @@ -0,0 +1,100 @@ +close + +
+
+
+
+
+

CLOSE(2) Linux Programmer's Manual CLOSE(2) +

+ +

NAME +

close - close a file descriptor + +

SYNOPSIS +

#include <unistd.h> + + int close(int fd); + +

DESCRIPTION +

close closes a file descriptor, so that it no longer + refers to any file and may be reused. + + If fd is the last copy of a particular file descriptor the + resources associated with it are freed; for example any + locks held are removed and if the descriptor was the last + reference to a file which has been removed using unlink + the file is deleted. + +

RETURN VALUE +

close returns zero on success, or -1 if an error occurred. + +

ERRORS +

EBADF fd isn't a valid open file descriptor. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +

NOTES +

Not checking the return value of close is a common but + nevertheless serious programming error. File system + implementations which use techniques as ``write-behind'' + to increase performance may lead to write(2) succeeding, + although the data has not been written yet. The error + status may be reported at a later write operation, but it + is guaranteed to be reported on closing the file. Not + checking the return value when closing the file may lead + to silent loss of data. This can especially be observed + with NFS and disk quotas. + +
+
+

SEE ALSO +

+open, +fcntl, +shutdown, +unlink, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                        February 18, 1995                       1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/closedir.htm b/reference/C/MAN/closedir.htm new file mode 100644 index 0000000..81de2de --- /dev/null +++ b/reference/C/MAN/closedir.htm @@ -0,0 +1,102 @@ +closedir + +
+
+
+
+
+

CLOSEDIR(3) Linux Programmer's Manual CLOSEDIR(3) +

+ +

NAME +

closedir - close a directory + +

SYNOPSIS +

#include <sys/types.h> + + #include <dirent.h> + + int closedir(DIR *dir); + +

DESCRIPTION +

The closedir() function closes the directory stream asso- + ciated with dir. The directory stream descriptor dir is + not available after this call. + +

RETURN VALUE +

The closedir() function returns 0 on success or -1 on + failure. + +

ERRORS +

EBADF Invalid directory stream descriptor dir. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+close, +opendir, +readdir, +rewinddir, +seekdir, +telldir, +scandir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           11 June 1995                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/cos.htm b/reference/C/MAN/cos.htm new file mode 100644 index 0000000..d815245 --- /dev/null +++ b/reference/C/MAN/cos.htm @@ -0,0 +1,102 @@ +cos + +
+
+
+
+
+

COS(3) Linux Programmer's Manual COS(3) +

+ +

NAME +

cos - cosine function + +

SYNOPSIS +

#include <math.h> + + double cos(double x); + +

DESCRIPTION +

The cos() function returns the cosine of x, where x is + given in radians. + +

RETURN VALUE +

The cos() function returns a value between -1 and 1. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +asin, +atan, +atan2, +sin, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/cosh.htm b/reference/C/MAN/cosh.htm new file mode 100644 index 0000000..efc0b4a --- /dev/null +++ b/reference/C/MAN/cosh.htm @@ -0,0 +1,101 @@ +cosh + +
+
+
+
+
+

COSH(3) Linux Programmer's Manual COSH(3) +

+ +

NAME +

cosh - hyperbolic cosine function + +

SYNOPSIS +

#include <math.h> + + double cosh(double x); + +

DESCRIPTION +

The cosh() function returns the hyperbolic cosine of x, + which is defined mathematically as exp(x) + exp(-x) / 2. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acosh, +asinh, +atanh, +sinh, +tanh, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          June 13, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ctermid.htm b/reference/C/MAN/ctermid.htm new file mode 100644 index 0000000..d852127 --- /dev/null +++ b/reference/C/MAN/ctermid.htm @@ -0,0 +1,97 @@ +ctermid + +
+
+
+
+
+

CTERMID(3) Linux Programmer's Manual CTERMID(3) +

+ +

NAME +

ctermid - get controlling terminal name + +

SYNOPSIS +

#include <stdio.h> + + char *ctermid(char *s); + +

DESCRIPTION +

ctermid() returns a string which is the pathname for the + current controlling terminal for this process. If s is + NULL, a static buffer is used, otherwise s points to a + buffer used to hold the terminal pathname. The symbolic + constant L_ctermid is the maximum number of characters in + the returned pathname. + +

RETURN VALUE +

The pointer to the pathname. + +

CONFORMS TO +

POSIX.1 + +

BUGS +

The path returned may not uniquely identify the control- + ling terminal; it may, for example, be /dev/tty. + + It is not assured that the program can open the terminal. + +
+
+

SEE ALSO +

+ttyname, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 6, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/cuserid.htm b/reference/C/MAN/cuserid.htm new file mode 100644 index 0000000..c398287 --- /dev/null +++ b/reference/C/MAN/cuserid.htm @@ -0,0 +1,27 @@ +cuserid + +
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/difftime.htm b/reference/C/MAN/difftime.htm new file mode 100644 index 0000000..e067c9c --- /dev/null +++ b/reference/C/MAN/difftime.htm @@ -0,0 +1,101 @@ +difftime + +
+
+
+
+
+

DIFFTIME(3) Linux Programmer's Manual DIFFTIME(3) +

+ +

NAME +

difftime - calculate time difference + +

SYNOPSIS +

#include <time.h> + + double difftime(time_t time1, time_t time0); + +

DESCRIPTION +

The difftime() function returns the number of seconds + elapsed between time time1 and time time0. The two times + are specified in calendar time, which represents the time + elapsed since 00:00:00 on January 1, 1970, Coordinated + Universal Time (UTC). + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+date, +gettimeofday, +time, +ctime, +gmtime, +, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU July 2, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/div.htm b/reference/C/MAN/div.htm new file mode 100644 index 0000000..ff3b170 --- /dev/null +++ b/reference/C/MAN/div.htm @@ -0,0 +1,97 @@ +div + +
+
+
+
+
+

DIV(3) Linux Programmer's Manual DIV(3) +

+ +

NAME +

div - computes the quotient and remainder of integer divi- + sion + +

SYNOPSIS +

#include <stdlib.h> + + div_t div(int numer, int denom); + +

DESCRIPTION +

The div() function computes the value numer/denom and + returns the quotient and remainder in a structure named + div_t that contains two integer members named quot and + rem. + +

RETURN VALUE +

The div_t structure. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 6, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/dup.htm b/reference/C/MAN/dup.htm new file mode 100644 index 0000000..4ade0c3 --- /dev/null +++ b/reference/C/MAN/dup.htm @@ -0,0 +1,98 @@ +dup + +
+
+
+
+
+

DUP(2) Linux Programmer's Manual DUP(2) +

+ +

NAME +

dup, dup2 - duplicate a file descriptor + +

SYNOPSIS +

#include <unistd.h> + + int dup(int oldfd); + int dup2(int oldfd, int newfd); + +

DESCRIPTION +

dup and dup2 create a copy of the file descriptor oldfd. + + The old and new descriptors may be used interchangeably. + They share locks, file position pointers and flags; for + example, if the file position is modified by using lseek + on one of the descriptors, the position is also changed + for the other. + + The two descriptors do not share the close-on-exec flag, + however. + + dup uses the lowest-numbered unused descriptor for the new + descriptor. + + dup2 makes newfd be the copy of oldfd, closing newfd first + if necessary. + +

RETURN VALUE +

dup and dup2 return the new descriptor, or -1 if an error + occurred (in which case, errno is set appropriately). + +

ERRORS +

EBADF oldfd isn't an open file descriptor, or newfd is + out of the allowed range for file descriptors. + + EMFILE The process already has the maximum number of file + descriptors open and tried to open a new one. + +

WARNING +

The error returned by dup2 is different to that returned + by fcntl(...,F_DUPFD,...) when newfd is out of range. On + some systems dup2 also sometimes returns EINVAL like + F_DUPFD. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+fcntl, +open, +

+
+
+
+
+
+
+
+
+

Linux 1.1.46 21 August 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/dup2.htm b/reference/C/MAN/dup2.htm new file mode 100644 index 0000000..74e702f --- /dev/null +++ b/reference/C/MAN/dup2.htm @@ -0,0 +1,98 @@ +dup2 + +
+
+
+
+
+

DUP(2) Linux Programmer's Manual DUP(2) +

+ +

NAME +

dup, dup2 - duplicate a file descriptor + +

SYNOPSIS +

#include <unistd.h> + + int dup(int oldfd); + int dup2(int oldfd, int newfd); + +

DESCRIPTION +

dup and dup2 create a copy of the file descriptor oldfd. + + The old and new descriptors may be used interchangeably. + They share locks, file position pointers and flags; for + example, if the file position is modified by using lseek + on one of the descriptors, the position is also changed + for the other. + + The two descriptors do not share the close-on-exec flag, + however. + + dup uses the lowest-numbered unused descriptor for the new + descriptor. + + dup2 makes newfd be the copy of oldfd, closing newfd first + if necessary. + +

RETURN VALUE +

dup and dup2 return the new descriptor, or -1 if an error + occurred (in which case, errno is set appropriately). + +

ERRORS +

EBADF oldfd isn't an open file descriptor, or newfd is + out of the allowed range for file descriptors. + + EMFILE The process already has the maximum number of file + descriptors open and tried to open a new one. + +

WARNING +

The error returned by dup2 is different to that returned + by fcntl(...,F_DUPFD,...) when newfd is out of range. On + some systems dup2 also sometimes returns EINVAL like + F_DUPFD. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+fcntl, +open, +

+
+
+
+
+
+
+
+
+

Linux 1.1.46 21 August 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/exp.htm b/reference/C/MAN/exp.htm new file mode 100644 index 0000000..9b9cc1a --- /dev/null +++ b/reference/C/MAN/exp.htm @@ -0,0 +1,98 @@ +exp + +
+
+
+
+
+

EXP(3) Linux Programmer's Manual EXP(3) +

+ +

NAME +

exp, log, log10, pow - exponential, logarithmic and power + functions + +

SYNOPSIS +

#include <math.h> + + double exp(double x); + + double log(double x); + + double log10(double x); + + double pow(double x, double y); + +

DESCRIPTION +

The exp() function returns the value of e (the base of + natural logarithms) raised to the power of x. + + The log() function returns the natural logarithm of x. + + The log10() function returns the base-10 logarithm of x. + + The pow() function returns the value of x raised to the + power of y. + +

ERRORS +

The log() and log10() functions can return the following + errors: + + EDOM The argument x is negative. + + ERANGE The argument x is zero. The log of zero is not + defined. + + The pow() function can return the following error: + + EDOM The argument x is negative and y is not an integral + value. This would result in a complex number. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+sqrt, +cbrt, +

+
+
+
+
+
+
+
+
+
+
+
+
+

GNU June 16, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fabs.htm b/reference/C/MAN/fabs.htm new file mode 100644 index 0000000..1950e78 --- /dev/null +++ b/reference/C/MAN/fabs.htm @@ -0,0 +1,101 @@ +fabs + +
+
+
+
+
+

FABS(3) Linux Programmer's Manual FABS(3) +

+ +

NAME +

fabs - absolute value of floating-point number + +

SYNOPSIS +

#include <math.h> + + double fabs(double x); + +

DESCRIPTION +

The fabs() function returns the absolute value of the + floating-point number x. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+abs, +ceil, +floor, +, +rint, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          June 25, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/feof.htm b/reference/C/MAN/feof.htm new file mode 100644 index 0000000..0e28f6f --- /dev/null +++ b/reference/C/MAN/feof.htm @@ -0,0 +1,98 @@ +feof + +
+
+
+
+
+

FEOF(3) Linux Programmer's Manual FEOF(3) +

+ +

NAME +

clearerr, feof, ferror, fileno - check and reset stream + status + +

SYNOPSIS +

#include <stdio.h> + + void clearerr( FILE *stream); + int feof( FILE *stream); + int ferror( FILE *stream); + int fileno( FILE *stream); + +

DESCRIPTION +

The function clearerr clears the end-of-file and error + indicators for the stream pointed to by stream. + + The function feof tests the end-of-file indicator for the + stream pointed to by stream, returning non-zero if it is + set. The end-of-file indicator can only be cleared by the + function clearerr. + + The function ferror tests the error indicator for the + stream pointed to by stream, returning non-zero if it is + set. The error indicator can only be reset by the clear- + err function. + + The function fileno examines the argument stream and + returns its integer descriptor. + +

ERRORS +

These functions should not fail and do not set the exter- + nal variable errno. + +
+
+

SEE ALSO +

+open, +stdio, +

+
+

STANDARDS +

The functions clearerr, feof, and ferror conform to + C3.159-1989 (``ANSI C''). + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ferror.htm b/reference/C/MAN/ferror.htm new file mode 100644 index 0000000..0defdd2 --- /dev/null +++ b/reference/C/MAN/ferror.htm @@ -0,0 +1,98 @@ +ferror + +
+
+
+
+
+

FERROR(3) Linux Programmer's Manual FERROR(3) +

+ +

NAME +

clearerr, feof, ferror, fileno - check and reset stream + status + +

SYNOPSIS +

#include <stdio.h> + + void clearerr( FILE *stream); + int feof( FILE *stream); + int ferror( FILE *stream); + int fileno( FILE *stream); + +

DESCRIPTION +

The function clearerr clears the end-of-file and error + indicators for the stream pointed to by stream. + + The function feof tests the end-of-file indicator for the + stream pointed to by stream, returning non-zero if it is + set. The end-of-file indicator can only be cleared by the + function clearerr. + + The function ferror tests the error indicator for the + stream pointed to by stream, returning non-zero if it is + set. The error indicator can only be reset by the clear- + err function. + + The function fileno examines the argument stream and + returns its integer descriptor. + +

ERRORS +

These functions should not fail and do not set the exter- + nal variable errno. + +
+
+

SEE ALSO +

+open, +stdio, +

+
+

STANDARDS +

The functions clearerr, feof, and ferror conform to + C3.159-1989 (``ANSI C''). + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fflush.htm b/reference/C/MAN/fflush.htm new file mode 100644 index 0000000..fae4396 --- /dev/null +++ b/reference/C/MAN/fflush.htm @@ -0,0 +1,100 @@ +fflush + +
+
+
+
+
+

FFLUSH(3) Linux Programmer's Manual FFLUSH(3) +

+ +

NAME +

fflush, fpurge - flush a stream + +

SYNOPSIS +

#include <stdio.h> + + int fflush( FILE *stream); + int fpurge( FILE *stream); + +

DESCRIPTION +

The function fflush forces a write of all buffered data + for the given output or update stream via the stream's + underlying write function. The open status of the stream + is unaffected. + + If the stream argument is NULL, fflush flushes all open + output streams. (Does this happen under Linux) + + The function fpurge erases any input or output buffered in + the given stream. For output streams this discards any + unwritten output. For input streams this discards any + input read from the underlying object but not yet obtained + via getc(3); this includes any text pushed back via + ungetc. + +

RETURN VALUES +

Upon successful completion 0 is returned. Otherwise, EOF + is returned and the global variable errno is set to indi- + cate the error. + +

ERRORS +

EBADF Stream is not an open stream, or, in the case of + fflush, not a stream open for writing. + + The function fflush may also fail and set errno for any of + the errors specified for the routine write(2). + +

BUGS +

Linux may not support fpurge. + +
+
+

SEE ALSO +

+write, +fopen, +fclose, +setbuf, +

+
+

STANDARDS +

The fflush function conforms to ANSI C3.159-1989 (``ANSI + C''). + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fgetpos.htm b/reference/C/MAN/fgetpos.htm new file mode 100644 index 0000000..dd76134 --- /dev/null +++ b/reference/C/MAN/fgetpos.htm @@ -0,0 +1,163 @@ +fgetpos + +
+
+
+
+
+

FSEEK(3) Linux Programmer's Manual FSEEK(3) +

+ +

NAME +

fgetpos, fseek, fsetpos, ftell, rewind - reposition a + stream + +

SYNOPSIS +

#include <stdio.h> + + int fseek( FILE *stream, long offset, int whence); + long ftell( FILE *stream); + void rewind( FILE *stream); + int fgetpos( FILE *stream, fpos_t *pos); + int fsetpos( FILE *stream, fpos_t *pos); + +

DESCRIPTION +

The fseek function sets the file position indicator for + the stream pointed to by stream. The new position, mea- + sured in bytes, is obtained by adding offset bytes to the + position specified by whence. If whence is set to + SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to + the start of the file, the current position indicator, or + end-of-file, respectively. A successful call to the fseek + function clears the end-of-file indicator for the stream + and undoes any effects of the ungetc(3) function on the + same stream. + + The ftell function obtains the current value of the file + position indicator for the stream pointed to by stream. + + The rewind function sets the file position indicator for + the stream pointed to by stream to the beginning of the + file. It is equivalent to: + + (void)fseek(stream, 0L, SEEK_SET) + + except that the error indicator for the stream is also + cleared (see clearerr(3). + + The fgetpos and fsetpos functions are alternate interfaces + equivalent to ftell and fseek (with whence set to + SEEK_SET), setting and storing the current value of the + file offset into or from the object referenced by pos. On + some non-UNIX systems an fpos_t object may be a complex + object and these routines may be the only way to portably + reposition a text stream. + +

RETURN VALUES +

The rewind function returns no value. Upon successful + completion, fgetpos, fseek, fsetpos return 0, and ftell + returns the current offset. Otherwise, -1 is returned and + the global variable errno is set to indicate the error. + +

ERRORS +

EBADF The stream specified is not a seekable stream. + + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

FSEEK(3) Linux Programmer's Manual FSEEK(3) +

+ + EINVAL The whence argument to fseek was not SEEK_SET, + SEEK_END, or SEEK_CUR. + + The function fgetpos, fseek, fsetpos, and ftell may also + fail and set errno for any of the errors specified for the + routines fflush(3), fstat(2), lseek(2), and malloc(3). + +
+
+

SEE ALSO +

+lseek, +

+
+

STANDARDS +

The fgetpos, fsetpos, fseek, ftell, and rewind functions + conform to ANSI C3.159-1989 (``ANSI C''). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fgetpwent.htm b/reference/C/MAN/fgetpwent.htm new file mode 100644 index 0000000..07e11bb --- /dev/null +++ b/reference/C/MAN/fgetpwent.htm @@ -0,0 +1,101 @@ +fgetpwent + +
+
+
+
+
+

FGETPWENT(3) Linux Programmer's Manual FGETPWENT(3) +

+ +

NAME +

fgetpwent - get password file entry + +

SYNOPSIS +

#include <pwd.h> + #include <stdio.h> + #include <sys/types.h> + + struct passwd *fgetpwent(FILE *stream); + +

DESCRIPTION +

The fgetpwent() function returns a pointer to a structure + containing the broken out fields of a line in the file + stream. The first time it is called it returns the first + entry; thereafter, it returns successive entries. The + file stream must have the same format as /etc/passwd. + + The passwd structure is defined in <pwd.h> as follows: + + struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user id */ + gid_t pw_gid; /* group id */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ + }; + +

RETURN VALUE +

The fgetpwent() function returns the passwd structure, or + NULL if there are no more entries or an error occurs. + +

ERRORS +

ENOMEM Insufficient memory to allocate passwd structure. + +

CONFORMING TO +

SVID 3 + +
+
+

SEE ALSO +

+getpwnam, +getpwuid, +getpwent, +setpwent, +getpw, +putpwent, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 9, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/floor.htm b/reference/C/MAN/floor.htm new file mode 100644 index 0000000..a2f4d79 --- /dev/null +++ b/reference/C/MAN/floor.htm @@ -0,0 +1,100 @@ +floor + +
+
+
+
+
+

FLOOR(3) Linux Programmer's Manual FLOOR(3) +

+ +

NAME +

floor - largest integral value not greater than x + +

SYNOPSIS +

#include <math.h> + + double floor(double x); + +

DESCRIPTION +

The floor() function rounds x downwards to the nearest + integer, returning that value as a double. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+abs, +fabs, +ceil, +rint, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 6, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fmod.htm b/reference/C/MAN/fmod.htm new file mode 100644 index 0000000..5f32aa7 --- /dev/null +++ b/reference/C/MAN/fmod.htm @@ -0,0 +1,97 @@ +fmod + +
+
+
+
+
+

FMOD(3) Linux Programmer's Manual FMOD(3) +

+ +

NAME +

fmod - floating-point remainder function + +

SYNOPSIS +

#include <math.h> + + double fmod(double x, double y); + +

DESCRIPTION +

The modf() function computes the remainder of dividing x + by y. The return value is x - n * y, where n is the quo- + tient of x / y, rounded towards zero to an integer. + +

RETURN VALUE +

The fmod() function returns the remainder, unless y is + zero, when the function fails and errno is set. + +

ERRORS +

EDOM The denominator y is zero. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+drem, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 6, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fopen.htm b/reference/C/MAN/fopen.htm new file mode 100644 index 0000000..0e39942 --- /dev/null +++ b/reference/C/MAN/fopen.htm @@ -0,0 +1,164 @@ +fopen + +
+
+
+
+
+

FOPEN(3) Linux Programmer's Manual FOPEN(3) +

+ +

NAME +

fopen, fdopen, freopen - stream open functions + +

SYNOPSIS +

#include <stdio.h> + + FILE *fopen( char *path, char *mode); + FILE *fdopen( int fildes, char *mode); + FILE *freopen( char *path, char *mode, FILE *stream); + +

DESCRIPTION +

The fopen function opens the file whose name is the string + pointed to by path and associates a stream with it. + + The argument mode points to a string beginning with one of + the following sequences (Additional characters may follow + these sequences.): + + r Open text file for reading. The stream is posi- + tioned at the beginning of the file. + + r+ Open for reading and writing. The stream is posi- + tioned at the beginning of the file. + + w Truncate file to zero length or create text file + for writing. The stream is positioned at the + beginning of the file. + + w+ Open for reading and writing. The file is created + if it does not exist, otherwise it is truncated. + The stream is positioned at the beginning of the + file. + + a Open for writing. The file is created if it does + not exist. The stream is positioned at the end of + the file. + + a+ Open for reading and writing. The file is created + if it does not exist. The stream is positioned at + the end of the file. + + The mode string can also include the letter ``b'' either + as a third character or as a character between the charac- + ters in any of the two-character strings described above. + This is strictly for compatibility with ANSI C3.159-1989 + (``ANSI C'') and has no effect; the ``b'' is ignored. + Linux may not behave this way. + + Any created files will have mode + S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH (0666), as + modified by the process' umask value (see umask(2). + + Reads and writes may be intermixed on read/write streams + in any order, and do not require an intermediate seek as + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

FOPEN(3) Linux Programmer's Manual FOPEN(3) +

+ + in previous versions of stdio. This is not portable to + other systems, however, and may not work under Linux + (someone should find out and fix this manpage); ANSI C + requires that a file positioning function intervene + between output and input, unless an input operation + encounters end-of-file. + + The fdopen function associates a stream with the existing + file descriptor, fildes. The mode of the stream must be + compatible with the mode of the file descriptor. + + The freopen function opens the file whose name is the + string pointed to by path and associates the stream + pointed to by stream with it. The original stream (if it + exists) is closed. The mode argument is used just as in + the fopen function. The primary use of the freopen func- + tion is to change the file associated with a standard text + stream (stderr, stdin, or stdout). + +

RETURN VALUES +

Upon successful completion fopen, fdopen and freopen + return a FILE pointer. Otherwise, NULL is returned and + the global variable errno is set to indicate the error. + +

ERRORS +

EINVAL The mode provided to fopen, fdopen, or freopen was + invalid. + + The fopen, fdopen and freopen functions may also fail and + set errno for any of the errors specified for the routine + malloc(3). + + The fopen function may also fail and set errno for any of + the errors specified for the routine open(2). + + The fdopen function may also fail and set errno for any of + the errors specified for the routine fcntl(2). + + The freopen function may also fail and set errno for any + of the errors specified for the routines open(2), + fclose(3) and fflush(3). + +
+
+

SEE ALSO +

+open, +fclose, +

+
+

STANDARDS +

The fopen and freopen functions conform to ANSI + C3.159-1989 (``ANSI C''). The fdopen function conforms to + IEEE Std1003.1-1988 (``POSIX''). + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fpathconf.htm b/reference/C/MAN/fpathconf.htm new file mode 100644 index 0000000..c10bda2 --- /dev/null +++ b/reference/C/MAN/fpathconf.htm @@ -0,0 +1,166 @@ +pathconf + +
+
+
+
+
+

FPATHCONF(3) Linux Programmer's Manual FPATHCONF(3) +

+ +

NAME +

fpathconf, pathconf - get configuration values for files + +

SYNOPSIS +

#include <unistd.h> + + long fpathconf(int filedes, int name); + long pathconf(char *path, int name); + +

DESCRIPTION +

fpathconf() gets a value for the configuration option name + for the open file descriptor filedes. + + pathconf() gets a value for configuration option name for + the file name path. + + The corresponding macros defined in <unistd.h> minimum + values; if an application wants to take advantage of val- + ues which may change, a call to fpathconf() or pathconf() + can be made, which may yield more liberal results. + + Setting name equal to one of the following constants + returns the following configuration options: + + _PC_LINK_MAX + returns the maximum number of links to the file. + If filedes or path refer to a directory, then the + value applies to the whole directory. The corre- + sponding macro is _POSIX_LINK_MAX. + + _PC_MAX_CANON + returns the maximum length of a formatted input + line, where filedes or path must refer to a termi- + nal. The corresponding macro is _POSIX_MAX_CANON. + + _PC_MAX_INPUT + returns the maximum length of an input line, where + filedes or path must refer to a terminal. The cor- + responding macro is _POSIX_MAX_INPUT. + + _PC_NAME_MAX + returns the maximum length of a filename in the + directory path or filedes. the process is allowed + to create. _POSIX_MAX_. + + _PC_PATH_MAX + returns the maximum length of a relative pathname + when path or filedes is the current working direc- + tory. The corresponding macro is _POSIX_PATH_MAX. + + _PC_PIPE_BUF + returns the size of the pipe buffer, where filedes + must refer to a pipe or FIFO and path must refer to + a FIFO. The corresponding macro is _POSIX_PIPE_BUF. + + + +

GNU April 4, 1993 1 +

+ + + + +

FPATHCONF(3) Linux Programmer's Manual FPATHCONF(3) +

+ + _PC_CHOWN_RESTRICTED + returns nonzero if the chown(2) call may not be + used on this file. If filedes or path refer to a + directory, then this applies to all files in that + directory. The corresponding macro is + _POSIX_CHOWN_RESTRICTED. + + _PC_NO_TRUNC + returns nonzero if accessing filenames longer than + _POSIX_NAME_MAX generates an error. The corre- + sponding macro is _POSIX_NO_TRUNC. + + _PC_VDISABLE + returns nonzero if special character processing can + be disabled, where filedes or path must refer to a + terminal. + +

RETURN VALUE +

The limit is returned, if one exists. If the system does + not have a limit for the requested resource, -1 is + returned, and errno is unchanged. If there is an error, + -1 is returned, and errno is set to reflect the nature of + the error. + +

CONFORMS TO +

POSIX.1 Files with name lengths longer than the value + returned for name equal to _PC_NAME_MAX may exist in the + given directory. + + Some returned values may be huge; they are not suitable + for allocating memory. + +
+
+

SEE ALSO +

+getconf, +statfs, +open, +sysconf, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fputs.htm b/reference/C/MAN/fputs.htm new file mode 100644 index 0000000..4bf47d3 --- /dev/null +++ b/reference/C/MAN/fputs.htm @@ -0,0 +1,167 @@ +fputs + +
+
+
+
+
+

PUTS(3) Linux Programmer's Manual PUTS(3) +

+ +

NAME +

fputc, fputs, putc, putchar, puts - output of characters + and strings + +

SYNOPSIS +

#include <stdio.h> + + int fputc(int c, FILE *stream); + int fputs(const char *s, FILE *stream); + int putc(int c, FILE *stream); + int putchar(int c); + int puts(char *s); + int ungetc(int c, FILE *stream); + +

DESCRIPTION +

fputc() writes the character c, cast to an unsigned char, + to stream. + + fputs() writes the string s to stream, without its trail- + ing '\0'. + + putc() is equivalent to fputc() except that it may be + implemented as a macro which evaluates stream more than + once. + + putchar(c); is equivalent to putc(c,stdout). + + puts() writes the string s and a trailing newline to std- + out. + + Calls to the functions described here can be mixed with + each other and with calls to other output functions from + the stdio library for the same output stream. + +

RETURN VALUES +

fputc(), putc() and putchar() return the character written + as an unsigned char cast to an int or EOF on error. + + puts() and fputs() return a non - negative number on suc- + cess, or EOF on error. + + +

CONFORMS TO +

ANSI - C, POSIX.1 + +

BUGS +

It is not advisable to mix calls to output functions from + the stdio library with low - level calls to write() for + the file descriptor associated with the same output + stream; the results will be undefined and very probably + not what you want. + +
+
+

SEE ALSO +

+write, +fopen, +fwrite, +scanf, +gets, +

+
+
+
+

GNU April 4, 1993 1 +

+ + + + +

PUTS(3) Linux Programmer's Manual PUTS(3) +

+ + fseek(3), ferror(3) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fread.htm b/reference/C/MAN/fread.htm new file mode 100644 index 0000000..0d1808a --- /dev/null +++ b/reference/C/MAN/fread.htm @@ -0,0 +1,100 @@ +fread + +
+
+
+
+
+

FREAD(3) Linux Programmer's Manual FREAD(3) +

+ +

NAME +

fread, fwrite - binary stream input/output + +

SYNOPSIS +

#include <stdio.h> + + int fread( void *ptr, size_t size, size_t nmemb, FILE + *stream); + + int fwrite( void *ptr, size_t size, size_t nmemb, FILE + *stream); + +

DESCRIPTION +

The function fread reads nmemb elements of data, each size + bytes long, from the stream pointed to by stream, storing + them at the location given by ptr. + + The function fwrite writes nmemb elements of data, each + size bytes long, to the stream pointed to by stream, + obtaining them from the location given by ptr. + +

RETURN VALUES +

fread and fwrite return the number of items successfully + read or written (i.e., not the number of characters). If + an error occurs, or the end-of-file is reached, the return + value is a short item count (or zero). + + fread does not distinguish between end-of-file and error, + and callers must use feof(3) and ferror(3) to determine + which occurred. + +
+
+

SEE ALSO +

+feof, +ferror, +read, +write, +

+
+

STANDARDS +

The functions fread and fwrite conform to ANSI C3.159-1989 + (``ANSI C''). + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 20 April 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/freopen.htm b/reference/C/MAN/freopen.htm new file mode 100644 index 0000000..90133d3 --- /dev/null +++ b/reference/C/MAN/freopen.htm @@ -0,0 +1,164 @@ +freopen + +
+
+
+
+
+

FOPEN(3) Linux Programmer's Manual FOPEN(3) +

+ +

NAME +

fopen, fdopen, freopen - stream open functions + +

SYNOPSIS +

#include <stdio.h> + + FILE *fopen( char *path, char *mode); + FILE *fdopen( int fildes, char *mode); + FILE *freopen( char *path, char *mode, FILE *stream); + +

DESCRIPTION +

The fopen function opens the file whose name is the string + pointed to by path and associates a stream with it. + + The argument mode points to a string beginning with one of + the following sequences (Additional characters may follow + these sequences.): + + r Open text file for reading. The stream is posi- + tioned at the beginning of the file. + + r+ Open for reading and writing. The stream is posi- + tioned at the beginning of the file. + + w Truncate file to zero length or create text file + for writing. The stream is positioned at the + beginning of the file. + + w+ Open for reading and writing. The file is created + if it does not exist, otherwise it is truncated. + The stream is positioned at the beginning of the + file. + + a Open for writing. The file is created if it does + not exist. The stream is positioned at the end of + the file. + + a+ Open for reading and writing. The file is created + if it does not exist. The stream is positioned at + the end of the file. + + The mode string can also include the letter ``b'' either + as a third character or as a character between the charac- + ters in any of the two-character strings described above. + This is strictly for compatibility with ANSI C3.159-1989 + (``ANSI C'') and has no effect; the ``b'' is ignored. + Linux may not behave this way. + + Any created files will have mode + S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH (0666), as + modified by the process' umask value (see umask(2). + + Reads and writes may be intermixed on read/write streams + in any order, and do not require an intermediate seek as + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

FOPEN(3) Linux Programmer's Manual FOPEN(3) +

+ + in previous versions of stdio. This is not portable to + other systems, however, and may not work under Linux + (someone should find out and fix this manpage); ANSI C + requires that a file positioning function intervene + between output and input, unless an input operation + encounters end-of-file. + + The fdopen function associates a stream with the existing + file descriptor, fildes. The mode of the stream must be + compatible with the mode of the file descriptor. + + The freopen function opens the file whose name is the + string pointed to by path and associates the stream + pointed to by stream with it. The original stream (if it + exists) is closed. The mode argument is used just as in + the fopen function. The primary use of the freopen func- + tion is to change the file associated with a standard text + stream (stderr, stdin, or stdout). + +

RETURN VALUES +

Upon successful completion fopen, fdopen and freopen + return a FILE pointer. Otherwise, NULL is returned and + the global variable errno is set to indicate the error. + +

ERRORS +

EINVAL The mode provided to fopen, fdopen, or freopen was + invalid. + + The fopen, fdopen and freopen functions may also fail and + set errno for any of the errors specified for the routine + malloc(3). + + The fopen function may also fail and set errno for any of + the errors specified for the routine open(2). + + The fdopen function may also fail and set errno for any of + the errors specified for the routine fcntl(2). + + The freopen function may also fail and set errno for any + of the errors specified for the routines open(2), + fclose(3) and fflush(3). + +
+
+

SEE ALSO +

+open, +fclose, +

+
+

STANDARDS +

The fopen and freopen functions conform to ANSI + C3.159-1989 (``ANSI C''). The fdopen function conforms to + IEEE Std1003.1-1988 (``POSIX''). + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/frexp.htm b/reference/C/MAN/frexp.htm new file mode 100644 index 0000000..7a81ecf --- /dev/null +++ b/reference/C/MAN/frexp.htm @@ -0,0 +1,98 @@ +frexp + +
+
+
+
+
+

FREXP(3) Linux Programmer's Manual FREXP(3) +

+ +

NAME +

frexp - convert floating-point number to fractional and + integral components + +

SYNOPSIS +

#include <math.h> + + double frexp(double x, int *exp); + +

DESCRIPTION +

The frexp() function is used to split the number x into a + normalized fraction and an exponent which is stored in + exp. + +

RETURN VALUE +

The frexp() function returns the normalized fraction. If + the argument x is not zero, the normalized fraction is x + times a power of two, and is always in the range 1/2 + (inclusive) to 1 (exclusive). If x is zero, then the nor- + malized fraction is zero and zero is stored in exp. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+, +modf, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU June 6, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fscanf.htm b/reference/C/MAN/fscanf.htm new file mode 100644 index 0000000..44ec43c --- /dev/null +++ b/reference/C/MAN/fscanf.htm @@ -0,0 +1,365 @@ +fscanf + +
+
+
+
+
+

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ +

NAME +

scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input + format conversion + +

SYNOPSIS +

#include <stdio.h> + int scanf( const char *format, ...); + int fscanf( FILE *stream, const char *format, ...); + int sscanf( const char *str, const char *format, ...); + + #include <stdarg.h> + int vscanf( const char *format, va_list ap); + int vsscanf( const char *str, const char *format, va_list ap); + int vfscanf( FILE *stream, const char *format, va_list ap); + +

DESCRIPTION +

The scanf family of functions scans input according to a + format as described below. This format may contain con- + version specifiers; the results from such conversions, if + any, are stored through the pointer arguments. The scanf + function reads input from the standard input stream stdin, + fscanf reads input from the stream pointer stream, and + sscanf reads its input from the character string pointed + to by str. + + The vfscanf function is analogous to vfprintf(3) and reads + input from the stream pointer stream using a variable + argument list of pointers (see stdarg(3). The vscanf + function scans a variable argument list from the standard + input and the vsscanf function scans it from a string; + these are analogous to the vprintf and vsprintf functions + respectively. + + Each successive pointer argument must correspond properly + with each successive conversion specifier (but see `sup- + pression' below). All conversions are introduced by the % + (percent sign) character. The format string may also con- + tain other characters. White space (such as blanks, tabs, + or newlines) in the format string match any amount of + white space, including none, in the input. Everything + else matches only itself. Scanning stops when an input + character does not match such a format character. Scan- + ning also stops when an input conversion cannot be made + (see below). + +

CONVERSIONS +

Following the % character introducing a conversion there + may be a number of flag characters, as follows: + + * Suppresses assignment. The conversion that follows + occurs as usual, but no pointer is used; the result + of the conversion is simply discarded. + + h Indicates that the conversion will be one of dioux + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + or n and the next pointer is a pointer to a short + int (rather than int). + + l Indicates either that the conversion will be one of + dioux or n and the next pointer is a pointer to a + long int (rather than int), or that the conversion + will be one of efg and the next pointer is a + pointer to double (rather than float). + + L Indicates that the conversion will be efg and the + next pointer is a pointer to long double. (This + type is not implemented; the L flag is currently + ignored--this may not be true for Linux.) + + In addition to these flags, there may be an optional maxi- + mum field width, expressed as a decimal integer, between + the % and the conversion. If no width is given, a default + of `infinity' is used (with one exception, below); other- + wise at most this many characters are scanned in process- + ing the conversion. Before conversion begins, most con- + versions skip white space; this white space is not counted + against the field width. + + The following conversions are available: + + % Matches a literal `%'. That is, `%%' in the format + string matches a single input `%' character. No + conversion is done, and assignment does not occur. + + d Matches an optionally signed decimal integer; the + next pointer must be a pointer to int. + + D Equivalent to ld; this exists only for backwards + compatibility. + + i Matches an optionally signed integer; the next + pointer must be a pointer to int. The integer is + read in base 16 if it begins with `0x' or `0X', in + base 8 if it begins with `0', and in base 10 other- + wise. Only characters that correspond to the base + are used. + + o Matches an octal integer; the next pointer must be + a pointer to unsigned int. + + O Equivalent to lo; this exists for backwards compat- + ibility. + + u Matches an optionally signed decimal integer; the + next pointer must be a pointer to unsigned int. + + x Matches an optionally a signed hexadecimal integer; + the next pointer must be a pointer to unsigned int. + + + + +

BSD MANPAGE 29 November 1993 2 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + X Equivalent to lx; this violates the ANSI + C3.159-1989 (``ANSI C'') but is backwards compati- + ble with previous UNIX systems--I don't know what + Linux does with this. + + f Matches an optionally signed floating-point number; + the next pointer must be a pointer to float. + + e Equivalent to f. + + g Equivalent to f. + + E Equivalent to lf; this violates the ANSI + C3.159-1989 (``ANSI C'') but is backwards compati- + ble with previous UNIX systems--I don't know what + Linux does with this. + + F Equivalent to lf; this exists only for backwards + compatibility. + + s Matches a sequence of non-white-space characters; + the next pointer must be a pointer to char, and the + array must be large enough to accept all the + sequence and the terminating NUL character. The + input string stops at white space or at the maximum + field width, whichever occurs first. + + c Matches a sequence of width count characters + (default 1); the next pointer must be a pointer to + char, and there must be enough room for all the + characters (no terminating NUL is added). The + usual skip of leading white space is suppressed. + To skip white space first, use an explicit space in + the format. + + [ Matches a nonempty sequence of characters from the + specified set of accepted characters; the next + pointer must be a pointer to char, and there must + be enough room for all the characters in the + string, plus a terminating NUL character. The + usual skip of leading white space is suppressed. + The string is to be made up of characters in (or + not in) a particular set; the set is defined by the + characters between the open bracket [ character and + a close bracket ] character. The set excludes + those characters if the first character after the + open bracket is a circumflex ^. To include a close + bracket in the set, make it the first character + after the open bracket or the circumflex; any other + position will end the set. The hyphen character - + is also special; when placed between two other + characters, it adds all intervening characters to + the set. To include a hyphen, make it the last + character before the final close bracket. For + + + +

BSD MANPAGE 29 November 1993 3 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + instance, `[^]0-9-]' means the set `everything + except close bracket, zero through nine, and + hyphen'. The string ends with the appearance of a + character not in the (or, with a circumflex, in) + set or when the field width runs out. + + p Matches a pointer value (as printed by `%p' in + printf(3); the next pointer must be a pointer to + void. + + n Nothing is expected; instead, the number of charac- + ters consumed thus far from the input is stored + through the next pointer, which must be a pointer + to int. This is not a conversion, although it can + be suppressed with the * flag. + + For backwards compatibility, other conversion characters + (except `\0') are taken as if they were `%d' or, if upper- + case, `%ld', and a `conversion' of `%\0' causes an immedi- + ate return of EOF. The F and X conversions will be + changed in the future to conform to the + ANSI C standard, after which they will act like and + respectively. The behavior of Linux on the non-standard + points is not known by this documenter. + + +

RETURN VALUES +

These functions return the number of input items assigned, + which can be fewer than provided for, or even zero, in the + event of a matching failure. Zero indicates that, while + there was input available, no conversions were assigned; + typically this is due to an invalid input character, such + as an alphabetic character for a `%d' conversion. The + value EOF is returned if an input failure occurs before + any conversion such as an end-of-file occurs. If an error + or end-of-file occurs after conversion has begun, the num- + ber of conversions which were successfully completed is + returned. + +
+
+

SEE ALSO +

+strtol, +strtoul, +strtod, +getc, +printf, +

+
+

STANDARDS +

The functions fscanf, scanf, and sscanf conform to ANSI + C3.159-1989 (``ANSI C''). + +

BUGS +

Differences for Linux are not known at this time. The + following is for the BSD version: + + The current situation with %F and %X conversions is unfor- + tunate. + + All of the backwards compatibility formats will be removed + + + +

BSD MANPAGE 29 November 1993 4 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + in the future. + + Numerical strings are truncated to 512 characters; for + example, %f and %d are implicitly %512f and %512d. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 5 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fseek.htm b/reference/C/MAN/fseek.htm new file mode 100644 index 0000000..034354e --- /dev/null +++ b/reference/C/MAN/fseek.htm @@ -0,0 +1,163 @@ +fseek + +
+
+
+
+
+

FSEEK(3) Linux Programmer's Manual FSEEK(3) +

+ +

NAME +

fgetpos, fseek, fsetpos, ftell, rewind - reposition a + stream + +

SYNOPSIS +

#include <stdio.h> + + int fseek( FILE *stream, long offset, int whence); + long ftell( FILE *stream); + void rewind( FILE *stream); + int fgetpos( FILE *stream, fpos_t *pos); + int fsetpos( FILE *stream, fpos_t *pos); + +

DESCRIPTION +

The fseek function sets the file position indicator for + the stream pointed to by stream. The new position, mea- + sured in bytes, is obtained by adding offset bytes to the + position specified by whence. If whence is set to + SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to + the start of the file, the current position indicator, or + end-of-file, respectively. A successful call to the fseek + function clears the end-of-file indicator for the stream + and undoes any effects of the ungetc(3) function on the + same stream. + + The ftell function obtains the current value of the file + position indicator for the stream pointed to by stream. + + The rewind function sets the file position indicator for + the stream pointed to by stream to the beginning of the + file. It is equivalent to: + + (void)fseek(stream, 0L, SEEK_SET) + + except that the error indicator for the stream is also + cleared (see clearerr(3). + + The fgetpos and fsetpos functions are alternate interfaces + equivalent to ftell and fseek (with whence set to + SEEK_SET), setting and storing the current value of the + file offset into or from the object referenced by pos. On + some non-UNIX systems an fpos_t object may be a complex + object and these routines may be the only way to portably + reposition a text stream. + +

RETURN VALUES +

The rewind function returns no value. Upon successful + completion, fgetpos, fseek, fsetpos return 0, and ftell + returns the current offset. Otherwise, -1 is returned and + the global variable errno is set to indicate the error. + +

ERRORS +

EBADF The stream specified is not a seekable stream. + + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

FSEEK(3) Linux Programmer's Manual FSEEK(3) +

+ + EINVAL The whence argument to fseek was not SEEK_SET, + SEEK_END, or SEEK_CUR. + + The function fgetpos, fseek, fsetpos, and ftell may also + fail and set errno for any of the errors specified for the + routines fflush(3), fstat(2), lseek(2), and malloc(3). + +
+
+

SEE ALSO +

+lseek, +

+
+

STANDARDS +

The fgetpos, fsetpos, fseek, ftell, and rewind functions + conform to ANSI C3.159-1989 (``ANSI C''). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/fwrite.htm b/reference/C/MAN/fwrite.htm new file mode 100644 index 0000000..884ce25 --- /dev/null +++ b/reference/C/MAN/fwrite.htm @@ -0,0 +1,100 @@ +fwrite + +
+
+
+
+
+

WRITE(3) Linux Programmer's Manual WRITE(3) +

+ +

NAME +

fread, fwrite - binary stream input/output + +

SYNOPSIS +

#include <stdio.h> + + int fread( void *ptr, size_t size, size_t nmemb, FILE + *stream); + + int fwrite( void *ptr, size_t size, size_t nmemb, FILE + *stream); + +

DESCRIPTION +

The function fread reads nmemb elements of data, each size + bytes long, from the stream pointed to by stream, storing + them at the location given by ptr. + + The function fwrite writes nmemb elements of data, each + size bytes long, to the stream pointed to by stream, + obtaining them from the location given by ptr. + +

RETURN VALUES +

fread and fwrite return the number of items successfully + read or written (i.e., not the number of characters). If + an error occurs, or the end-of-file is reached, the return + value is a short item count (or zero). + + fread does not distinguish between end-of-file and error, + and callers must use feof(3) and ferror(3) to determine + which occurred. + +
+
+

SEE ALSO +

+feof, +ferror, +read, +write, +

+
+

STANDARDS +

The functions fread and fwrite conform to ANSI C3.159-1989 + (``ANSI C''). + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 20 April 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getc.htm b/reference/C/MAN/getc.htm new file mode 100644 index 0000000..d3437ed --- /dev/null +++ b/reference/C/MAN/getc.htm @@ -0,0 +1,169 @@ +getc + +
+
+
+
+
+

GETC(3) Linux Programmer's Manual GETC(3) +

+ +

NAME +

fgetc, fgets, getc, getchar, gets, ungetc - input of char- + acters and strings + +

SYNOPSIS +

#include <stdio.h> + + int fgetc(FILE *stream); + char *fgets(char *s, int size, FILE *stream); + int getc(FILE *stream); + int getchar(void); + char *gets(char *s); + int ungetc(int c, FILE *stream); + +

DESCRIPTION +

fgetc() reads the next character from stream and returns + it as an unsigned char cast to an int, or EOF on end of + file or error. + + getc() is equivalent to fgetc() except that it may be + implemented as a macro which evaluates stream more than + once. + + getchar() is equivalent to getc(stdin). + + gets() reads a line from stdin into the buffer pointed to + by s until either a terminating newline or EOF, which it + replaces with '\0'. No check for buffer overrun is per- + formed (see BUGS below). + + fgets() reads in at most one less than n characters from + stream and stores them into the buffer pointed to by s. + Reading stops after an EOF or a newline. If a newline is + read, it is stored into the buffer. A '\0' is stored + after the last character in the buffer. + + ungetc() pushes c back to stream, cast to unsigned char, + where it is available for subsequent read operations. + Pushed - back characters will be returned in reverse + order; only one pushback is guaranteed. + + Calls to the functions described here can be mixed with + each other and with calls to other input functions from + the stdio library for the same input stream. + +

RETURN VALUES +

fgetc(), getc() and getchar() return the character read as + an unsigned char cast to an int or EOF on end of file or + error. + + gets() and fgets() return s on success, and NULL on end of + file or error. + + ungetc() returns c on success, or EOF on error. + + + +

GNU April 4, 1993 1 +

+ + + + +

GETC(3) Linux Programmer's Manual GETC(3) +

+ +

CONFORMS TO +

ANSI - C, POSIX.1 + +

BUGS +

Because it is impossible to tell without knowing the data + in advance how many characters gets() will read, and + because gets() will continue to store characters past the + end of the buffer, it is extremely dangerous to use. It + has been used to break computer security. Use fgets() + instead. + + It is not advisable to mix calls to input functions from + the stdio library with low - level calls to read() for the + file descriptor associated with the input stream; the + results will be undefined and very probably not what you + want. + +
+
+

SEE ALSO +

+read, +write, +fopen, +fread, +scanf, +puts, +fseek, +ferror, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getdid.htm b/reference/C/MAN/getdid.htm new file mode 100644 index 0000000..8d131cd --- /dev/null +++ b/reference/C/MAN/getdid.htm @@ -0,0 +1,98 @@ +getgid + +
+
+
+
+
+

GETGID(2) Linux Programmer's Manual GETGID(2) +

+ +

NAME +

getgid, getegid - get group identity + +

SYNOPSIS +

#include <unistd.h> + + gid_t getgid(void); + gid_t getegid(void); + +

DESCRIPTION +

getgid returns the real group ID of the current process. + + getegid returns the effective group ID of the current pro- + cess. + + The real ID corresponds to the ID of the calling process. + The effective ID corresponds to the set ID bit on the file + being executed. + +

ERRORS +

These functions are always successful. + +

CONFORMS TO +

POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+setregid, +setgid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.11 23 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getenv.htm b/reference/C/MAN/getenv.htm new file mode 100644 index 0000000..4502275 --- /dev/null +++ b/reference/C/MAN/getenv.htm @@ -0,0 +1,99 @@ +getenv + +
+
+
+
+
+

GETENV(3) Linux Programmer's Manual GETENV(3) +

+ +

NAME +

getenv - get an environment variable + +

SYNOPSIS +

#include <stdlib.h> + + char *getenv(const char *name); + +

DESCRIPTION +

The getenv() function searches the environment list for a + string that matches the string pointed to by name. The + strings are of the form name = value. + +

RETURN VALUE +

The getenv() function returns a pointer to the value in + the environment, or NULL if there is no match. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+putenv, +setenv, +unsetenv, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 3, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getgroupd.htm b/reference/C/MAN/getgroupd.htm new file mode 100644 index 0000000..e6cd339 --- /dev/null +++ b/reference/C/MAN/getgroupd.htm @@ -0,0 +1,163 @@ +getgroups + +
+
+
+
+
+

GETGROUPS(2) Linux Programmer's Manual GETGROUPS(2) +

+ +

NAME +

getgroups, setgroups - get/set group access list + +

SYNOPSIS +

#include <unistd.h> + + int getgroups(int size, gid_t list[]); + + + #define __USE_BSD + #include <grp.h> + + int setgroups(size_t size, const gid_t *list); + +

DESCRIPTION +

getgroups + Up to size supplemental groups are returned in + list. If size is zero, list is not modified, but + the total number of supplemental groups for the + process is returned. + + setgroups + Sets the supplemental groups for the process. Only + the super-user may use this function. + +

RETURN VALUE +

getgroups + On success, the number of groups stored in list is + returned (if size is zero, however, the number of + supplemental group IDs associated with the process + is returned). On error, -1 is returned, and errno + is set appropriately. + + setgroups + On success, zero is returned. On error, -1 is + returned, and errno is set appropriately. + +

ERRORS +

EFAULT list has an invalid address. + + EPERM For setgroups, the user is not the super-user. + + EINVAL For setgroups, gidsetsize is greater than NGROUPS + (32 for Linux 0.99.11). + +

CONFORMING TO +

getgroups conforms to POSIX.1 (and is present in BSD 4.3). + Since setgroups requires privilege, it is not covered + under POSIX.1. + +

BUGS +

The __USE_BSD flag probably shouldn't be required for set- + groups. + + + + +

Linux 0.99.11 23 July 1993 1 +

+ + + + +

GETGROUPS(2) Linux Programmer's Manual GETGROUPS(2) +

+ +
+
+

SEE ALSO +

+initgroups, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.11 23 July 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/gethostname.htm b/reference/C/MAN/gethostname.htm new file mode 100644 index 0000000..4b5256c --- /dev/null +++ b/reference/C/MAN/gethostname.htm @@ -0,0 +1,99 @@ +gethostname + +
+
+
+
+
+

GETHOSTNAME(2) Linux Programmer's Manual GETHOSTNAME(2) +

+ +

NAME +

gethostname, sethostname - get/set host name + +

SYNOPSIS +

#include <unistd.h> + + int gethostname(char *name, size_t len); + int sethostname(const char *name, size_t len); + +

DESCRIPTION +

These functions are used to access or to change the host + name of the current processor. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EINVAL len is negative or, for sethostname, len is larger + than the maximum allowed size, or, for gethostname + on Linux/i386, len is smaller than the actual size. + + EPERM For sethostname, the caller was not the superuser. + + EFAULT name is an invalid address. + +

CONFORMING TO +

POSIX.1 does not define these functions, but ISO/IEC + 9945-1:1990 mentions them in B.4.4.1. + +

BUGS +

Some other implementations of gethostname successfully + return len bytes even if name is longer. Linux/Alpha com- + plies with this behaviour. Linux/i386, however, returns + EINVAL in this case (as of DLL 4.6.27 libraries). + +

NOTES +

Under Linux/Alpha, gethostname is a system call. Under + Linux/i386, gethostname is implemented at the library + level by calling uname(2). + +
+
+

SEE ALSO +

+getdomainname, +setdomainname, +uname, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.3.6 22 July 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getlogin.htm b/reference/C/MAN/getlogin.htm new file mode 100644 index 0000000..6870731 --- /dev/null +++ b/reference/C/MAN/getlogin.htm @@ -0,0 +1,27 @@ +getlogin + +
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getopt.htm b/reference/C/MAN/getopt.htm new file mode 100644 index 0000000..ae24692 --- /dev/null +++ b/reference/C/MAN/getopt.htm @@ -0,0 +1,291 @@ +getopt + +
+
+
+
+
+

GETOPT(3) Linux Programmer's Manual GETOPT(3) +

+ +

NAME +

getopt - Read command line options + +

SYNOPSIS +

#include <unistd.h> + + int getopt(int argc, char * const argv[], + const char *optstring); + + extern char *optarg; + extern int optind, opterr, optopt; + + #include <getopt.h> + + int getopt_long(int argc, char * const argv[], + const char *shortopts, + const struct option *longopts, int longind); + +

DESCRIPTION +

The getopt() function parses the command line arguments. + Its arguments argc and argv are the argument count and + array as passed to the main() function on program invoca- + tion. optstring is a list of available option characters. + If such a character is followed by a colon, the option + takes an argument, which is placed in optarg. + + The external variable optind is the index of the next + array element of argv[] to be processed; it communicates + from one call of getopt() to the next which element to + process. + + The getopt_long() function works like getopt() except that + it also accepts long options, started out by two dashes. + If these take values, it is either in the form --arg=value + or --arg value. It takes the additional arguments lon- + gopts which is a pointer to the first element of an array + of struct option declared in <getopt.h> as + + struct option { + const char *name; + int has_arg; + int *flag; + int val; + }; + + The meaning of the different fields are: + + name is the name of the long option. + + has_arg + is a boolean value which should be set to nonzero + if the long option takes a value. + + flag determines the return value if getopt_long() + + + +

GNU April 25, 1993 1 +

+ + + + +

GETOPT(3) Linux Programmer's Manual GETOPT(3) +

+ + returns a value for a long option; if it is non- + zero, zero is returned as a function value, other- + wise val. + + val determines the value to return if flag is zero. + + The last element of the array has to be filled with + zeroes. + + The option_index points to the index of the long option + relative to longopts. + +

RETURN VALUE +

The getopt() function returns the option character if the + option was found successfully, ':' if there was a missing + parameter for one of the options, '?' for an unknown + option character and -1 for the end of the option list. + +

EXAMPLE +

The following example program, from the source code, + illustrates the use of getopt_long() with most of its fea- + tures. + + #include <stdio.h> + + int + main (argc, argv) + int argc; + char **argv; + { + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 1, 0, 'c'}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:012", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + + + +

GNU April 25, 1993 2 +

+ + + + +

GETOPT(3) Linux Programmer's Manual GETOPT(3) +

+ + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("0); + break; + + case '0': + case '1': + case '2': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.0); + digit_optind = this_option_optind; + printf ("option %c0, c); + break; + + case 'a': + printf ("option a0); + break; + + case 'b': + printf ("option b0); + break; + + case 'c': + printf ("option c with value `%s'0, optarg); + break; + + case 'd': + printf ("option d with value `%s'0, optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??0, c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("0); + } + + exit (0); + } + +

BUGS +

This manpage is confusing. + + + +

GNU April 25, 1993 3 +

+ + + + +

GETOPT(3) Linux Programmer's Manual GETOPT(3) +

+ +

CONFORMS TO +

getopt() : + POSIX.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNU April 25, 1993 4 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getpgrp.htm b/reference/C/MAN/getpgrp.htm new file mode 100644 index 0000000..7d56e00 --- /dev/null +++ b/reference/C/MAN/getpgrp.htm @@ -0,0 +1,166 @@ +getpgrp + +
+
+
+
+
+

SETPGID(2) Linux Programmer's Manual SETPGID(2) +

+ +

NAME +

setpgid, getpgid, setpgrp, getpgrp - set/get process group + +

SYNOPSIS +

#include <unistd.h> + + int setpgid(pid_t pid, pid_t pgid); + pid_t getpgid(pid_t pid); + int setpgrp(void); + pid_t getpgrp(void); + +

DESCRIPTION +

setpgid sets the process group ID of the process specified + by pid to pgid. If pid is zero, the process ID of the + current process is used. If pgid is zero, the process ID + of the process specified by pid is used. + + getpgid returns the process group ID of the process speci- + fied by pid. If pid is zero, the process ID of the cur- + rent process is used. + + In the Linux DLL 4.4.1 library, setpgrp simply calls + setpgid(0,0). + + getpgrp is equivalent to getpgid(0). + + Process groups are used for distribution of signals, and + by terminals to arbitrate requests for their input: pro- + cesses that have the same process group as the terminal + are foreground and may read, while others will block with + a signal if they attempt to read. + + These calls are thus used by programs such as csh(1) to + create process groups in implementing job control. The + TIOCGPGRP and TIOCSPGRP calls described in termios(4) are + used to get/set the process group of the control terminal. + +

RETURN VALUE +

On success, setpgid and setpgrp return zero. On error, -1 + is returned, and errno is set appropriately. + + getpgid returns a process group on success. On error, -1 + is returned, and errno is set appropriately. + + getpgrp always returns the current process group. + +

ERRORS +

EINVAL pgid is less than 0. + + EPERM Various permission violations. + + ESRCH pid does not match any process. + + + + + +

Linux 1.2.4 15 April 1995 1 +

+ + + + +

SETPGID(2) Linux Programmer's Manual SETPGID(2) +

+ +
+
+

SEE ALSO +

+getuid, +setsid, +tcsetpgrp, +termios, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.2.4 15 April 1995 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getpid.htm b/reference/C/MAN/getpid.htm new file mode 100644 index 0000000..599adce --- /dev/null +++ b/reference/C/MAN/getpid.htm @@ -0,0 +1,102 @@ +getpid + +
+
+
+
+
+

GETPID(2) Linux Programmer's Manual GETPID(2) +

+ +

NAME +

getpid, getppid - get process identification + +

SYNOPSIS +

#include <unistd.h> + + pid_t getpid(void); + pid_t getppid(void); + +

DESCRIPTION +

getpid returns the process ID of the current process. + (This is often used by routines that generate unique tem- + porary file names.) + + getppid returns the process ID of the parent of the cur- + rent process. + +

CONFORMING TO +

POSIX, BSD 4.3, SVID + +
+
+

SEE ALSO +

+exec, +fork, +kill, +mkstemp, +tmpnam, +tempnam, +tmpfile, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.11 23 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getpw.htm b/reference/C/MAN/getpw.htm new file mode 100644 index 0000000..2ed2735 --- /dev/null +++ b/reference/C/MAN/getpw.htm @@ -0,0 +1,101 @@ +getpw + +
+
+
+
+
+

GETPW(3) Linux Programmer's Manual GETPW(3) +

+ +

NAME +

getpw - Re-construct password line entry + +

SYNOPSIS +

#include <pwd.h> + #include <sys/types.h> + + int getpw(uid_t uid, char *buf); + +

DESCRIPTION +

The getpw() function re-constructs the password line entry + for the given user uid uid in the buffer buf. The + returned buffer contains a line of format + + name:passwd:uid:gid:gecos:dir:shell + + The passwd structure is defined in <pwd.h> as follows: + + struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user id */ + gid_t pw_gid; /* group id */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ + }; + +

RETURN VALUE +

The getpw() function returns 0 on success, or -1 if an + error occurs. + +

ERRORS +

ENOMEM Insufficient memory to allocate passwd structure. + +

FILES +

/etc/passwdpassword database file + +
+
+

SEE ALSO +

+fgetpwent, +getpwent, +setpwent, +endpwent, +getpwuid, +putpwent, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 9, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getpwent.htm b/reference/C/MAN/getpwent.htm new file mode 100644 index 0000000..ac99174 --- /dev/null +++ b/reference/C/MAN/getpwent.htm @@ -0,0 +1,99 @@ +getpwent + +
+
+
+
+
+

GETPWENT(3) Linux Programmer's Manual GETPWENT(3) +

+ +

NAME +

getpwent, setpwent, endpwent - get password file entry + +

SYNOPSIS +

#include <pwd.h> + #include <sys/types.h> + + struct passwd *getpwent(void); + + void setpwent(void); + + void endpwent(void); + +

DESCRIPTION +

The getpwent() function returns a pointer to a structure + containing the broken out fields of a line from + /etc/passwd. The first time it is called it returns the + first entry; thereafter, it returns successive entries. + + The setpwent() function rewinds the file pointer to the + beginning of the /etc/passwd file. + + The endpwent() function closes the /etc/passwd file. + + The passwd structure is defined in <pwd.h> as follows: + + struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user id */ + gid_t pw_gid; /* group id */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ + }; + +

RETURN VALUE +

The getpwent() function returns the passwd structure, or + NULL if there are no more entries or an error occurs. + +

ERRORS +

ENOMEM Insufficient memory to allocate passwd structure. + +

FILES +

/etc/passwdpassword database file + +

CONFORMING TO +

SVID 3, BSD 4.3 + +
+
+

SEE ALSO +

+fgetpwent, +getpwnam, +getpwuid, +getpw, +

+
+
+
+
+
+

GNU April 9, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getpwnam.htm b/reference/C/MAN/getpwnam.htm new file mode 100644 index 0000000..98232e3 --- /dev/null +++ b/reference/C/MAN/getpwnam.htm @@ -0,0 +1,101 @@ +getpwuid + +
+
+
+
+
+

GETPWNAM(3) Linux Programmer's Manual GETPWNAM(3) +

+ +

NAME +

getpwnam, getpwuid - get password file entry + +

SYNOPSIS +

#include <pwd.h> + #include <sys/types.h> + + struct passwd *getpwnam(const char * name); + + struct passwd *getpwuid(uid_t uid); + +

DESCRIPTION +

The getpwnam() function returns a pointer to a structure + containing the broken out fields of a line from + /etc/passwd for the entry that matches the user name name. + + The getpwuid() function returns a pointer to a structure + containing the broken out fields of a line from + /etc/passwd for the entry that matches the user uid uid. + + The passwd structure is defined in <pwd.h> as follows: + + struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user id */ + gid_t pw_gid; /* group id */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ + }; + +

RETURN VALUE +

The getpwnam() and getpwuid() functions return the passwd + structure, or NULL if the matching entry is not found or + an error occurs. + +

ERRORS +

ENOMEM Insufficient memory to allocate passwd structure. + +

FILES +

/etc/passwdpassword database file + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+fgetpwent, +getpwent, +setpwent, +endpwent, +getpw, +putpwent, +

+
+
+
+
+
+
+
+
+

GNU April 9, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/gets.htm b/reference/C/MAN/gets.htm new file mode 100644 index 0000000..54a79a5 --- /dev/null +++ b/reference/C/MAN/gets.htm @@ -0,0 +1,169 @@ +ungetc + +
+
+
+
+
+

GETS(3) Linux Programmer's Manual GETS(3) +

+ +

NAME +

fgetc, fgets, getc, getchar, gets, ungetc - input of char- + acters and strings + +

SYNOPSIS +

#include <stdio.h> + + int fgetc(FILE *stream); + char *fgets(char *s, int size, FILE *stream); + int getc(FILE *stream); + int getchar(void); + char *gets(char *s); + int ungetc(int c, FILE *stream); + +

DESCRIPTION +

fgetc() reads the next character from stream and returns + it as an unsigned char cast to an int, or EOF on end of + file or error. + + getc() is equivalent to fgetc() except that it may be + implemented as a macro which evaluates stream more than + once. + + getchar() is equivalent to getc(stdin). + + gets() reads a line from stdin into the buffer pointed to + by s until either a terminating newline or EOF, which it + replaces with '\0'. No check for buffer overrun is per- + formed (see BUGS below). + + fgets() reads in at most one less than n characters from + stream and stores them into the buffer pointed to by s. + Reading stops after an EOF or a newline. If a newline is + read, it is stored into the buffer. A '\0' is stored + after the last character in the buffer. + + ungetc() pushes c back to stream, cast to unsigned char, + where it is available for subsequent read operations. + Pushed - back characters will be returned in reverse + order; only one pushback is guaranteed. + + Calls to the functions described here can be mixed with + each other and with calls to other input functions from + the stdio library for the same input stream. + +

RETURN VALUES +

fgetc(), getc() and getchar() return the character read as + an unsigned char cast to an int or EOF on end of file or + error. + + gets() and fgets() return s on success, and NULL on end of + file or error. + + ungetc() returns c on success, or EOF on error. + + + +

GNU April 4, 1993 1 +

+ + + + +

GETS(3) Linux Programmer's Manual GETS(3) +

+ +

CONFORMS TO +

ANSI - C, POSIX.1 + +

BUGS +

Because it is impossible to tell without knowing the data + in advance how many characters gets() will read, and + because gets() will continue to store characters past the + end of the buffer, it is extremely dangerous to use. It + has been used to break computer security. Use fgets() + instead. + + It is not advisable to mix calls to input functions from + the stdio library with low - level calls to read() for the + file descriptor associated with the input stream; the + results will be undefined and very probably not what you + want. + +
+
+

SEE ALSO +

+read, +write, +fopen, +fread, +scanf, +puts, +fseek, +ferror, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/getuid.htm b/reference/C/MAN/getuid.htm new file mode 100644 index 0000000..f76486f --- /dev/null +++ b/reference/C/MAN/getuid.htm @@ -0,0 +1,98 @@ +getuid + +
+
+
+
+
+

GETUID(2) Linux Programmer's Manual GETUID(2) +

+ +

NAME +

getuid, geteuid - get user identity + +

SYNOPSIS +

#include <unistd.h> + + uid_t getuid(void); + uid_t geteuid(void); + +

DESCRIPTION +

getuid returns the real user ID of the current process. + + geteuid returns the effective user ID of the current pro- + cess. + + The real ID corresponds to the ID of the calling process. + The effective ID corresponds to the set ID bit on the file + being executed. + +

ERRORS +

These functions are always successful. + +

CONFORMS TO +

POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+setreuid, +setuid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.11 23 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/index.htm b/reference/C/MAN/index.htm new file mode 100644 index 0000000..e674e42 --- /dev/null +++ b/reference/C/MAN/index.htm @@ -0,0 +1,103 @@ +index + +
+
+
+
+
+

INDEX(3) Linux Programmer's Manual INDEX(3) +

+ +

NAME +

index, rindex - locate character in string + +

SYNOPSIS +

#include <string.h> + + char *index(const char *s, int c); + + char *rindex(const char *s, int c); + +

DESCRIPTION +

The index() function returns a pointer to the first occur- + rence of the character c in the string s. + + The rindex() function returns a pointer to the last occur- + rence of the character c in the string s. + + The terminating NULL character is considered to be a part + of the strings. + +

RETURN VALUE +

The index() and rindex() functions return a pointer to the + matched character or NULL if the character is not found. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+memchr, +strchr, +strpbrk, +strrchr, +strsep, +strspn, +strstr, +strtok, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 12, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ioctl.htm b/reference/C/MAN/ioctl.htm new file mode 100644 index 0000000..23d58e6 --- /dev/null +++ b/reference/C/MAN/ioctl.htm @@ -0,0 +1,101 @@ +ioctl + +
+
+
+
+
+

IOCTL(2) Linux Programmer's Manual IOCTL(2) +

+ +

NAME +

ioctl - control device + +

SYNOPSIS +

#include <sys/ioctl.h> + + int ioctl(int d, int request, ...) + + [The "third" argument is traditionally char *argp, and + will be so named for this discussion.] + +

DESCRIPTION +

The ioctl function manipulates the underlying device + parameters of special files. In particular, many operat- + ing characteristics of character special files (e.g. ter- + minals) may be controlled with ioctl requests. The argu- + ment d must be an open file descriptor. + + An ioctl request has encoded in it whether the argument is + an in parameter or out parameter, and the size of the + argument argp in bytes. Macros and defines used in speci- + fying an ioctl request are located in the file + sys/ioctl.h. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EBADF d is not a valid descriptor. + + ENOTTY d is not associated with a character special + device. + + ENOTTY The specified request does not apply to the kind of + object that the descriptor d references. + + EINVAL Request or argp is not valid. + +

HISTORY +

An ioctl function call appeared in Version 7 AT&T UNIX. + +
+
+

SEE ALSO +

+execve, +fcntl, +mt, +sd, +tty, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

BSD Man Page 23 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/isatty.htm b/reference/C/MAN/isatty.htm new file mode 100644 index 0000000..6eb2682 --- /dev/null +++ b/reference/C/MAN/isatty.htm @@ -0,0 +1,98 @@ +isatty + +
+
+
+
+
+

ISATTY(3) Linux Programmer's Manual ISATTY(3) +

+ +

NAME +

isatty - does this descriptor refer to a terminal + +

SYNOPSIS +

#include <unistd.h> + + int isatty ( int desc ); + +

DESCRIPTION +

returns 1 if desc is an open descriptor connected to a + terminal and 0 else. + +

CONFORMING TO +

SVID, AT&T, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+fstat, +ttyname, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux April 20, 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/labs.htm b/reference/C/MAN/labs.htm new file mode 100644 index 0000000..41e95e1 --- /dev/null +++ b/reference/C/MAN/labs.htm @@ -0,0 +1,101 @@ +labs + +
+
+
+
+
+

LABS(3) Linux Programmer's Manual LABS(3) +

+ +

NAME +

labs - computes the absolute value of a long integer. + +

SYNOPSIS +

#include <stdlib.h> + + long int labs(long int j); + +

DESCRIPTION +

The labs() function computes the absolute value of the + long integer argument j. + +

RETURN VALUE +

Returns the absolute value of the long integer argument. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +

NOTES +

Trying to take the absolute value of the most negative + integer is not defined. + +
+
+

SEE ALSO +

+abs, +ceil, +floor, +fabs, +rint, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU June 6, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ldexp.htm b/reference/C/MAN/ldexp.htm new file mode 100644 index 0000000..7429a5a --- /dev/null +++ b/reference/C/MAN/ldexp.htm @@ -0,0 +1,98 @@ +ldexp + +
+
+
+
+
+

LDEXP(3) Linux Programmer's Manual LDEXP(3) +

+ +

NAME +

ldexp - multiply floating-point number by integral power + of 2 + +

SYNOPSIS +

#include <math.h> + + double ldexp(double x, int exp); + +

DESCRIPTION +

The ldexp() function returns the result of multiplying the + floating-point number x by 2 raised to the power exp. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+frexp, +modf, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

BSD June 6, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ldiv.htm b/reference/C/MAN/ldiv.htm new file mode 100644 index 0000000..c7d4818 --- /dev/null +++ b/reference/C/MAN/ldiv.htm @@ -0,0 +1,97 @@ +ldiv + +
+
+
+
+
+

LDIV(3) Linux Programmer's Manual LDIV(3) +

+ +

NAME +

ldiv - computes the quotient and remainder of long integer + division. + +

SYNOPSIS +

#include <stdlib.h> + + ldiv_t ldiv(long int numer, long int denom); + +

DESCRIPTION +

The ldiv() function computes the value numer/denom and + returns the quotient and remainder in a structure named + ldiv_t that contains two long integer members named quot + and rem. + +

RETURN VALUE +

The ldiv_t structure. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+div, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/link.htm b/reference/C/MAN/link.htm new file mode 100644 index 0000000..6009720 --- /dev/null +++ b/reference/C/MAN/link.htm @@ -0,0 +1,167 @@ +link + +
+
+
+
+
+

LINK(2) Linux Programmer's Manual LINK(2) +

+ +

NAME +

link - make a new name for a file + +

SYNOPSIS +

#include <unistd.h> + + int link(const char *oldpath, const char *newpath); + +

DESCRIPTION +

link creates a new link (also known as a hard link) to an + existing file. + + If newpath exists it will not be overwritten. + + This new name may be used exactly as the old one for any + operation; both names refer to the same file (and so have + the same permissions and ownership) and it is impossible + to tell which name was the `original'. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EXDEV oldpath and newpath are not on the same filesys- + tem. + + EPERM The filesystem containing oldpath and newpath does + not support the creation of hard links. + + EFAULT oldpath or newpath points outside your accessible + address space. + + EACCES Write access to the directory containing newpath + is not allowed for the process's effective uid, or + one of the directories in oldpath or newpath did + not allow search (execute) permission. + + ENAMETOOLONG + oldpath or newpath was too long. + + ENOENT A directory component in oldpath or newpath does + not exist or is a dangling symbolic link. + + ENOTDIR A component used as a directory in oldpath or new- + path is not, in fact, a directory. + + ENOMEM Insufficient kernel memory was available. + + EROFS The file is on a read-only filesystem. + + EEXIST newpath already exists. + + EMLINK The file referred to by oldpath already has the + + + +

Linux 17 August 1994 1 +

+ + + + +

LINK(2) Linux Programmer's Manual LINK(2) +

+ + maximum number of links to it. + + ELOOP oldpath or newpath contains a reference to a cir- + cular symbolic link, ie a symbolic link whose + expansion contains a reference to itself. + + ENOSPC The device containing the file has no room for the + new directory entry. + + EPERM oldpath is the . or .. entry of a directory. + +

NOTES +

Hard links, as created by link, cannot span filesystems. + Use symlink if this is required. + +

CONFORMING TO +

SVID, AT&T, POSIX, BSD 4.3 + +

BUGS +

On NFS file systems, the return code may be wrong in case + the NFS server performs the link creation and dies before + it can say so. Use stat(2) to find out if the link got + created. + +
+
+

SEE ALSO +

+symlink, +unlink, +rename, +open, +stat, +ln, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 17 August 1994 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/longjmp.htm b/reference/C/MAN/longjmp.htm new file mode 100644 index 0000000..ba1bbb8 --- /dev/null +++ b/reference/C/MAN/longjmp.htm @@ -0,0 +1,99 @@ +longjmp + +
+
+
+
+
+

LONGJMP(3) Library functions LONGJMP(3) +

+ +

NAME +

longjmp - non-local jump to a saved stack context + +

SYNOPSIS +

#include <setjmp.h> + + void longjmp(jmp_buf env, int val); + +

DESCRIPTION +

longjmp() and setjmp(3) are useful for dealing with errors + and interrupts encountered in a low-level subroutine of a + program. longjmp() restores the environment saved by the + last call of setjmp() with the corresponding env argument. + After longjmp() is completed, program execution continues + as if the corresponding call of setjmp() had just returned + the value val. longjmp() cannot cause 0 to be returned. + If longjmp is invoked with a second argument of 0, 1 will + be returned instead. + +

RETURN VALUE +

This function never returns. + +

CONFORMING TO +

POSIX + +

NOTES +

POSIX does not specify if the signal context will be + restored or not. If you want to save restore signal + masks, use siglongjmp(3) longjmp() makes programs hard to + understand and maintain. If possible an alternative + should be used. + +
+
+

SEE ALSO +

+setjmp, +sigsetjmp, +siglongjmp, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                        November 25, 1994                       1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/lseek.htm b/reference/C/MAN/lseek.htm new file mode 100644 index 0000000..993137b --- /dev/null +++ b/reference/C/MAN/lseek.htm @@ -0,0 +1,165 @@ +lseek + +
+
+
+
+
+

LSEEK(2) Linux Programmer's Manual LSEEK(2) +

+ +

NAME +

lseek - reposition read/write file offset + +

SYNOPSIS +

#include <unistd.h> + + off_t lseek(int fildes, off_t offset, int whence); + +

DESCRIPTION +

The lseek function repositions the offset of the file + descriptor fildes to the argument offset according to the + directive whence. The argument fildes must be an open + file descriptor. Lseek repositions the file pointer + fildes as follows: + + If whence is SEEK_SET, the offset is set to offset + bytes. + + If whence is SEEK_CUR, the offset is set to its + current location plus offset bytes. + + If whence is SEEK_END, the offset is set to the + size of the file plus offset bytes. + + The lseek function allows the file offset to be set beyond + the end of the existing end-of-file of the file. If data + is later written at this point, subsequent reads of the + data in the gap return bytes of zeros (until data is actu- + ally written into the gap). + + Some devices are incapable of seeking. The value of the + pointer associated with such a device is undefined. + +

RETURN VALUES +

Upon successful completion, lseek returns the resulting + offset location as measured in bytes from the beginning of + the file. Otherwise, a value of -1 is returned and errno + is set to indicate the error. + +

ERRORS +

EBADF Fildes is not an open file descriptor. + + ESPIPE Fildes is associated with a pipe, socket, or FIFO. + + EINVAL Whence is not a proper value. + +

CONFORMS TO +

POSIX, BSD 4.3 + +

BUGS +

This document's use of whence is incorrect English, but + maintained for historical reasons. + + + + + +

Linux 1.2.9 10 June 1995 1 +

+ + + + +

LSEEK(2) Linux Programmer's Manual LSEEK(2) +

+ +
+
+

SEE ALSO +

+dup, +open, +fseek, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.2.9 10 June 1995 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/mblen.htm b/reference/C/MAN/mblen.htm new file mode 100644 index 0000000..ed12a75 --- /dev/null +++ b/reference/C/MAN/mblen.htm @@ -0,0 +1,100 @@ +mblen + +
+
+
+
+
+

MBLEN(3) Linux Programmer's Manual MBLEN(3) +

+ +

NAME +

mblen - determine the number of bytes in a character + +

SYNOPSIS +

#include <stdlib.h> + + int mblen(const char *s, size_t n); + +

DESCRIPTION +

The mblen() function scans the first n bytes of the string + s and returns the number of bytes in a character. The + mblen() function is equivalent to + + mbtowc((wchat_t *)0, s, n); + + except that the shift state of the mbtowc() function is + not affected. + +

RETURN VALUE +

The mblen() returns the number of bytes in a character or + -1 if the character is invalid or 0 if s is a NULL string. + +

CONFORMING TO +

SVID 3, ISO 9899 + +
+
+

SEE ALSO +

+mbstowcs, +mbtowc, +wcstombs, +wctomb, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/mbstowcs.htm b/reference/C/MAN/mbstowcs.htm new file mode 100644 index 0000000..b5345a1 --- /dev/null +++ b/reference/C/MAN/mbstowcs.htm @@ -0,0 +1,100 @@ +mbstowcs + +
+
+
+
+
+

MBSTOWCS(3) Linux Programmer's Manual MBSTOWCS(3) +

+ +

NAME +

mbstowcs - convert a multibyte string to a wide character + string. + +

SYNOPSIS +

#include <stdlib.h> + + size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n); + +

DESCRIPTION +

The mbstowcs() function converts a sequence of multibyte + characters from the array s into a sequence of wide char- + acters and stores up to n wide characters in the array + pwcs. + +

RETURN VALUE +

mbstowcs() returns the number of wide characters stored or + -1 if s contains an invalid multibyte character. + +

CONFORMING TO +

SVID 3, ISO 9899 + +
+
+

SEE ALSO +

+mblen, +mbtowc, +wcstombs, +wctomb, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/mbtowc.htm b/reference/C/MAN/mbtowc.htm new file mode 100644 index 0000000..df98bb0 --- /dev/null +++ b/reference/C/MAN/mbtowc.htm @@ -0,0 +1,100 @@ +mbtowc + +
+
+
+
+
+

MBTOWC(3) Linux Programmer's Manual MBTOWC(3) +

+ +

NAME +

mbtowc - convert a multibyte character to a wide charac- + ter. + +

SYNOPSIS +

#include <stdlib.h> + + int mbtowc(wchar_t *pwc, const char *s, size_t n); + +

DESCRIPTION +

The mbtowc() function converts a multibyte character s, + which is no longer than n bytes, into a wide character + and, if pwc is not NULL, stores the wide character in pwc. + +

RETURN VALUE +

mbtowc() returns the number of bytes in the multibyte + character or -1 if the multibyte character is not valid. + +

CONFORMING TO +

SVID 3, ISO 9899 + +
+
+

SEE ALSO +

+mblen, +mbstowcs, +wcstombs, +wctomb, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/memchr.htm b/reference/C/MAN/memchr.htm new file mode 100644 index 0000000..5c5148f --- /dev/null +++ b/reference/C/MAN/memchr.htm @@ -0,0 +1,103 @@ +memchr + +
+
+
+
+
+

MEMCHR(3) Linux Programmer's Manual MEMCHR(3) +

+ +

NAME +

memchr - scan memory for a character + +

SYNOPSIS +

#include <string.h> + + void *memchr(const void *s, int c, size_t n); + +

DESCRIPTION +

The memchr() function scans the first n bytes of the mem- + ory area pointed to by s for the character c. The first + byte to match c (interpreted as an unsigned character) + stops the operation. + +

RETURN VALUE +

The memchr() function returns a pointer to the matching + byte or NULL if the character does not occur in the given + memory area. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+index, +rindex, +strchr, +strpbrk, +strrchr, +strsep, +strspn, +strstr, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 12, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/memcmp.htm b/reference/C/MAN/memcmp.htm new file mode 100644 index 0000000..8e4e991 --- /dev/null +++ b/reference/C/MAN/memcmp.htm @@ -0,0 +1,101 @@ +memcmp + +
+
+
+
+
+

MEMCMP(3) Linux Programmer's Manual MEMCMP(3) +

+ +

NAME +

memcmp - compare memory areas + +

SYNOPSIS +

#include <string.h> + + int memcmp(const void *s1, const void *s2, size_t n); + +

DESCRIPTION +

The memcmp() function compares the first n bytes of the + memory areas s1 and s2. It returns an integer less than, + equal to, or greater than zero if s1 is found, respec- + tively, to be less than, to match, or be greater than s2. + +

RETURN VALUE +

The memcmp() function returns an integer less than, equal + to, or greater than zero if the first n bytes of s1 is + found, respectively, to be less than, to match, or be + greater than the first n bytes of s2. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+bcmp, +strcasecmp, +strcmp, +strcoll, +strncmp, +strncasecmp, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 10, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/memcpy.htm b/reference/C/MAN/memcpy.htm new file mode 100644 index 0000000..ae7a1a7 --- /dev/null +++ b/reference/C/MAN/memcpy.htm @@ -0,0 +1,101 @@ +memcpy + +
+
+
+
+
+

MEMCPY(3) Linux Programmer's Manual MEMCPY(3) +

+ +

NAME +

memcpy - copy memory area + +

SYNOPSIS +

#include <string.h> + + void *memcpy(void *dest, const void *src, size_t n); + +

DESCRIPTION +

The memcpy() function copies n bytes from memory area src + to memory area dest. The memory areas may not overlap. + Use memmove(3) if the memory areas do overlap. + +

RETURN VALUE +

The memcpy() function returns a pointer to dest. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+bcopy, +memccpy, +memmove, +strcpy, +strncpy, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 10, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/memmove.htm b/reference/C/MAN/memmove.htm new file mode 100644 index 0000000..a0dc1bb --- /dev/null +++ b/reference/C/MAN/memmove.htm @@ -0,0 +1,101 @@ +memmove + +
+
+
+
+
+

MEMMOVE(3) Linux Programmer's Manual MEMMOVE(3) +

+ +

NAME +

memmove - copy memory area + +

SYNOPSIS +

#include <string.h> + + void *memmove(void *dest, const void *src, size_t n); + +

DESCRIPTION +

The memmove() function copies n bytes from memory area src + to memory area dest. The memory areas may overlap. + +

RETURN VALUE +

The memmove() function returns a pointer to dest. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+bcopy, +memccpy, +memcpy, +strcpy, +strncpy, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 10, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/memset.htm b/reference/C/MAN/memset.htm new file mode 100644 index 0000000..4276ef6 --- /dev/null +++ b/reference/C/MAN/memset.htm @@ -0,0 +1,98 @@ +memset + +
+
+
+
+
+

MEMSET(3) Linux Programmer's Manual MEMSET(3) +

+ +

NAME +

memset - fill memory with a constant byte + +

SYNOPSIS +

#include <string.h> + + void *memset(void *s, int c, size_t n); + +

DESCRIPTION +

The memset() function fills the first n bytes of the mem- + ory area pointed to be s with the constant byte c. + +

RETURN VALUE +

The memset() function returns a pointer to the memory area + s. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+bzero, +swab, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 11, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/mkdir.htm b/reference/C/MAN/mkdir.htm new file mode 100644 index 0000000..7ac0bc9 --- /dev/null +++ b/reference/C/MAN/mkdir.htm @@ -0,0 +1,172 @@ +mkdir + +
+
+
+
+
+

MKDIR(2) Linux Programmer's Manual MKDIR(2) +

+ +

NAME +

mkdir - create a directory + +

SYNOPSIS +

#include <sys/types.h> + #include <fcntl.h> + #include <unistd.h> + + int mkdir(const char *pathname, mode_t mode); + +

DESCRIPTION +

mkdir attempts to create a directory named pathname. + + mode specifies the permissions to use. It is modified by + the process's umask in the usual way: the permissions of + the created file are (mode & ~umask). + + The newly created directory will be owned by the effective + uid of the process. If the directory containing the file + has the set group id bit set, or if the filesystem is + mounted with BSD group semantics, the new directory will + inherit the group ownership from its parent; otherwise it + will be owned by the effective gid of the process. + + If the parent directory has the set group id bit set then + so will the newly created directory. + + +

RETURN VALUE +

mkdir returns zero on success, or -1 if an error occurred + (in which case, errno is set appropriately). + +

ERRORS +

EEXIST pathname already exists (not necessarily as a + directory). + + EFAULT pathname points outside your accessible address + space. + + EACCES The parent directory does not allow write permis- + sion to the process, or one of the directories in + pathname did not allow search (execute) permission. + + ENAMETOOLONG + pathname was too long. + + ENOENT A directory component in pathname does not exist or + is a dangling symbolic link. + + ENOTDIR + A component used as a directory in pathname is not, + in fact, a directory. + + ENOMEM Insufficient kernel memory was available. + + + +

Linux 1.0 29 March 1994 1 +

+ + + + +

MKDIR(2) Linux Programmer's Manual MKDIR(2) +

+ + EROFS pathname refers to a file on a read-only filesystem + and write access was requested. + + ELOOP pathname contains a reference to a circular sym- + bolic link, ie a symbolic link whose expansion con- + tains a reference to itself. + + ENOSPC The device containing pathname has no room for the + new directory. ENOSPC The new directory cannot be + created because the user's disk quota is exhausted. + +

CONFORMING TO +

BUGS +

In some older versions of Linux (for example, 0.99pl7) all + the normal filesystems sometime allow the creation of two + files in the same directory with the same name. This + occurs only rarely and only on a heavily loaded system. + It is believed that this bug was fixed in the Minix + filesystem in Linux 0.99pl8 pre-release; and it is hoped + that it was fixed in the other filesystems shortly after- + wards. + + There are many infelicities in the protocol underlying + NFS. + +
+
+

SEE ALSO +

+read, +write, +fcntl, +close, +unlink, +open, +mknod, +stat, +umask, +mount, +socket, +socket, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.0 29 March 1994 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/modf.htm b/reference/C/MAN/modf.htm new file mode 100644 index 0000000..a17a355 --- /dev/null +++ b/reference/C/MAN/modf.htm @@ -0,0 +1,98 @@ +modf + +
+
+
+
+
+

MODF(3) Linux Programmer's Manual MODF(3) +

+ +

NAME +

modf - extract signed integral and fractional values from + floating-point number + +

SYNOPSIS +

#include <math.h> + + double modf(double x, double *iptr); + +

DESCRIPTION +

The modf() function breaks the argument x into an integral + part and a fractional part, each of which has the same + sign as x. The integral part is stored in iptr. + +

RETURN VALUE +

The modf() function returns the fractional part of x. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+frexp, +, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 6, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/opendir.htm b/reference/C/MAN/opendir.htm new file mode 100644 index 0000000..227c03f --- /dev/null +++ b/reference/C/MAN/opendir.htm @@ -0,0 +1,102 @@ +opendir + +
+
+
+
+
+

OPENDIR(3) Linux Programmer's Manual OPENDIR(3) +

+ +

NAME +

opendir - open a directory + +

SYNOPSIS +

#include <sys/types.h> + + #include <dirent.h> + + DIR *opendir(const char *name); + +

DESCRIPTION +

The opendir() function opens a directory stream corre- + sponding to the directory name, and returns a pointer to + the directory stream. The stream is positioned at the + first entry in the directory. + +

RETURN VALUE +

The opendir() function returns a pointer to the directory + stream or NULL if an error occurred. + +

ERRORS +

EACESS Permission denied. + + EMFILE Too many file descriptors in use by process. + + ENFILE Too many files are currently open in the system. + + ENOENT Directory does not exist, or name is an empty + string. + + ENOMEM Insufficient memory to complete the operation. + + ENOTDIR + name is not a directory. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+open, +readdir, +closedir, +rewinddir, +seekdir, +telldir, +scandir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           11 June 1995                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/pause.htm b/reference/C/MAN/pause.htm new file mode 100644 index 0000000..82ffc2a --- /dev/null +++ b/reference/C/MAN/pause.htm @@ -0,0 +1,99 @@ +pause + +
+
+
+
+
+

PAUSE(2) Linux Programmer's Manual PAUSE(2) +

+ +

NAME +

pause - wait for signal + +

SYNOPSIS +

#include<unistd.h> + + int pause(void); + +

DESCRIPTION +

pause causes the process to sleep until a signal is + received. + +

RETURN VALUE +

pause always returns -1, and errno is set to ERESTARTNO- + HAND. + +

ERRORS +

EINTR signal was received. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +
+
+

SEE ALSO +

+kill, +select, +signal, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux March 28, 1992 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/perlembed.htm b/reference/C/MAN/perlembed.htm new file mode 100644 index 0000000..2609362 --- /dev/null +++ b/reference/C/MAN/perlembed.htm @@ -0,0 +1,885 @@ +perlembed + +
+
+
+
+
+

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ +

NAME +

perlembed - how to embed perl in your C program + +

DESCRIPTION +

PREAMBLE + + Do you want to: + + Use C from Perl? + Read the perlcall manpage and the perlxs manpage. + + Use a UNIX program from Perl? + Read about backquotes and the system entry in the + perlfunc manpage and the exec entry in the perlfunc + manpage. + + Use Perl from Perl? + Read about the do entry in the perlfunc manpage and + the eval entry in the perlfunc manpage and the use + entry in the perlmod manpage and the require entry in + the perlmod manpage. + + Use C from C? + Rethink your design. + + Use Perl from C? + Read on... + + ROADMAP + + the section on Compiling your C program + + There's one example in each of the five sections: + + the section on Adding a Perl interpreter to your C program + + the section on Calling a Perl subroutine from your C + program + + the section on Evaluating a Perl statement from your C + program + + the section on Performing Perl pattern matches and + substitutions from your C program + + the section on Fiddling with the Perl stack from your C + program + + This documentation is UNIX specific. + + Compiling your C program + + Every C program that uses Perl must link in the perl + library. + + + +

30/Jan/96 perl 5.003 with 1 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + What's that, you ask? Perl is itself written in C; the + perl library is the collection of compiled C programs that + were used to create your perl executable (/usr/bin/perl or + equivalent). (Corollary: you can't use Perl from your C + program unless Perl has been compiled on your machine, or + installed properly--that's why you shouldn't blithely copy + Perl executables from machine to machine without also + copying the lib directory.) + + Your C program will--usually--allocate, "run", and + deallocate a PerlInterpreter object, which is defined in + the perl library. + + If your copy of Perl is recent enough to contain this + documentation (5.002 or later), then the perl library (and + EXTERN.h and perl.h, which you'll also need) will reside + in a directory resembling this: + + /usr/local/lib/perl5/your_architecture_here/CORE + + or perhaps just + + /usr/local/lib/perl5/CORE + + or maybe something like + + /usr/opt/perl5/CORE + + Execute this statement for a hint about where to find + CORE: + + perl -e 'use Config; print $Config{archlib}' + + Here's how you might compile the example in the next + section, the section on Adding a Perl interpreter to your + C program, on a DEC Alpha running the OSF operating + system: + + % cc -o interp interp.c -L/usr/local/lib/perl5/alpha-dec_osf/CORE + -I/usr/local/lib/perl5/alpha-dec_osf/CORE -lperl -lm + + You'll have to choose the appropriate compiler (cc, gcc, + et al.) and library directory (/usr/local/lib/...) for + your machine. If your compiler complains that certain + functions are undefined, or that it can't locate -lperl, + then you need to change the path following the -L. If it + complains that it can't find EXTERN.h or perl.h, you need + to change the path following the -I. + + You may have to add extra libraries as well. Which ones? + Perhaps those printed by + + perl -e 'use Config; print $Config{libs}' + + + + +

30/Jan/96 perl 5.003 with 2 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + Adding a Perl interpreter to youur C program + + In a sense, perl (the C program) is a good example of + embedding Perl (the language), so I'll demonstrate + embedding with miniperlmain.c, from the source + distribution. Here's a bastardized, non-portable version + of miniperlmain.c containing the essentials of embedding: + + #include <stdio.h> + #include <EXTERN.h> /* from the Perl distribution */ + #include <perl.h> /* from the Perl distribution */ + + static PerlInterpreter *my_perl; /*** The Perl interpreter ***/ + + int main(int argc, char **argv, char **env) + { + my_perl = perl_alloc(); + perl_construct(my_perl); + perl_parse(my_perl, NULL, argc, argv, env); + perl_run(my_perl); + perl_destruct(my_perl); + perl_free(my_perl); + } + + Now compile this program (I'll call it interp.c) into an + executable: + + % cc -o interp interp.c -L/usr/local/lib/perl5/alpha-dec_osf/CORE + -I/usr/local/lib/perl5/alpha-dec_osf/CORE -lperl -lm + + After a successful compilation, you'll be able to use + interp just like perl itself: + + % interp + print "Pretty Good Perl \n"; + print "10890 - 9801 is ", 10890 - 9801; + <CTRL-D> + Pretty Good Perl + 10890 - 9801 is 1089 + + or + + % interp -e 'printf("%x", 3735928559)' + deadbeef + + You can also read and execute Perl statements from a file + while in the midst of your C program, by placing the + filename in argv[1] before calling perl_run(). + + Calling a Perl subroutine from yyour C program + + To call individual Perl subroutines, you'll need to remove + the call to perl_run() and replace it with a call to + perl_call_argv(). + + + +

30/Jan/96 perl 5.003 with 3 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + That's shown below, in a program I'll call showtime.c. + + #include <stdio.h> + #include <EXTERN.h> + #include <perl.h> + + static PerlInterpreter *my_perl; + + int main(int argc, char **argv, char **env) + { + my_perl = perl_alloc(); + perl_construct(my_perl); + + perl_parse(my_perl, NULL, argc, argv, env); + + /*** This replaces perl_run() ***/ + perl_call_argv("showtime", G_DISCARD | G_NOARGS, argv); + perl_destruct(my_perl); + perl_free(my_perl); + } + + where showtime is a Perl subroutine that takes no + arguments (that's the G_NOARGS) and for which I'll ignore + the return value (that's the G_DISCARD). Those flags, and + others, are discussed in the perlcall manpage. + + I'll define the showtime subroutine in a file called + showtime.pl: + + print "I shan't be printed."; + + sub showtime { + print time; + } + + Simple enough. Now compile and run: + + % cc -o showtime showtime.c -L/usr/local/lib/perl5/alpha-dec_osf/CORE + -I/usr/local/lib/perl5/alpha-dec_osf/CORE -lperl -lm + + % showtime showtime.pl + 818284590 + + yielding the number of seconds that elapsed between + January 1, 1970 (the beginning of the UNIX epoch), and the + moment I began writing this sentence. + + If you want to pass some arguments to the Perl subroutine, + or you want to access the return value, you'll need to + manipulate the Perl stack, demonstrated in the last + section of this document: the section on Fiddling with the + Perl stack from your C program + + + + + +

30/Jan/96 perl 5.003 with 4 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + Evaluating a Perl statement fr

om your C program +

+ NOTE: This section, and the next, employ some very brittle + techniques for evaluting strings of Perl code. Perl 5.002 + contains some nifty features that enable A Better Way + (such as with the perl_eval_sv entry in the perlguts + manpage). Look for updates to this document soon. + + One way to evaluate a Perl string is to define a function + (we'll call ours perl_eval()) that wraps around Perl's the + eval entry in the perlfunc manpage. + + Arguably, this is the only routine you'll ever need to + execute snippets of Perl code from within your C program. + Your string can be as long as you wish; it can contain + multiple statements; it can use the require entry in the + perlmod manpage or the do entry in the perlfunc manpage to + include external Perl files. + + Our perl_eval() lets us evaluate individual Perl strings, + and then extract variables for coercion into C types. The + following program, string.c, executes three Perl strings, + extracting an int from the first, a float from the second, + and a char * from the third. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

30/Jan/96 perl 5.003 with 5 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + #include <stdio.h> + #include <EXTERN.h> + #include <perl.h> + + static PerlInterpreter *my_perl; + + int perl_eval(char *string) + { + char *argv[2]; + argv[0] = string; + argv[1] = NULL; + perl_call_argv("_eval_", 0, argv); + } + + main (int argc, char **argv, char **env) + { + char *embedding[] = { "", "-e", "sub _eval_ { eval $_[0] }" }; + STRLEN length; + + my_perl = perl_alloc(); + perl_construct( my_perl ); + + perl_parse(my_perl, NULL, 3, embedding, env); + + /** Treat $a as an integer **/ + perl_eval("$a = 3; $a **= 2"); + printf("a = %d\n", SvIV(perl_get_sv("a", FALSE))); + + /** Treat $a as a float **/ + perl_eval("$a = 3.14; $a **= 2"); + printf("a = %f\n", SvNV(perl_get_sv("a", FALSE))); + + /** Treat $a as a string **/ + perl_eval("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a); "); + printf("a = %s\n", SvPV(perl_get_sv("a", FALSE), length)); + + perl_destruct(my_perl); + perl_free(my_perl); + } + + All of those strange functions with sv in their names help + convert Perl scalars to C types. They're described in the + perlguts manpage. + + If you compile and run string.c, you'll see the results of + using SvIV() to create an int, SvNV() to create a float, + and SvPV() to create a string: + + a = 9 + a = 9.859600 + a = Just Another Perl Hacker + + + + + + +

30/Jan/96 perl 5.003 with 6 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + Performing Perl pattern matche

s and substitutions from +

your C program + + Our perl_eval() lets us evaluate strings of Perl code, so + we can define some functions that use it to "specialize" + in matches and substitutions: match(), substitute(), and + matches(). + + char match(char *string, char *pattern); + + Given a string and a pattern (e.g. "m/clasp/" or + "/\b\w*\b/", which in your program might be represented as + "/\\b\\w*\\b/"), returns 1 if the string matches the + pattern and 0 otherwise. + + int substitute(char *string[], char *pattern); + + Given a pointer to a string and an "=~" operation (e.g. + "s/bob/robert/g" or "tr[A-Z][a-z]"), modifies the string + according to the operation, returning the number of + substitutions made. + + int matches(char *string, char *pattern, char **matches[]); + + Given a string, a pattern, and a pointer to an empty array + of strings, evaluates $string =~ $pattern in an array + context, and fills in matches with the array elements + (allocating memory as it does so), returning the number of + matches found. + + Here's a sample program, match.c, that uses all three: + + + + + + + + + + + + + + + + + + + + + + + + + + +

30/Jan/96 perl 5.003 with 7 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + #include <stdio.h> + #include <EXTERN.h> + #include <perl.h> + + static PerlInterpreter *my_perl; + + int eval(char *string) + { + char *argv[2]; + argv[0] = string; + argv[1] = NULL; + perl_call_argv("_eval_", 0, argv); + } + + /** match(string, pattern) + ** + ** Used for matches in a scalar context. + ** + ** Returns 1 if the match was successful; 0 otherwise. + **/ + char match(char *string, char *pattern) + { + char *command; + command = malloc(sizeof(char) * strlen(string) + strlen(pattern) + 37); + sprintf(command, "$string = '%s'; $return = $string =~ %s", + string, pattern); + perl_eval(command); + free(command); + return SvIV(perl_get_sv("return", FALSE)); + } + + /** substitute(string, pattern) + ** + ** Used for =~ operations that modify their left-hand side (s/// and tr///) + ** + ** Returns the number of successful matches, and + ** modifies the input string if there were any. + **/ + int substitute(char *string[], char *pattern) + { + char *command; + STRLEN length; + command = malloc(sizeof(char) * strlen(*string) + strlen(pattern) + 35); + sprintf(command, "$string = '%s'; $ret = ($string =~ %s)", + *string, pattern); + perl_eval(command); + free(command); + *string = SvPV(perl_get_sv("string", FALSE), length); + return SvIV(perl_get_sv("ret", FALSE)); + } + + /** matches(string, pattern, matches) + ** + ** Used for matches in an array context. + + + +

30/Jan/96 perl 5.003 with 8 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + ** + ** Returns the number of matches, + ** and fills in **matches with the matching substrings (allocates memory!) + **/ + int matches(char *string, char *pattern, char **matches[]) + { + char *command; + SV *current_match; + AV *array; + I32 num_matches; + STRLEN length; + int i; + + command = malloc(sizeof(char) * strlen(string) + strlen(pattern) + 38); + sprintf(command, "$string = '%s'; @array = ($string =~ %s)", + string, pattern); + perl_eval(command); + free(command); + array = perl_get_av("array", FALSE); + num_matches = av_len(array) + 1; /** assume $[ is 0 **/ + *matches = (char **) malloc(sizeof(char *) * num_matches); + for (i = 0; i <= num_matches; i++) { + current_match = av_shift(array); + (*matches)[i] = SvPV(current_match, length); + } + return num_matches; + } + + main (int argc, char **argv, char **env) + { + char *embedding[] = { "", "-e", "sub _eval_ { eval $_[0] }" }; + char *text, **matches; + int num_matches, i; + int j; + + my_perl = perl_alloc(); + perl_construct( my_perl ); + + perl_parse(my_perl, NULL, 3, embedding, env); + + text = (char *) malloc(sizeof(char) * 486); /** A long string follows! **/ + sprintf(text, "%s", "When he is at a convenience store and the bill comes to some amount like 76 cents, Maynard is aware that there is something he *should* do, something that will enable him to get back a quarter, but he has no idea *what*. He fumbles through his red squeezey changepurse and gives the boy three extra pennies with his dollar, hoping that he might luck into the corre

ct amount. The boy gives him back two of his own pennies and then the big shiny quarter that is his prize. -RICHH"); +

+ if (perl_match(text, "m/quarter/")) /** Does text contain 'quarter'? **/ + printf("perl_match: Text contains the word 'quarter'.\n\n"); + else + printf("perl_match: Text doesn't contain the word 'quarter'.\n\n"); + + if (perl_match(text, "m/eighth/")) /** Does text contain 'eighth'? **/ + printf("perl_match: Text contains the word 'eighth'.\n\n"); + else + printf("perl_match: Text doesn't contain the word 'eighth'.\n\n"); + + /** Match all occurrences of /wi../ **/ + + + +

30/Jan/96 perl 5.003 with 9 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + num_matches = perl_matches(text, "m/(wi..)/g", &matches); + + printf("perl_matches: m/(wi..)/g found %d matches...\n", num_matches); + for (i = 0; i < num_matches; i++) + printf("match: %s\n", matches[i]); + printf("\n"); + for (i = 0; i < num_matches; i++) { + free(matches[i]); + } + free(matches); + + /** Remove all vowels from text **/ + num_matches = perl_substitute(&text, "s/[aeiou]//gi"); + if (num_matches) { + printf("perl_substitute: s/[aeiou]//gi...%d substitutions made.\n", + num_matches); + printf("Now text is: %s\n\n", text); + } + + /** Attempt a substitution + if (!perl_substitute(&text, "s/Perl/C/")) { + printf("perl_substitute: s/Perl/C...No substitution made.\n\n"); + } + + free(text); + + perl_destruct(my_perl); + perl_free(my_perl); + } + + which produces the output + + perl_match: Text contains the word 'quarter'. + + perl_match: Text doesn't contain the word 'eighth'. + + perl_matches: m/(wi..)/g found 2 matches... + match: will + match: with + + perl_substitute: s/[aeiou]//gi...139 substitutions made. + Now text is: Whn h s t cnvnnc str nd th bll cms t sm mnt lk 76 cnts, Mynrd s wr tht thr s smthng h *shld* d, smthng tht wll nbl hm t gt bck qrtr, bt h hs n d *wht*. H fmbls thrgh hs rd s

qzy chngprs nd gvs th by thr xtr pnns wth hs dllr, hpng tht h mght lck nt th crrct mnt. Th by gvs hm bck tw f hs wn pnns nd thn th bg shny qrtr tht s hs prz. -RCHH +

+ perl_substitute: s/Perl/C...No substitution made. + + =head2 Fiddling with the Perl stack from your C program + + When trying to explain stacks, most computer science + textbooks mumble something about spring-loaded columns of + cafeteria plates: the last thing you pushed on the stack + is the first thing you pop off. That'll do for our + purposes: your C program will push some arguments onto + "the Perl stack", shut its eyes while some magic happens, + and then pop the results--the return value of your Perl + + + +

30/Jan/96 perl 5.003 with 10 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + subroutine--off the stack. + + First you'll need to know how to convert between C types + and Perl types, with newSViv() and sv_setnv() and newAV() + and all their friends. They're described in the perlguts + manpage. + + Then you'll need to know how to manipulate the Perl stack. + That's described in the perlcall manpage. + + Once you've understood those, embedding Perl in C is easy. + + Since C has no built-in function for integer + exponentiation, let's make Perl's ** operator available to + it (this is less useful than it sounds, since Perl + implements ** with C's pow() function). First I'll create + a stub exponentiation function in power.pl: + + sub expo { + my ($a, $b) = @_; + return $a ** $b; + } + + Now I'll create a C program, power.c, with a function + PerlPower() that contains all the perlguts necessary to + push the two arguments into expo() and to pop the return + value out. Take a deep breath... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

30/Jan/96 perl 5.003 with 11 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ + #include <stdio.h> + #include <EXTERN.h> + #include <perl.h> + + static PerlInterpreter *my_perl; + + static void + PerlPower(int a, int b) + { + dSP; /* initialize stack pointer */ + ENTER; /* everything created after here */ + SAVETMPS; /* ...is a temporary variable. */ + PUSHMARK(sp); /* remember the stack pointer */ + XPUSHs(sv_2mortal(newSViv(a))); /* push the base onto the stack */ + XPUSHs(sv_2mortal(newSViv(b))); /* push the exponent onto stack */ + PUTBACK; /* make local stack pointer global */ + perl_call_pv("expo", G_SCALAR); /* call the function */ + SPAGAIN; /* refresh stack pointer */ + /* pop the return value from stack */ + printf ("%d to the %dth power is %d.\n", a, b, POPi); + PUTBACK; + FREETMPS; /* free that return value */ + LEAVE; /* ...and the XPUSHed "mortal" args.*/ + } + + int main (int argc, char **argv, char **env) + { + char *my_argv[2]; + + my_perl = perl_alloc(); + perl_construct( my_perl ); + + my_argv[1] = (char *) malloc(10); + sprintf(my_argv[1], "power.pl"); + + perl_parse(my_perl, NULL, argc, my_argv, env); + + PerlPower(3, 4); /*** Compute 3 ** 4 ***/ + + perl_destruct(my_perl); + perl_free(my_perl); + } + + + Compile and run: + + % cc -o power power.c -L/usr/local/lib/perl5/alpha-dec_osf/CORE + -I/usr/local/lib/perl5/alpha-dec_osf/CORE -lperl -lm + + % power + 3 to the 4th power is 81. + + + + + + +

30/Jan/96 perl 5.003 with 12 +

+ + + + +

PERLEMBED(1) Perl Programmers Reference Guide PERLEMBED(1) +

+ +

MORAL +

You can sometimes write faster code in C, but you can + always write code faster in Perl. Since you can use each + from the other, combine them as you wish. + +

AUTHOR +

Jon Orwant <orwant@media.mit.edu>, with contributions from + Tim Bunce, Tom Christiansen, Dov Grobgeld, and Ilya + Zakharevich. + + December 18, 1995 + + Some of this material is excerpted from my book: Perl 5 + Interactive, Waite Group Press, 1996 (ISBN 1-57169-064-6) + and appears courtesy of Waite Group Press. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

30/Jan/96 perl 5.003 with 13 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/perror.htm b/reference/C/MAN/perror.htm new file mode 100644 index 0000000..9fec91e --- /dev/null +++ b/reference/C/MAN/perror.htm @@ -0,0 +1,98 @@ +perror + +
+
+
+
+
+

PERROR(3) Library functions PERROR(3) +

+ +

NAME +

perror - print a system error message + +

SYNOPSIS +

#include <stdio.h> + + void perror(const char *s); + +

DESCRIPTION +

perror produces a message on the standard error output, + describing the last error encountered during a call to a + system or library function. The argument string s is + printed first, then a colon and a blank, then the message + and a new-line. To be of most use, the argument string + should include the name of the program that incurred the + error. The error number is taken from the external vari- + able errno, which is set when errors occur but not cleared + when non-erroneous calls are made. + +

CONFORMING TO +

ANSI C, POSIX + +
+
+

SEE ALSO +

+errno, +strerror, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          March 16, 1995                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/printf.htm b/reference/C/MAN/printf.htm new file mode 100644 index 0000000..cb8bf95 --- /dev/null +++ b/reference/C/MAN/printf.htm @@ -0,0 +1,362 @@ +printf + +
+
+
+
+
+

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ +

NAME +

printf, fprintf, sprintf, vprintf, vfprintf, vsprintf - + formatted output conversion + +

SYNOPSIS +

#include <stdio.h> + + int printf( const char *format, ...); + int fprintf( FILE *stream, const char *format, ...); + int sprintf( char *str, const char *format, ...); + + #include <stdarg.h> + + int vprintf( const char *format, va_list ap); + int vfprintf( FILE *stream, const char *format, va_list + ap); + int vsprintf( char *str, char *format, va_list ap); + +

DESCRIPTION +

The printf family of functions produces output according + to a format as described below. Printf and vprintf write + output to stdout, the standard output stream; fprintf and + vfprintf write output to the given output stream; sprintf, + and vsprintf write to the character string str. These + functions write the output under the control of a format + string that specifies how subsequent arguments (or argu- + ments accessed via the variable-length argument facilities + of stdarg(3) are converted for output. These functions + return the number of characters printed (not including the + trailing `\0' used to end output to strings). + + The format string is composed of zero or more directives: + ordinary characters (not %), which are copied unchanged to + the output stream; and conversion specifications, each of + which results in fetching zero or more subsequent argu- + ments. Each conversion specification is introduced by the + character %. The arguments must correspond properly + (after type promotion) with the conversion specifier. + After the %, the following appear in sequence: + + o Zero or more of the following flags: + + # specifying that the value should be con- + verted to an ``alternate form''. For c, d, + i, n, p, s, and u conversions, this option + has no effect. For o conversions, the pre- + cision of the number is increased to force + the first character of the output string to + a zero (except if a zero value is printed + with an explicit precision of zero). For x + and X conversions, a non-zero result has the + string `0x' (or `0X' for X conversions) + prepended to it. For e, E, f, g, and G con- + versions, the result will always contain a + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + decimal point, even if no digits follow it + (normally, a decimal point appears in the + results of those conversions only if a digit + follows). For g and G conversions, trailing + zeros are not removed from the result as + they would otherwise be. + + 0 specifying zero padding. For all conver- + sions except n, the converted value is + padded on the left with zeros rather than + blanks. If a precision is given with a + numeric conversion (d, i, o, u, i, x, and + X), the 0 flag is ignored. + + - (a negative field width flag) indicates the + converted value is to be left adjusted on + the field boundary. Except for n conver- + sions, the converted value is padded on the + right with blanks, rather than on the left + with blanks or zeros. A - overrides a 0 if + both are given. + + (a space) specifying that a blank should be + left before a positive number produced by a + signed conversion (d, e, E, f, g, G, or i). + + + specifying that a sign always be placed + before a number produced by a signed conver- + sion. A + overrides a space if both are + used. + + o An optional decimal digit string specifying a mini- + mum field width. If the converted value has fewer + characters than the field width, it will be padded + with spaces on the left (or right, if the left- + adjustment flag has been given) to fill out the + field width. + + o An optional precision, in the form of a period + (`.') followed by an optional digit string. If + the digit string is omitted, the precision is taken + as zero. This gives the minimum number of digits + to appear for d, i, o, u, x, and X conversions, the + number of digits to appear after the decimal-point + for e, E, and f conversions, the maximum number of + significant digits for g and G conversions, or the + maximum number of characters to be printed from a + string for s conversions. + + o The optional character h, specifying that a follow- + ing d, i, o, u, x, or X conversion corresponds to a + short int or unsigned short int argument, or that a + following n conversion corresponds to a pointer to + a short int argument. + + + +

BSD MANPAGE 29 November 1993 2 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + o The optional character l (ell) specifying that a + following d, i, o, u, x, or X conversion applies to + a pointer to a long int or unsigned long int argu- + ment, or that a following n conversion corresponds + to a pointer to a long int argument. + + o The character L specifying that a following e, E, + f, g, or G conversion corresponds to a long double + argument. + + o A character that specifies the type of conversion + to be applied. + + A field width or precision, or both, may be indicated by + an asterisk `*' instead of a digit string. In this case, + an int argument supplies the field width or precision. A + negative field width is treated as a left adjustment flag + followed by a positive field width; a negative precision + is treated as though it were missing. + + The conversion specifiers and their meanings are: + + diouxX The int (or appropriate variant) argument is con- + verted to signed decimal (d and i), unsigned octal + (o, unsigned decimal (u, or unsigned hexadecimal (x + and X) notation. The letters abcdef are used for x + conversions; the letters ABCDEF are used for X con- + versions. The precision, if any, gives the minimum + number of digits that must appear; if the converted + value requires fewer digits, it is padded on the + left with zeros. + + DOU The long int argument is converted to signed deci- + mal, unsigned octal, or unsigned decimal, as if the + format had been ld, lo, or lu respectively. These + conversion characters are deprecated, and will + eventually disappear. + + eE The double argument is rounded and converted in the + style [-]d.dddedd where there is one digit before + the decimal-point character and the number of dig- + its after it is equal to the precision; if the pre- + cision is missing, it is taken as 6; if the preci- + sion is zero, no decimal-point character appears. + An E conversion uses the letter E (rather than e) + to introduce the exponent. The exponent always + contains at least two digits; if the value is zero, + the exponent is 00. + + f The double argument is rounded and converted to + decimal notation in the style [-]ddd.ddd, where the + number of digits after the decimal-point character + is equal to the precision specification. If the + precision is missing, it is taken as 6; if the + + + +

BSD MANPAGE 29 November 1993 3 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + precision is explicitly zero, no decimal-point + character appears. If a decimal point appears, at + least one digit appears before it. + + g The double argument is converted in style f or e + (or E for G conversions). The precision specifies + the number of significant digits. If the precision + is missing, 6 digits are given; if the precision is + zero, it is treated as 1. Style e is used if the + exponent from its conversion is less than -4 or + greater than or equal to the precision. Trailing + zeros are removed from the fractional part of the + result; a decimal point appears only if it is fol- + lowed by at least one digit. + + c The int argument is converted to an unsigned char, + and the resulting character is written. + + s The ``char *'' argument is expected to be a pointer + to an array of character type (pointer to a + string). Characters from the array are written up + to (but not including) a terminating NUL character; + if a precision is specified, no more than the num- + ber specified are written. If a precision is + given, no null character need be present; if the + precision is not specified, or is greater than the + size of the array, the array must contain a termi- + nating NUL character. + + p The ``void *'' pointer argument is printed in hex- + adecimal (as if by %#x or %#lx). + + n The number of characters written so far is stored + into the integer indicated by the ``int *'' (or + variant) pointer argument. No argument is con- + verted. + + % A `%' is written. No argument is converted. The + complete conversion specification is `%%'. + + In no case does a non-existent or small field width cause + truncation of a field; if the result of a conversion is + wider than the field width, the field is expanded to con- + tain the conversion result. + + +

EXAMPLES +

To print a date and time in the form `Sunday, July 3, + 10:02', where weekday and month are pointers to strings: + #include <stdio.h> + fprintf(stdout, "%s, %s %d, %.2d:%.2d\n", + weekday, month, day, hour, min); + + To print to five decimal places: + + + +

BSD MANPAGE 29 November 1993 4 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + #include <math.h> + #include <stdio.h> + fprintf(stdout, "pi = %.5f\n", 4 * atan(1.0)); + + To allocate a 128 byte string and print into it: + #include <stdio.h> + #include <stdlib.h> + #include <stdarg.h> + char *newfmt(const char *fmt, ...) + { + char *p; + va_list ap; + if ((p = malloc(128)) == NULL) + return (NULL); + va_start(ap, fmt); + (void) vsnprintf(p, 128, fmt, ap); + va_end(ap); + return (p); + } + +
+
+

SEE ALSO +

+printf, +scanf, +

+
+

STANDARDS +

The fprintf, printf, sprintf, vprintf, vfprintf, and + vsprintf functions conform to ANSI C3.159-1989 (``ANSI + C''). + +

BUGS +

Some floating point conversions under Linux cause memory + leaks. + + The conversion formats %D, %O, and %U are not standard and + are provided only for backward compatibility. These may + not be provided under Linux. + + The effect of padding the %p format with zeros (either by + the 0 flag or by specifying a precision), and the benign + effect (i.e., none) of the # flag on %n and %p conver- + sions, as well as other nonsensical combinations such as + %Ld, are not standard; such combinations should be + avoided. + + Because sprintf and vsprintf assume an infinitely long + string, callers must be careful not to overflow the actual + space; this is often impossible to assure. + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 5 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/putenv.htm b/reference/C/MAN/putenv.htm new file mode 100644 index 0000000..8669e32 --- /dev/null +++ b/reference/C/MAN/putenv.htm @@ -0,0 +1,99 @@ +putenv + +
+
+
+
+
+

PUTENV(3) Linux Programmer's Manual PUTENV(3) +

+ +

NAME +

putenv - change or add an environment variable + +

SYNOPSIS +

#include <stdlib.h> + + int putenv(const char *string); + +

DESCRIPTION +

The putenv() function adds or changes the value of envi- + ronment variables. The argument string is of the form + name = value. If name does not already exist in the envi- + ronment, then string is added to the environment. If name + does exist, then the value of name in the environment is + changed to value. + +

RETURN VALUE +

The putenv() function returns zero on success, or -1 if an + error occurs. + +

ERRORS +

ENOMEM Insufficient space to allocate new environment. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+getenv, +setenv, +unsetenv, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 8, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/putpwent.htm b/reference/C/MAN/putpwent.htm new file mode 100644 index 0000000..0a639ef --- /dev/null +++ b/reference/C/MAN/putpwent.htm @@ -0,0 +1,101 @@ +putpwent + +
+
+
+
+
+

PUTPWENT(3) Linux Programmer's Manual PUTPWENT(3) +

+ +

NAME +

putpwent - write a password file entry + +

SYNOPSIS +

#include <pwd.h> + #include <stdio.h> + #include <sys/types.h> + + int putpwent(const struct passwd *p, FILE *stream); + +

DESCRIPTION +

The putpwent() function writes a password entry from the + structure p in the file associated with stream. + + The passwd structure is defined in <pwd.h> as follows: + + struct passwd { + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user id */ + gid_t pw_gid; /* group id */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ + }; + +

RETURN VALUE +

The putpwent() function returns 0 on success, or -1 if an + error occurs. + +

ERRORS +

EINVAL Invalid (NULL) argument given. + +

CONFORMING TO +

SVID 3 + +
+
+

SEE ALSO +

+fgetpwent, +getpwent, +setpwent, +endpwent, +getpwuid, +getpw, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 9, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/puts.htm b/reference/C/MAN/puts.htm new file mode 100644 index 0000000..fc037e5 --- /dev/null +++ b/reference/C/MAN/puts.htm @@ -0,0 +1,167 @@ +puts + +
+
+
+
+
+

PUTS(3) Linux Programmer's Manual PUTS(3) +

+ +

NAME +

fputc, fputs, putc, putchar, puts - output of characters + and strings + +

SYNOPSIS +

#include <stdio.h> + + int fputc(int c, FILE *stream); + int fputs(const char *s, FILE *stream); + int putc(int c, FILE *stream); + int putchar(int c); + int puts(char *s); + int ungetc(int c, FILE *stream); + +

DESCRIPTION +

fputc() writes the character c, cast to an unsigned char, + to stream. + + fputs() writes the string s to stream, without its trail- + ing '\0'. + + putc() is equivalent to fputc() except that it may be + implemented as a macro which evaluates stream more than + once. + + putchar(c); is equivalent to putc(c,stdout). + + puts() writes the string s and a trailing newline to std- + out. + + Calls to the functions described here can be mixed with + each other and with calls to other output functions from + the stdio library for the same output stream. + +

RETURN VALUES +

fputc(), putc() and putchar() return the character written + as an unsigned char cast to an int or EOF on error. + + puts() and fputs() return a non - negative number on suc- + cess, or EOF on error. + + +

CONFORMS TO +

ANSI - C, POSIX.1 + +

BUGS +

It is not advisable to mix calls to output functions from + the stdio library with low - level calls to write() for + the file descriptor associated with the same output + stream; the results will be undefined and very probably + not what you want. + +
+
+

SEE ALSO +

+write, +fopen, +fwrite, +scanf, +gets, +

+
+
+
+

GNU April 4, 1993 1 +

+ + + + +

PUTS(3) Linux Programmer's Manual PUTS(3) +

+ + fseek(3), ferror(3) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/raise.htm b/reference/C/MAN/raise.htm new file mode 100644 index 0000000..6050ae4 --- /dev/null +++ b/reference/C/MAN/raise.htm @@ -0,0 +1,99 @@ +raise + +
+
+
+
+
+

RAISE(3) Linux Programmer's Manual RAISE(3) +

+ +

NAME +

raise - send a signal. + +

SYNOPSIS +

#include <signal.h> + + int raise (int sig); + +

DESCRIPTION +

raise() sends a signal to the current process. It is + equivalent to kill(getpid(),sig) + +

RETURN VALUE +

Zero for success, nonzero for failure. + +

CONFORMS TO +

ANSI - C + +
+
+

SEE ALSO +

+kill, +signal, +getpid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/rand.htm b/reference/C/MAN/rand.htm new file mode 100644 index 0000000..d1de27c --- /dev/null +++ b/reference/C/MAN/rand.htm @@ -0,0 +1,166 @@ +rand + +
+
+
+
+
+

RAND(3) Linux Programmer's Manual RAND(3) +

+ +

NAME +

rand, srand - random number generator. + +

SYNOPSIS +

#include <stdlib.h> + + int rand(void); + + void srand(unsigned int seed); + +

DESCRIPTION +

The rand() function returns a pseudo-random integer + between 0 and RAND_MAX. + + The srand() function sets its argument as the seed for a + new sequence of pseudo-random integers to be returned by + rand(). These sequences are repeatable by calling srand() + with the same seed value. + + If no seed value is provided, the rand() function is auto- + matically seeded with a value of 1. + +

RETURN VALUE +

The rand() function returns a value between 0 and + RAND_MAX. The srand() returns no value. + +

NOTES +

The versions of rand() and srand() in the Linux C Library + use the same random number generator as random() and sran- + dom(), so the lower-order bits should be as random as the + higher-order bits. However, on older rand() implementa- + tions, the lower-order bits are much less random than the + higher-order bits. + + In Numerical Recipes in C: The Art of Scientific Computing + (William H. Press, Brian P. Flannery, Saul A. Teukolsky, + William T. Vetterling; New York: Cambridge University + Press, 1990 (1st ed, p. 207)), the following comments are + made: + "If you want to generate a random integer between 1 + and 10, you should always do it by + + j=1+(int) (10.0*rand()/(RAND_MAX+1.0)); + + and never by anything resembling + + j=1+((int) (1000000.0*rand()) % 10); + + (which uses lower-order bits)." + + Random-number generation is a complex topic. The Numeri- + cal Recipes in C book (see reference above) provides an + excellent discussion of practical random-number generation + issues in Chapter 7 (Random Numbers). + + + +

GNU 18 May 1995 1 +

+ + + + +

RAND(3) Linux Programmer's Manual RAND(3) +

+ + For a more theoretical discussion which also covers many + practical issues in depth, please see Chapter 3 (Random + Numbers) in Donald E. Knuth's The Art of Computer Program- + ming, volume 2 (Seminumerical Algorithms), 2nd ed.; Read- + ing, Massachusetts: Addison-Wesley Publishing Company, + 1981. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+random, +srandom, +initstate, +setstate, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU 18 May 1995 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/readdir.htm b/reference/C/MAN/readdir.htm new file mode 100644 index 0000000..39b3d23 --- /dev/null +++ b/reference/C/MAN/readdir.htm @@ -0,0 +1,164 @@ +readdir + +
+
+
+
+
+

READDIR(2) Linux Programmer's Manual READDIR(2) +

+ +

NAME +

readdir - read directory entry + +

SYNOPSIS +

#include <unistd.h> + #include <linux/dirent.h> + #include <linux/unistd.h> + + _syscall3(int, readdir, uint, fd, struct dirent *, dirp, uint, count); + + int readdir(unsigned int fd, struct dirent *dirp, unsigned int count); + +

DESCRIPTION +

This is not the function you are interested in. Look at + readdir(3) for the POSIX conforming C library interface. + This page documents the bare kernel system call interface, + which can change, and which is superseded by getdents(2). + + readdir reads one dirent structure from the directory + pointed at by fd into the memory area pointed to by dirp. + The parameter count is ignored; at most one dirent struc- + ture is read. + + The dirent structure is declared as follows: + + struct dirent + { + long d_ino; /* inode number */ + off_t d_off; /* offset to this dirent */ + unsigned short d_reclen; /* length of this d_name */ + char d_name [NAME_MAX+1]; /* file name (null-terminated) */ + } + + d_ino is an inode number. d_off is the distance from the + start of the directory to this dirent. d_reclen is the + size of d_name, not counting the null terminator. d_name + is a null-terminated file name. + + +

RETURN VALUE +

On success, 1 is returned. On end of directory, 0 is + returned. On error, -1 is returned, and errno is set + appropriately. + +

ERRORS +

EBADF Invalid file descriptor fd. + + ENOTDIR + File descriptor does not refer to a directory. + +

CONFORMING TO +

This system call is Linux specific. + + + + + +

Linux 1.3.6 22 July 1995 1 +

+ + + + +

READDIR(2) Linux Programmer's Manual READDIR(2) +

+ +
+
+

SEE ALSO +

+getdents, +readdir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.3.6 22 July 1995 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/realloc.htm b/reference/C/MAN/realloc.htm new file mode 100644 index 0000000..359cb98 --- /dev/null +++ b/reference/C/MAN/realloc.htm @@ -0,0 +1,97 @@ +realloc + +
+
+
+
+
+

MALLOC(3) Linux Programmer's Manual MALLOC(3) +

+ +

NAME +

calloc, malloc, free, realloc - Allocate and free dynamic + memory + +

SYNOPSIS +

#include <stdlib.h> + + void *calloc(size_t nmemb, size_t size); + void *malloc(size_t size); + void free(void *ptr); + void *realloc(void *ptr, size_t size); + +

DESCRIPTION +

calloc() allocates memory for an array of nmemb elements + of size bytes each and returns a pointer to the allocated + memory. The memory is set to zero. + + malloc() allocates size bytes and returns a pointer to the + allocated memory. The memory is not cleared. + + free() frees the memory space pointed to by ptr, which + must have been returned by a previous call to malloc(), + calloc() or realloc(). If ptr is NULL, no operation is + performed. + + realloc() changes the size of the memory block pointed to + by ptr to size bytes. The contents will be unchanged to + the minimum of the old an new sizes; newly allocated mem- + ory will be uninitialized. If ptr is NULL, the call is + equivalent to malloc(size); if size is equal to zero, the + call is equivalent to free(ptr). Unless ptr is NULL, it + must have been returned by an earlier call to malloc(), + calloc() or realloc(). + +

RETURN VALUES +

For calloc() and malloc(), the value returned is a pointer + to the allocated memory, which is suitably aligned for any + kind of variable, or NULL if the request fails. + + free() returns no value. + + realloc() returns a pointer to the newly allocated memory, + which is suitably aligned for any kind of variable and may + be different from ptr, or NULL if the request fails or if + size was equal to 0. If realloc() fails the original + block is left untouched - it is not freed or moved. + +

CONFORMS TO +

ANSI - C + +
+
+

SEE ALSO +

+brk, +

+
+
+
+
+
+

GNU April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/remove.htm b/reference/C/MAN/remove.htm new file mode 100644 index 0000000..9e7146b --- /dev/null +++ b/reference/C/MAN/remove.htm @@ -0,0 +1,169 @@ +remove + +
+
+
+
+
+

REMOVE(3) GNU REMOVE(3) +

+ +

NAME +

remove - delete a name and possibly the file it refers to + +

SYNOPSIS +

#include <stdio.h> + + int remove(const char *pathname); + +

DESCRIPTION +

remove deletes a name from the filesystem. If that name + was the last link to a file and no processes have the file + open the file is deleted and the space it was using is + made available for reuse. + + If the name was the last link to a file but any processes + still have the file open the file will remain in existence + until the last file descriptor referring to it is closed. + + If the name referred to a symbolic link the link is + removed. + + If the name referred to a socket, fifo or device the name + for it is removed but processes which have the object open + may continue to use it. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EFAULT pathname points outside your accessible address + space. + + EACCES Write access to the directory containing pathname + is not allowed for the process's effective uid, or + one of the directories in pathname did not allow + search (execute) permission. + + EPERM The directory containing pathname has the sticky- + bit (S_ISVTX) set and the process's effective uid + is neither the uid of the file to be deleted nor + that of the directory containing it. + + ENAMETOOLONG + pathname was too long. + + ENOENT A directory component in pathname does not exist + or is a dangling symbolic link. + + ENOTDIR A component used as a directory in pathname is + not, in fact, a directory. + + EISDIR pathname refers to a directory. + + + + +

Linux 13 July 1994 1 +

+ + + + +

REMOVE(3) GNU REMOVE(3) +

+ + ENOMEM Insufficient kernel memory was available. + + EROFS pathname refers to a file on a read-only filesys- + tem. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +

BUGS +

In-felicities in the protocol underlying NFS can cause the + unexpected disappearance of files which are still being + used. + +
+
+

SEE ALSO +

+unlink, +rename, +open, +rmdir, +mknod, +mkfifo, +link, +rm, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 13 July 1994 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/rename.htm b/reference/C/MAN/rename.htm new file mode 100644 index 0000000..e3c2e50 --- /dev/null +++ b/reference/C/MAN/rename.htm @@ -0,0 +1,231 @@ +rename + +
+
+
+
+
+

RENAME(2) Linux Programmer's Manual RENAME(2) +

+ +

NAME +

rename - change the name or location of a file + +

SYNOPSIS +

#include <unistd.h> + + int rename(const char *oldpath, const char *newpath); + +

DESCRIPTION +

rename renames a file, moving it between directories if + required. + + Any other hard links to the file (as created using link) + are unaffected. + + If newpath already exists it will be atomically overwrit- + ten (subject to a few conditions - see ERRORS below), so + that there is no point at which another process attempting + to access newpath will find it missing. + + If newpath exists but the operation fails for some reason + or the system crashes rename guarantees to leave an + instance of newpath in place. + + However, when overwriting there will probably be a window + in which both oldpath and newpath refer to the file being + renamed. + + If oldpath refers to a symbolic link the link is renamed; + if newpath refers to a symbolic link the link will be + overwritten. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EISDIR newpath is an existing directory, but oldpath is + not a directory. + + EXDEV oldpath and newpath are not on the same filesys- + tem. + + ENOTEMPTY + newpath is a non-empty directory. + + EBUSY newpath exists and is the current working direc- + tory or root directory of some process. + + EINVAL An attempt was made to make a directory a subdi- + rectory of itself. + + EMLINK oldpath already has the maximum number of links to + it, or it was a directory and the directory + + + +

Linux 0.99.7 24 July 1993 1 +

+ + + + +

RENAME(2) Linux Programmer's Manual RENAME(2) +

+ + containing newpath has the maximum number of + links. + + ENOTDIR A component used as a directory in oldpath or new- + path is not, in fact, a directory. + + EFAULT oldpath or newpath points outside your accessible + address space. + + EACCES Write access to the directory containing oldpath + or newpath is not allowed for the process's effec- + tive uid, or one of the directories in oldpath or + newpath did not allow search (execute) permission, + or oldpath was a directory and did not allow write + permission (needed to update the .. entry). + + EPERM The directory containing oldpath has the sticky + bit set and the process's effective uid is neither + the uid of the file to be deleted nor that of the + directory containing it, or the filesystem con- + taining pathname does not support renaming of the + type requested. + + ENAMETOOLONG + oldpath or newpath was too long. + + ENOENT A directory component in oldpath or newpath does + not exist or is a dangling symbolic link. + + ENOMEM Insufficient kernel memory was available. + + EROFS The file is on a read-only filesystem. + + ELOOP oldpath or newpath contains a reference to a cir- + cular symbolic link, ie a symbolic link whose + expansion contains a reference to itself. + + ENOSPC The device containing the file has no room for the + new directory entry. + +

CONFORMING TO +

POSIX, BSD 4.3, ANSI C + +

BUGS +

Currently (Linux 0.99pl7) most of the filesystems except + Minix will not allow any overwriting renames involving + directories. You get EEXIST if you try. + + On NFS filesystems, you can not assume that only because + the operation failed, the file was not renamed. If the + server does the rename operation and then crashes, the + retransmitted RPC which will be processed when the server + is up again causes a failure. The application is expected + to deal with this. See link(2) for a similar problem. + + + +

Linux 0.99.7 24 July 1993 2 +

+ + + + +

RENAME(2) Linux Programmer's Manual RENAME(2) +

+ +
+
+

SEE ALSO +

+link, +unlink, +symlink, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.7 24 July 1993 3 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/rewinddir.htm b/reference/C/MAN/rewinddir.htm new file mode 100644 index 0000000..9ca61f0 --- /dev/null +++ b/reference/C/MAN/rewinddir.htm @@ -0,0 +1,101 @@ +rewinddir + +
+
+
+
+
+

REWINDDIR(3) Linux Programmer's Manual REWINDDIR(3) +

+ +

NAME +

rewinddir - reset directory stream + +

SYNOPSIS +

#include <sys/types.h> + + #include <dirent.h> + + void rewinddir(DIR *dir); + +

DESCRIPTION +

The rewinddir() function resets the position of the direc- + tory stream dir to the beginning of the directory. + +

RETURN VALUE +

The readdir() function returns no value. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3 + +
+
+

SEE ALSO +

+opendir, +readdir, +closedir, +seekdir, +telldir, +scandir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           11 June 1995                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/rmdir.htm b/reference/C/MAN/rmdir.htm new file mode 100644 index 0000000..e8a6f4d --- /dev/null +++ b/reference/C/MAN/rmdir.htm @@ -0,0 +1,166 @@ +rmdir + +
+
+
+
+
+

RMDIR(2) Linux Programmer's Manual RMDIR(2) +

+ +

NAME +

rmdir - delete a directory + +

SYNOPSIS +

#include <unistd.h> + + int rmdir(const char *pathname); + +

DESCRIPTION +

rmdir deletes a directory, which must be empty. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EPERM The filesystem containing pathname does not sup- + port the removal of directories. + + EFAULT pathname points outside your accessible address + space. + + EACCES Write access to the directory containing pathname + was not allowed for the process's effective uid, + or one of the directories in pathname did not + allow search (execute) permission. + + EPERM The directory containing pathname has the sticky- + bit (S_ISVTX) set and the process's effective uid + is neither the uid of the file to be deleted nor + that of the directory containing it. + + ENAMETOOLONG + pathname was too long. + + ENOENT A directory component in pathname does not exist + or is a dangling symbolic link. + + ENOTDIR pathname, or a component used as a directory in + pathname, is not, in fact, a directory. + + ENOTEMPTY + pathname contains entries other than . and .. . + + EBUSY pathname is the current working directory or root + directory of some process. + + ENOMEM Insufficient kernel memory was available. + + EROFS pathname refers to a file on a read-only filesys- + tem. + + ELOOP pathname contains a reference to a circular sym- + bolic link, ie a symbolic link containing a + + + +

Linux 0.99.7 24 July 1993 1 +

+ + + + +

RMDIR(2) Linux Programmer's Manual RMDIR(2) +

+ + reference to itself. + +

CONFORMING TO +

SVID, AT&T, POSIX, BSD 4.3 + +

BUGS +

Infelicities in the protocol underlying NFS can cause the + unexpected disappearance of directories which are still + being used. + +
+
+

SEE ALSO +

+rename, +mkdir, +chdir, +unlink, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.7 24 July 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/scandir.htm b/reference/C/MAN/scandir.htm new file mode 100644 index 0000000..a9c9817 --- /dev/null +++ b/reference/C/MAN/scandir.htm @@ -0,0 +1,101 @@ +scandir + +
+
+
+
+
+

SCANDIR(3) Linux Programmer's Manual SCANDIR(3) +

+ +

NAME +

scandir, alphasort - scan a directory for matching entries + +

SYNOPSIS +

#include <dirent.h> + + int scandir(const char *dir, struct dirent ***namelist, + int (*select)(const struct dirent *), + int (*compar)(const void *, const void *)); + + int alphasort(const struct dirent *a, const struct dirent *b); + +

DESCRIPTION +

The scandir() function scans the directory dir, calling + select() on each directory entry. Entries for which + select() returns non-zero are stored in strings allocated + via malloc(), sorted using qsort() with the comparison + function compar(), and collected in array namelist which + is allocated via malloc(). + + The alphasort() function can be used as the comparison + function for the scandir() function to sort the directory + entries into alphabetical order. Its parameters are the + two directory entries, a and b, to compare. + +

RETURN VALUE +

The scandir() function returns the number of directory + entries selected or -1 if an error occurs. + + The alphasort() function returns an integer less than, + equal to, or greater than zero if the first argument is + considered to be respectively less than, equal to, or + greater than the second. + +

ERRORS +

ENOMEM Insufficient memory to complete the operation. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+opendir, +readdir, +closedir, +rewinddir, +telldir, +seekdir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 31, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/scanf.htm b/reference/C/MAN/scanf.htm new file mode 100644 index 0000000..a9f2e7a --- /dev/null +++ b/reference/C/MAN/scanf.htm @@ -0,0 +1,365 @@ +scanf + +
+
+
+
+
+

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ +

NAME +

scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input + format conversion + +

SYNOPSIS +

#include <stdio.h> + int scanf( const char *format, ...); + int fscanf( FILE *stream, const char *format, ...); + int sscanf( const char *str, const char *format, ...); + + #include <stdarg.h> + int vscanf( const char *format, va_list ap); + int vsscanf( const char *str, const char *format, va_list ap); + int vfscanf( FILE *stream, const char *format, va_list ap); + +

DESCRIPTION +

The scanf family of functions scans input according to a + format as described below. This format may contain con- + version specifiers; the results from such conversions, if + any, are stored through the pointer arguments. The scanf + function reads input from the standard input stream stdin, + fscanf reads input from the stream pointer stream, and + sscanf reads its input from the character string pointed + to by str. + + The vfscanf function is analogous to vfprintf(3) and reads + input from the stream pointer stream using a variable + argument list of pointers (see stdarg(3). The vscanf + function scans a variable argument list from the standard + input and the vsscanf function scans it from a string; + these are analogous to the vprintf and vsprintf functions + respectively. + + Each successive pointer argument must correspond properly + with each successive conversion specifier (but see `sup- + pression' below). All conversions are introduced by the % + (percent sign) character. The format string may also con- + tain other characters. White space (such as blanks, tabs, + or newlines) in the format string match any amount of + white space, including none, in the input. Everything + else matches only itself. Scanning stops when an input + character does not match such a format character. Scan- + ning also stops when an input conversion cannot be made + (see below). + +

CONVERSIONS +

Following the % character introducing a conversion there + may be a number of flag characters, as follows: + + * Suppresses assignment. The conversion that follows + occurs as usual, but no pointer is used; the result + of the conversion is simply discarded. + + h Indicates that the conversion will be one of dioux + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + or n and the next pointer is a pointer to a short + int (rather than int). + + l Indicates either that the conversion will be one of + dioux or n and the next pointer is a pointer to a + long int (rather than int), or that the conversion + will be one of efg and the next pointer is a + pointer to double (rather than float). + + L Indicates that the conversion will be efg and the + next pointer is a pointer to long double. (This + type is not implemented; the L flag is currently + ignored--this may not be true for Linux.) + + In addition to these flags, there may be an optional maxi- + mum field width, expressed as a decimal integer, between + the % and the conversion. If no width is given, a default + of `infinity' is used (with one exception, below); other- + wise at most this many characters are scanned in process- + ing the conversion. Before conversion begins, most con- + versions skip white space; this white space is not counted + against the field width. + + The following conversions are available: + + % Matches a literal `%'. That is, `%%' in the format + string matches a single input `%' character. No + conversion is done, and assignment does not occur. + + d Matches an optionally signed decimal integer; the + next pointer must be a pointer to int. + + D Equivalent to ld; this exists only for backwards + compatibility. + + i Matches an optionally signed integer; the next + pointer must be a pointer to int. The integer is + read in base 16 if it begins with `0x' or `0X', in + base 8 if it begins with `0', and in base 10 other- + wise. Only characters that correspond to the base + are used. + + o Matches an octal integer; the next pointer must be + a pointer to unsigned int. + + O Equivalent to lo; this exists for backwards compat- + ibility. + + u Matches an optionally signed decimal integer; the + next pointer must be a pointer to unsigned int. + + x Matches an optionally a signed hexadecimal integer; + the next pointer must be a pointer to unsigned int. + + + + +

BSD MANPAGE 29 November 1993 2 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + X Equivalent to lx; this violates the ANSI + C3.159-1989 (``ANSI C'') but is backwards compati- + ble with previous UNIX systems--I don't know what + Linux does with this. + + f Matches an optionally signed floating-point number; + the next pointer must be a pointer to float. + + e Equivalent to f. + + g Equivalent to f. + + E Equivalent to lf; this violates the ANSI + C3.159-1989 (``ANSI C'') but is backwards compati- + ble with previous UNIX systems--I don't know what + Linux does with this. + + F Equivalent to lf; this exists only for backwards + compatibility. + + s Matches a sequence of non-white-space characters; + the next pointer must be a pointer to char, and the + array must be large enough to accept all the + sequence and the terminating NUL character. The + input string stops at white space or at the maximum + field width, whichever occurs first. + + c Matches a sequence of width count characters + (default 1); the next pointer must be a pointer to + char, and there must be enough room for all the + characters (no terminating NUL is added). The + usual skip of leading white space is suppressed. + To skip white space first, use an explicit space in + the format. + + [ Matches a nonempty sequence of characters from the + specified set of accepted characters; the next + pointer must be a pointer to char, and there must + be enough room for all the characters in the + string, plus a terminating NUL character. The + usual skip of leading white space is suppressed. + The string is to be made up of characters in (or + not in) a particular set; the set is defined by the + characters between the open bracket [ character and + a close bracket ] character. The set excludes + those characters if the first character after the + open bracket is a circumflex ^. To include a close + bracket in the set, make it the first character + after the open bracket or the circumflex; any other + position will end the set. The hyphen character - + is also special; when placed between two other + characters, it adds all intervening characters to + the set. To include a hyphen, make it the last + character before the final close bracket. For + + + +

BSD MANPAGE 29 November 1993 3 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + instance, `[^]0-9-]' means the set `everything + except close bracket, zero through nine, and + hyphen'. The string ends with the appearance of a + character not in the (or, with a circumflex, in) + set or when the field width runs out. + + p Matches a pointer value (as printed by `%p' in + printf(3); the next pointer must be a pointer to + void. + + n Nothing is expected; instead, the number of charac- + ters consumed thus far from the input is stored + through the next pointer, which must be a pointer + to int. This is not a conversion, although it can + be suppressed with the * flag. + + For backwards compatibility, other conversion characters + (except `\0') are taken as if they were `%d' or, if upper- + case, `%ld', and a `conversion' of `%\0' causes an immedi- + ate return of EOF. The F and X conversions will be + changed in the future to conform to the + ANSI C standard, after which they will act like and + respectively. The behavior of Linux on the non-standard + points is not known by this documenter. + + +

RETURN VALUES +

These functions return the number of input items assigned, + which can be fewer than provided for, or even zero, in the + event of a matching failure. Zero indicates that, while + there was input available, no conversions were assigned; + typically this is due to an invalid input character, such + as an alphabetic character for a `%d' conversion. The + value EOF is returned if an input failure occurs before + any conversion such as an end-of-file occurs. If an error + or end-of-file occurs after conversion has begun, the num- + ber of conversions which were successfully completed is + returned. + +
+
+

SEE ALSO +

+strtol, +strtoul, +strtod, +getc, +printf, +

+
+

STANDARDS +

The functions fscanf, scanf, and sscanf conform to ANSI + C3.159-1989 (``ANSI C''). + +

BUGS +

Differences for Linux are not known at this time. The + following is for the BSD version: + + The current situation with %F and %X conversions is unfor- + tunate. + + All of the backwards compatibility formats will be removed + + + +

BSD MANPAGE 29 November 1993 4 +

+ + + + +

SCANF(3) Linux Programmer's Manual SCANF(3) +

+ + in the future. + + Numerical strings are truncated to 512 characters; for + example, %f and %d are implicitly %512f and %512d. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 5 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/seekdir.htm b/reference/C/MAN/seekdir.htm new file mode 100644 index 0000000..ae8e4bf --- /dev/null +++ b/reference/C/MAN/seekdir.htm @@ -0,0 +1,102 @@ +seekdir + +
+
+
+
+
+

SEEKDIR(3) Linux Programmer's Manual SEEKDIR(3) +

+ +

NAME +

seekdir - set the position of the next readdir() call in + the directory stream. + +

SYNOPSIS +

#include <dirent.h> + + void seekdir(DIR *dir, off_t offset); + +

DESCRIPTION +

The seekdir() function sets the location in the directory + stream from which the next readdir() call will start. + seekdir() should be used with an offset returned by + telldir(). + +

RETURN VALUE +

The seekdir() function returns no value. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+lseek, +opendir, +readdir, +closedir, +dir, +telldir, +scandir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          March 31, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setbuf.htm b/reference/C/MAN/setbuf.htm new file mode 100644 index 0000000..fc4ddeb --- /dev/null +++ b/reference/C/MAN/setbuf.htm @@ -0,0 +1,167 @@ +setbuf + +
+
+
+
+
+

SETBUF(3) Linux Programmer's Manual SETBUF(3) +

+ +

NAME +

setbuf, setbuffer, setlinebuf, setvbuf - stream buffering + operations + +

SYNOPSIS +

#include <stdio.h> + + int setbuf( FILE *stream, char *buf); + int setbuffer( FILE *stream, char *buf, size_tsize); + int setlinebuf( FILE *stream); + int setvbuf( FILE *stream, char *buf, int mode , size_t + size); + +

DESCRIPTION +

The three types of buffering available are unbuffered, + block buffered, and line buffered. When an output stream + is unbuffered, information appears on the destination file + or terminal as soon as written; when it is block buffered + many characters are saved up and written as a block; when + it is line buffered characters are saved up until a new- + line is output or input is read from any stream attached + to a terminal device (typically stdin). The function + fflush(3) may be used to force the block out early. (See + fclose(3).) Normally all files are block buffered. When + the first I/O operation occurs on a file, malloc(3) is + called, and a buffer is obtained. If a stream refers to a + terminal (as stdout normally does) it is line buffered. + The standard error stream stderr is always unbuffered. + + The setvbuf function may be used at any time on any open + stream to change its buffer. The mode parameter must be + one of the following three macros: + + _IONBF unbuffered + + _IOLBF line buffered + + _IOFBF fully buffered + + Except for unbuffered files, the buf argument should point + to a buffer at least size bytes long; this buffer will be + used instead of the current buffer. If the argument buf + is NULL, only the mode is affected; a new buffer will be + allocated on the next read or write operation. The + setvbuf function may be used at any time, but can only + change the mode of a stream when it is not ``active'': + that is, before any I/O, or immediately after a call to + fflush. + + The other three calls are, in effect, simply aliases for + calls to setvbuf. The setbuf function is exactly equiva- + lent to the call + + setvbuf(stream, buf, buf _IOFBF : _IONBF, + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

SETBUF(3) Linux Programmer's Manual SETBUF(3) +

+ + BUFSIZ); + + The setbuffer function is the same, except that the size + of the buffer is up to the caller, rather than being + determined by the default BUFSIZ. The setlinebuf function + is exactly equivalent to the call: + + setvbuf(stream, (char *)NULL, _IOLBF, 0); + +
+
+

SEE ALSO +

+fopen, +fclose, +fread, +malloc, +puts, +printf, +

+
+

STANDARDS +

The setbuf and setvbuf functions conform to ANSI + C3.159-1989 (``ANSI C''). + +

BUGS +

The setbuffer and setlinebuf functions are not portable to + versions of BSD before 4.2BSD, and may not be available + under Linux. On 4.2BSD and 4.3BSD systems, setbuf always + uses a suboptimal buffer size and should be avoided. + + You must make sure that both buf and the space it points + to still exist by the time stream is closed, which also + happens at program termination. + + For example, the following is illegal: + + #include <stdio.h> + int main() + { + char buf[BUFSIZ]; + setbuf(stdin, buf); + printf("Hello, world!\n"); + return 0; + } + + + + + + + + + + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setegid.htm b/reference/C/MAN/setegid.htm new file mode 100644 index 0000000..d1dd511 --- /dev/null +++ b/reference/C/MAN/setegid.htm @@ -0,0 +1,98 @@ +setegid + +
+
+
+
+
+

SETREGID(2) Linux Programmer's Manual SETREGID(2) +

+ +

NAME +

setregid, setegid - set real and / or effective group ID + +

SYNOPSIS +

#include <unistd.h> + + int setregid(gid_t rgid, gid_t egid); + int setegid(gid_t egid); + +

DESCRIPTION +

setregid sets real and effective group ID's of the current + process. Un-privileged users may change the real group ID + to the effective group ID and vice-versa. + + Prior to Linux 1.1.38, the saved ID paradigm, when used + with setregid or setegid was broken. Starting at 1.1.38, + it is also possible to set the effective group ID from the + saved user ID. + + Only the super-user may make other changes. + + Supplying a value of -1 for either the real or effective + group ID forces the system to leave that ID unchanged. + + Currently (libc-4.x.x), setegid(egid) is functionally + equivalent to setregid(-1, egid). + + If the real group ID is changed or the effective group ID + is set to a value not equal to the previous real group ID, + the saved group ID will be set to the new effective group + ID. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EPERM The current process is not the super-user and + changes other than (i) swapping the effective + group ID with the real group ID or (ii) setting + one to the value of the other or (iii) setting the + effective group ID to the value of the saved group + ID was specified. + +

HISTORY +

The setregid function call appeared in BSD 4.2. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+getgid, +setgid, +

+
+
+
+
+
+

Linux 1.1.38 2nd August 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setenv.htm b/reference/C/MAN/setenv.htm new file mode 100644 index 0000000..c9d00d9 --- /dev/null +++ b/reference/C/MAN/setenv.htm @@ -0,0 +1,98 @@ +setenv + +
+
+
+
+
+

SETENV(3) Linux Programmer's Manual SETENV(3) +

+ +

NAME +

setenv - change or add an environment variable + +

SYNOPSIS +

#include <stdlib.h> + + int setenv(const char *name, const char *value, int overwrite); + + void unsetenv(const char *name); + +

DESCRIPTION +

The setenv() function adds the variable name to the envi- + ronment with the value value, if name does not already + exist. If name does exist in the environment, then its + value is changed to value if overwrite is non-zero; if + overwrite is zero, then the value of name is not changed. + + The unsetenv() function deletes the variable name from the + environment. + +

RETURN VALUE +

The setenv() function returns zero on success, or -1 if + there was insufficient space in the environment. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+getenv, +putenv, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

BSD April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/seteuid.htm b/reference/C/MAN/seteuid.htm new file mode 100644 index 0000000..de43dee --- /dev/null +++ b/reference/C/MAN/seteuid.htm @@ -0,0 +1,98 @@ +setreuid + +
+
+
+
+
+

SETREUID(2) Linux Programmer's Manual SETREUID(2) +

+ +

NAME +

setreuid, seteuid - set real and / or effective user ID + +

SYNOPSIS +

#include <unistd.h> + + int setreuid(uid_t ruid, uid_t euid); + int seteuid(uid_t euid); + +

DESCRIPTION +

setreuid sets real and effective user ID's of the current + process. Un-privileged users may change the real user ID + to the effective user ID and vice-versa. + + Prior to Linux 1.1.37, the saved ID paradigm, when used + with setreuid or seteuid was broken. + + Starting at 1.1.37, it is also possible to set the effec- + tive user ID from the saved user ID. + + Only the super-user may make other changes. + + Supplying a value of -1 for either the real or effective + user ID forces the system to leave that ID unchanged. + + Currently (libc-4.x.x), seteuid(euid) is functionally + equivalent to setreuid(-1, euid). + + If the real user ID is changed or the effective user ID is + set to a value not equal to the previous real user ID, the + saved user ID will be set to the new effective user ID. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EPERM The current process is not the super-user and + changes other than (i) swapping the effective user + ID with the real user ID or (ii) setting one to + the value of the other or (iii) setting the effec- + tive user ID to the value of the saved user ID was + specified. + +

HISTORY +

The setreuid function call appeared in BSD 4.2. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+getuid, +setuid, +

+
+
+
+
+
+

Linux 1.1.38 2nd August 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setgid.htm b/reference/C/MAN/setgid.htm new file mode 100644 index 0000000..c41be33 --- /dev/null +++ b/reference/C/MAN/setgid.htm @@ -0,0 +1,99 @@ +setgid + +
+
+
+
+
+

SETGID(2) Linux Programmer's Manual SETGID(2) +

+ +

NAME +

setgid - set group identity + +

SYNOPSIS +

#include <unistd.h> + + int setgid(gid_t gid) + +

DESCRIPTION +

setgid sets the effective group ID of the current process. + If the caller is the superuser, the real and saved group + ID's are also set. + + Under Linux, setgid is implemented like SYSV with + SAVED_IDS. This allows a setgid (other than root) program + to drop all of it's group privileges, do some un-privi- + leged work, and then re-engage the original effective + group ID in a secure manner. + + If the user is root or the program is setgid root, special + care must be taken. The setgid function checks the effec- + tive gid of the caller and if it is the superuser, all + process related group ID's are set to gid. After this has + occurred, it is impossible for the program to regain root + privileges. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EPERM The user is not the super-user, and gid does not + match the effective or saved group ID of the call- + ing process. + +

CONFORMING TO +

System V + +
+
+

SEE ALSO +

+getgid, +setregid, +setegid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.1.36 29 July 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setjmp.htm b/reference/C/MAN/setjmp.htm new file mode 100644 index 0000000..8c52e96 --- /dev/null +++ b/reference/C/MAN/setjmp.htm @@ -0,0 +1,99 @@ +setjmp + +
+
+
+
+
+

SETJMP(3) Library functions SETJMP(3) +

+ +

NAME +

setjmp - save stack context for non-local goto + +

SYNOPSIS +

#include <setjmp.h> + + int setjmp(jmp_buf env ); + +

DESCRIPTION +

setjmp and longjmp(3) are useful for dealing with errors + and interrupts encountered in a low-level subroutine of a + program. setjmp() saves the stack context/environment in + env for later use by longjmp(). The stack context will be + invalidated if the function which called setjmp() returns. + +

RETURN VALUE +

It returns the value 0 if returning directly and non-zero + when returning from longjmp() using the saved context. + +

CONFORMING TO +

POSIX + +

NOTES +

POSIX does not specify if the signal context will be saved + or not. If you want to save signal masks, use + sigsetjmp(3). setjmp() makes programs hard to understand + and maintain. If possible an alternative should be used. + +
+
+

SEE ALSO +

+, +sigsetjmp, +siglongjmp, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                        November 25, 1994                       1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setlocale.htm b/reference/C/MAN/setlocale.htm new file mode 100644 index 0000000..d1a6c4c --- /dev/null +++ b/reference/C/MAN/setlocale.htm @@ -0,0 +1,168 @@ +setlocale + +
+
+
+
+
+

SETLOCALE(3) Linux Programmer's Manual SETLOCALE(3) +

+ +

NAME +

setlocale - set the current locale. + +

SYNOPSIS +

#include <locale.h> + + char *setlocale(int category, const char * locale); + +

DESCRIPTION +

The setlocale() function is used to set or query the pro- + gram's current locale. If locale is "C" or "POSIX", the + current locale is set to the portable locale. + + If locale is "", the locale is set to the default locale + which is selected from the environment variable LANG. + + On startup of the main program, the portable "C" locale is + selected as default. + + The argument category determines which functions are + influenced by the new locale: + + LC_ALL for all of the locale. + + LC_COLLATE + for the functions strcoll() and strxfrm(). + + LC_CTYPE + for the character classification and conversion + routines. + + LC_MONETARY + for localeconv(). + + LC_NUMERIC + for the decimal character. + + LC_TIME + for strftime(). NULL if the request cannot not be + honored. This string may be allocated in static + storage. + + A program may be made portable to all locales by calling + setlocale(LC_ALL, "" ) after program initialization, by + using the values returned from a localeconv() call for + locale - dependent information and by using strcoll() or + strxfrm() to compare strings. + +

CONFORMS TO +

ANSI C, POSIX.1 + + Linux supports the portable locales "C" and "POSIX" and + also the European Latin-1 "ISO-8859-1" , and Russian + "KOI-8" locales. + + + +

GNU April 18, 1993 1 +

+ + + + +

SETLOCALE(3) Linux Programmer's Manual SETLOCALE(3) +

+ + The printf() family of functions may or may not honor the + current locale. + +
+
+

SEE ALSO +

+locale, +localedef, +strcoll, +isalpha, +conv, +strftime, +locale, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 18, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setpgid.htm b/reference/C/MAN/setpgid.htm new file mode 100644 index 0000000..be5deba --- /dev/null +++ b/reference/C/MAN/setpgid.htm @@ -0,0 +1,166 @@ +setpgid + +
+
+
+
+
+

SETPGID(2) Linux Programmer's Manual SETPGID(2) +

+ +

NAME +

setpgid, getpgid, setpgrp, getpgrp - set/get process group + +

SYNOPSIS +

#include <unistd.h> + + int setpgid(pid_t pid, pid_t pgid); + pid_t getpgid(pid_t pid); + int setpgrp(void); + pid_t getpgrp(void); + +

DESCRIPTION +

setpgid sets the process group ID of the process specified + by pid to pgid. If pid is zero, the process ID of the + current process is used. If pgid is zero, the process ID + of the process specified by pid is used. + + getpgid returns the process group ID of the process speci- + fied by pid. If pid is zero, the process ID of the cur- + rent process is used. + + In the Linux DLL 4.4.1 library, setpgrp simply calls + setpgid(0,0). + + getpgrp is equivalent to getpgid(0). + + Process groups are used for distribution of signals, and + by terminals to arbitrate requests for their input: pro- + cesses that have the same process group as the terminal + are foreground and may read, while others will block with + a signal if they attempt to read. + + These calls are thus used by programs such as csh(1) to + create process groups in implementing job control. The + TIOCGPGRP and TIOCSPGRP calls described in termios(4) are + used to get/set the process group of the control terminal. + +

RETURN VALUE +

On success, setpgid and setpgrp return zero. On error, -1 + is returned, and errno is set appropriately. + + getpgid returns a process group on success. On error, -1 + is returned, and errno is set appropriately. + + getpgrp always returns the current process group. + +

ERRORS +

EINVAL pgid is less than 0. + + EPERM Various permission violations. + + ESRCH pid does not match any process. + + + + + +

Linux 1.2.4 15 April 1995 1 +

+ + + + +

SETPGID(2) Linux Programmer's Manual SETPGID(2) +

+ +
+
+

SEE ALSO +

+getuid, +setsid, +tcsetpgrp, +termios, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.2.4 15 April 1995 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setsid.htm b/reference/C/MAN/setsid.htm new file mode 100644 index 0000000..67bc733 --- /dev/null +++ b/reference/C/MAN/setsid.htm @@ -0,0 +1,97 @@ +setsid + +
+
+
+
+
+

SETSID(2) System calls SETSID(2) +

+ +

NAME +

setsid - creates a session and sets the process group ID + +

SYNOPSIS +

#include <unistd.h> + + pid_t setsid(void); + +

DESCRIPTION +

setsid() creates a new session if the calling process is + not a process group leader. The calling process is the + leader of the new session, the process group leader if the + new process group, and has no controlling tty. The pro- + cess group ID of the calling process is set to the PID of + the calling process. The calling process will be the only + process in this new process group and in this new session. + +

RETURN VALUE +

The process group ID of the calling process. + +

ERRORS +

On error, -1 will be returned. The only error which can + happen is EPERM. + +

CONFORMING TO +

POSIX + +
+
+

SEE ALSO +

+setpgid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           Aug 27, 1994                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/setuid.htm b/reference/C/MAN/setuid.htm new file mode 100644 index 0000000..f6551d3 --- /dev/null +++ b/reference/C/MAN/setuid.htm @@ -0,0 +1,99 @@ +setuid + +
+
+
+
+
+

SETUID(2) Linux Programmer's Manual SETUID(2) +

+ +

NAME +

setuid - set user identity + +

SYNOPSIS +

#include <unistd.h> + + int setuid(uid_t uid) + +

DESCRIPTION +

setuid sets the effective user ID of the current process. + If the caller is the superuser, the real and saved user + ID's are also set. + + Under Linux, setuid is implemented like SYSV with + SAVED_IDS. This allows a setuid (other than root) program + to drop all of it's user privileges, do some un-privileged + work, and then re-engage the original effective user ID in + a secure manner. + + If the user is root or the program is setuid root, special + care must be taken. The setuid function checks the effec- + tive uid of the caller and if it is the superuser, all + process related user ID's are set to uid. After this has + occurred, it is impossible for the program to regain root + privileges. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EPERM The user is not the super-user, and uid does not + match the effective or saved user ID of the call- + ing process. + +

CONFORMING TO +

System V + +
+
+

SEE ALSO +

+getuid, +setreuid, +seteuid, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.1.36 29 July 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/signal.htm b/reference/C/MAN/signal.htm new file mode 100644 index 0000000..112bedd --- /dev/null +++ b/reference/C/MAN/signal.htm @@ -0,0 +1,104 @@ +signal + +
+
+
+
+
+

SIGACTION(2) Linux Programmer's Manual SIGACTION(2) +

+ +

NAME +

signal - ANSI C signal handling. + + +

SYNOPSIS +

#include <signal.h> + + + void (*signal(int signum, void (*handler)(int)))(int); + + +

DESCRIPTION +

The signal system call installs a new signal handler for + signal signum. The signal handler is set to handler which + may be a user specified function, or one of the following: + + SIG_IGN + Ignore the signal. + + SIG_DFL + Reset the signal to its default behavior. + + + +

RETURN VALUE +

signal returns the previous value of the signal handler, + or SIG_ERR on error. + + +

NOTES +

Signal handlers cannot be set for SIGKILL or SIGSTOP. + + Unlike BSD systems, signals under Linux are reset to their + default behavior when raised. + + If you're confused by the prototype at the top of this + manpage, it may help to see it separated out thus: + + typedef void (*sighandler_t)(int); + sighandler_t signal(int signum, sighandler_t handler); + + +

CONFORMING TO +

ANSI C + + +
+
+

SEE ALSO +

+kill, +kill, +killpg, +pause, +raise, +tion, +signal, +sigsetops, +sigvec, +

+
+
+
+
+
+
+
+
+

Linux 1.0 24 September 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sin.htm b/reference/C/MAN/sin.htm new file mode 100644 index 0000000..db59b37 --- /dev/null +++ b/reference/C/MAN/sin.htm @@ -0,0 +1,102 @@ +sin + +
+
+
+
+
+

SIN(3) Linux Programmer's Manual SIN(3) +

+ +

NAME +

sin - sine function + +

SYNOPSIS +

#include <math.h> + + double sin(double x); + +

DESCRIPTION +

The sin() function returns the sine of x, where x is given + in radians. + +

RETURN VALUE +

The sin() function returns a value between -1 and 1. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +asin, +atan, +atan2, +cos, +tan, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sinh.htm b/reference/C/MAN/sinh.htm new file mode 100644 index 0000000..22c0660 --- /dev/null +++ b/reference/C/MAN/sinh.htm @@ -0,0 +1,101 @@ +sinh + +
+
+
+
+
+

SINH(3) Linux Programmer's Manual SINH(3) +

+ +

NAME +

sinh - hyperbolic sine function + +

SYNOPSIS +

#include <math.h> + + double sinh(double x); + +

DESCRIPTION +

The sinh() function returns the hyperbolic sine of x, + which is defined mathematically as exp(x) - exp(-x) / 2. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acosh, +asinh, +atanh, +cosh, +tanh, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          June 13, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sleep.htm b/reference/C/MAN/sleep.htm new file mode 100644 index 0000000..aab155f --- /dev/null +++ b/reference/C/MAN/sleep.htm @@ -0,0 +1,98 @@ +sleep + +
+
+
+
+
+

SLEEP(3) Linux Programmer's Manual SLEEP(3) +

+ +

NAME +

sleep - Sleep for the specified number of seconds + +

SYNOPSIS +

#include <unistd.h> + + unsigned int sleep(unsigned int seconds); + +

DESCRIPTION +

sleep() makes the current process sleep until seconds sec- + onds have elapsed or a signal arrives which is not + ignored. + +

RETURN VALUE +

Zero if the requested time has elapsed, or the number of + seconds left to sleep. + +

CONFORMS TO +

POSIX.1 + +

BUGS +

sleep() may be implemented using SIGALRM; mixing calls to + alarm() and sleep() is a bad idea. + + Using longjmp() from a signal handler or modifying the + handling of SIGALRM while sleeping will cause undefined + results. + +
+
+

SEE ALSO +

+signal, +alarm, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 7, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sprintf.htm b/reference/C/MAN/sprintf.htm new file mode 100644 index 0000000..c029466 --- /dev/null +++ b/reference/C/MAN/sprintf.htm @@ -0,0 +1,362 @@ +sprintf + +
+
+
+
+
+

SPRINTF(3) Linux Programmer's Manual SPRINTF(3) +

+ +

NAME +

printf, fprintf, sprintf, vprintf, vfprintf, vsprintf - + formatted output conversion + +

SYNOPSIS +

#include <stdio.h> + + int printf( const char *format, ...); + int fprintf( FILE *stream, const char *format, ...); + int sprintf( char *str, const char *format, ...); + + #include <stdarg.h> + + int vprintf( const char *format, va_list ap); + int vfprintf( FILE *stream, const char *format, va_list + ap); + int vsprintf( char *str, char *format, va_list ap); + +

DESCRIPTION +

The printf family of functions produces output according + to a format as described below. Printf and vprintf write + output to stdout, the standard output stream; fprintf and + vfprintf write output to the given output stream; sprintf, + and vsprintf write to the character string str. These + functions write the output under the control of a format + string that specifies how subsequent arguments (or argu- + ments accessed via the variable-length argument facilities + of stdarg(3) are converted for output. These functions + return the number of characters printed (not including the + trailing `\0' used to end output to strings). + + The format string is composed of zero or more directives: + ordinary characters (not %), which are copied unchanged to + the output stream; and conversion specifications, each of + which results in fetching zero or more subsequent argu- + ments. Each conversion specification is introduced by the + character %. The arguments must correspond properly + (after type promotion) with the conversion specifier. + After the %, the following appear in sequence: + + o Zero or more of the following flags: + + # specifying that the value should be con- + verted to an ``alternate form''. For c, d, + i, n, p, s, and u conversions, this option + has no effect. For o conversions, the pre- + cision of the number is increased to force + the first character of the output string to + a zero (except if a zero value is printed + with an explicit precision of zero). For x + and X conversions, a non-zero result has the + string `0x' (or `0X' for X conversions) + prepended to it. For e, E, f, g, and G con- + versions, the result will always contain a + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

SPRINTF(3) Linux Programmer's Manual SPRINTF(3) +

+ + decimal point, even if no digits follow it + (normally, a decimal point appears in the + results of those conversions only if a digit + follows). For g and G conversions, trailing + zeros are not removed from the result as + they would otherwise be. + + 0 specifying zero padding. For all conver- + sions except n, the converted value is + padded on the left with zeros rather than + blanks. If a precision is given with a + numeric conversion (d, i, o, u, i, x, and + X), the 0 flag is ignored. + + - (a negative field width flag) indicates the + converted value is to be left adjusted on + the field boundary. Except for n conver- + sions, the converted value is padded on the + right with blanks, rather than on the left + with blanks or zeros. A - overrides a 0 if + both are given. + + (a space) specifying that a blank should be + left before a positive number produced by a + signed conversion (d, e, E, f, g, G, or i). + + + specifying that a sign always be placed + before a number produced by a signed conver- + sion. A + overrides a space if both are + used. + + o An optional decimal digit string specifying a mini- + mum field width. If the converted value has fewer + characters than the field width, it will be padded + with spaces on the left (or right, if the left- + adjustment flag has been given) to fill out the + field width. + + o An optional precision, in the form of a period + (`.') followed by an optional digit string. If + the digit string is omitted, the precision is taken + as zero. This gives the minimum number of digits + to appear for d, i, o, u, x, and X conversions, the + number of digits to appear after the decimal-point + for e, E, and f conversions, the maximum number of + significant digits for g and G conversions, or the + maximum number of characters to be printed from a + string for s conversions. + + o The optional character h, specifying that a follow- + ing d, i, o, u, x, or X conversion corresponds to a + short int or unsigned short int argument, or that a + following n conversion corresponds to a pointer to + a short int argument. + + + +

BSD MANPAGE 29 November 1993 2 +

+ + + + +

SPRINTF(3) Linux Programmer's Manual SPRINTF(3) +

+ + o The optional character l (ell) specifying that a + following d, i, o, u, x, or X conversion applies to + a pointer to a long int or unsigned long int argu- + ment, or that a following n conversion corresponds + to a pointer to a long int argument. + + o The character L specifying that a following e, E, + f, g, or G conversion corresponds to a long double + argument. + + o A character that specifies the type of conversion + to be applied. + + A field width or precision, or both, may be indicated by + an asterisk `*' instead of a digit string. In this case, + an int argument supplies the field width or precision. A + negative field width is treated as a left adjustment flag + followed by a positive field width; a negative precision + is treated as though it were missing. + + The conversion specifiers and their meanings are: + + diouxX The int (or appropriate variant) argument is con- + verted to signed decimal (d and i), unsigned octal + (o, unsigned decimal (u, or unsigned hexadecimal (x + and X) notation. The letters abcdef are used for x + conversions; the letters ABCDEF are used for X con- + versions. The precision, if any, gives the minimum + number of digits that must appear; if the converted + value requires fewer digits, it is padded on the + left with zeros. + + DOU The long int argument is converted to signed deci- + mal, unsigned octal, or unsigned decimal, as if the + format had been ld, lo, or lu respectively. These + conversion characters are deprecated, and will + eventually disappear. + + eE The double argument is rounded and converted in the + style [-]d.dddedd where there is one digit before + the decimal-point character and the number of dig- + its after it is equal to the precision; if the pre- + cision is missing, it is taken as 6; if the preci- + sion is zero, no decimal-point character appears. + An E conversion uses the letter E (rather than e) + to introduce the exponent. The exponent always + contains at least two digits; if the value is zero, + the exponent is 00. + + f The double argument is rounded and converted to + decimal notation in the style [-]ddd.ddd, where the + number of digits after the decimal-point character + is equal to the precision specification. If the + precision is missing, it is taken as 6; if the + + + +

BSD MANPAGE 29 November 1993 3 +

+ + + + +

SPRINTF(3) Linux Programmer's Manual SPRINTF(3) +

+ + precision is explicitly zero, no decimal-point + character appears. If a decimal point appears, at + least one digit appears before it. + + g The double argument is converted in style f or e + (or E for G conversions). The precision specifies + the number of significant digits. If the precision + is missing, 6 digits are given; if the precision is + zero, it is treated as 1. Style e is used if the + exponent from its conversion is less than -4 or + greater than or equal to the precision. Trailing + zeros are removed from the fractional part of the + result; a decimal point appears only if it is fol- + lowed by at least one digit. + + c The int argument is converted to an unsigned char, + and the resulting character is written. + + s The ``char *'' argument is expected to be a pointer + to an array of character type (pointer to a + string). Characters from the array are written up + to (but not including) a terminating NUL character; + if a precision is specified, no more than the num- + ber specified are written. If a precision is + given, no null character need be present; if the + precision is not specified, or is greater than the + size of the array, the array must contain a termi- + nating NUL character. + + p The ``void *'' pointer argument is printed in hex- + adecimal (as if by %#x or %#lx). + + n The number of characters written so far is stored + into the integer indicated by the ``int *'' (or + variant) pointer argument. No argument is con- + verted. + + % A `%' is written. No argument is converted. The + complete conversion specification is `%%'. + + In no case does a non-existent or small field width cause + truncation of a field; if the result of a conversion is + wider than the field width, the field is expanded to con- + tain the conversion result. + + +

EXAMPLES +

To print a date and time in the form `Sunday, July 3, + 10:02', where weekday and month are pointers to strings: + #include <stdio.h> + fprintf(stdout, "%s, %s %d, %.2d:%.2d\n", + weekday, month, day, hour, min); + + To print to five decimal places: + + + +

BSD MANPAGE 29 November 1993 4 +

+ + + + +

SPRINTF(3) Linux Programmer's Manual SPRINTF(3) +

+ + #include <math.h> + #include <stdio.h> + fprintf(stdout, "pi = %.5f\n", 4 * atan(1.0)); + + To allocate a 128 byte string and print into it: + #include <stdio.h> + #include <stdlib.h> + #include <stdarg.h> + char *newfmt(const char *fmt, ...) + { + char *p; + va_list ap; + if ((p = malloc(128)) == NULL) + return (NULL); + va_start(ap, fmt); + (void) vsnprintf(p, 128, fmt, ap); + va_end(ap); + return (p); + } + +
+
+

SEE ALSO +

+printf, +scanf, +

+
+

STANDARDS +

The fprintf, printf, sprintf, vprintf, vfprintf, and + vsprintf functions conform to ANSI C3.159-1989 (``ANSI + C''). + +

BUGS +

Some floating point conversions under Linux cause memory + leaks. + + The conversion formats %D, %O, and %U are not standard and + are provided only for backward compatibility. These may + not be provided under Linux. + + The effect of padding the %p format with zeros (either by + the 0 flag or by specifying a precision), and the benign + effect (i.e., none) of the # flag on %n and %p conver- + sions, as well as other nonsensical combinations such as + %Ld, are not standard; such combinations should be + avoided. + + Because sprintf and vsprintf assume an infinitely long + string, callers must be careful not to overflow the actual + space; this is often impossible to assure. + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 5 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sqrt.htm b/reference/C/MAN/sqrt.htm new file mode 100644 index 0000000..68ac1cf --- /dev/null +++ b/reference/C/MAN/sqrt.htm @@ -0,0 +1,97 @@ +sqrt + +
+
+
+
+
+

SQRT(3) Linux Programmer's Manual SQRT(3) +

+ +

NAME +

sqrt - square root function + +

SYNOPSIS +

#include <math.h> + + double sqrt(double x); + +

DESCRIPTION +

The sqrt() function returns the non-negative square root + of x. It fails and sets errno to EDOM, if x is negative. + +

ERRORS +

EDOM x is negative. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+hypot, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          June 21, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/stat.htm b/reference/C/MAN/stat.htm new file mode 100644 index 0000000..37ba91b --- /dev/null +++ b/reference/C/MAN/stat.htm @@ -0,0 +1,232 @@ +stat + +
+
+
+
+
+

STAT(2) Linux Programmer's Manual STAT(2) +

+ +

NAME +

stat, fstat, lstat - get file status + +

SYNOPSIS +

#include <sys/stat.h> + #include <unistd.h> + + int stat(const char *file_name, struct stat *buf); + int fstat(int filedes, struct stat *buf); + int lstat(const char *file_name, struct stat *buf); + +

DESCRIPTION +

These functions return information about the specified + file. You do not need any access rights to the file to + get this information but you need search rights to all + directories named in the path leading to the file. + + stat stats the file pointed to by file_name and fills in + buf. + + lstat is identical to stat, only the link itself is + stated, not the file that is obtained by tracing the + links. + + fstat is identical to stat, only the open file pointed to + by filedes (as returned by fopen(3) ) is stated in place + of file_name. + + + They all return a stat structure, which is declared as + follows: + + struct stat + { + dev_t st_dev; /* device */ + ino_t st_ino; /* inode */ + umode_t st_mode; /* protection */ + nlink_t st_nlink; /* number of hard links */ + uid_t st_uid; /* user ID of owner */ + gid_t st_gid; /* group ID of owner */ + dev_t st_rdev; /* device type (if inode device) */ + off_t st_size; /* total size, in bytes */ + unsigned long st_blksize; /* blocksize for filesystem I/O */ + unsigned long st_blocks; /* number of blocks allocated */ + time_t st_atime; /* time of last access */ + time_t st_mtime; /* time of last modification */ + time_t st_ctime; /* time of last change */ + }; + + Note that st_blocks may not always be in terms of blocks + of size st_blksize, and that st_blksize may instead pro- + vide a notion of the "preferred" blocksize for efficient + file system I/O. + + + + +

Linux 1.1.75 1 January 1995 1 +

+ + + + +

STAT(2) Linux Programmer's Manual STAT(2) +

+ + Not all of the Linux filesystems implement all of the time + fields. Traditionally, st_atime is changed by mknod(2), + utime(2), read(2), write(2), and truncate(2). + + Traditionally, st_mtime is changed by mknod(2), utime(2), + and write(2). The st_mtime is not changed for changes in + owner, group, hard link count, or mode. + + Traditionally, st_ctime is changed by writing or by set- + ting inode information (i.e., owner, group, link count, + mode, etc.). + + The following macros are defined to check the file type: + + S_ISLNK(m) is it a symbolic link + + S_ISREG(m) regular file + + S_ISDIR(m) directory + + S_ISCHR(m) character device + + S_ISBLK(m) block device + + S_ISFIFO(m) fifo + + S_ISSOCK(m) socket + + The following flags are defined for the st_mode field: + + S_IFMT 00170000 bitmask for the file type bit- + fields + + S_IFSOCK 0140000 socket + + S_IFLNK 0120000 symbolic link + + S_IFREG 0100000 regular file + + S_IFBLK 0060000 block device + + S_IFDIR 0040000 directory + + S_IFCHR 0020000 character device + + S_IFIFO 0010000 fifo + + S_ISUID 0004000 set UID bit + + S_ISGID 0002000 set GID bit + + S_ISVTX 0001000 sticky bit + + S_IRWXU 00700 user (file owner) has read, write + + + +

Linux 1.1.75 1 January 1995 2 +

+ + + + +

STAT(2) Linux Programmer's Manual STAT(2) +

+ + and execute permission + + S_IRUSR (S_IREAD) + 00400 user has read permission + + S_IWUSR (S_IWRITE) + 00200 user has write permission + + S_IXUSR (S_IEXEC) + 00100 user has execute permission + + S_IRWXG 00070 group has read, write and execute + permission + + S_IRGRP 00040 group has read permission + + S_IWGRP 00020 group has write permission + + S_IXGRP 00010 group has execute permission + + S_IRWXO 00007 others have read, write and execute + permission + + S_IROTH 00004 others have read permission + + S_IWOTH 00002 others have write permisson + + S_IXOTH 00001 others have execute permission + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EBADF filedes is bad. + + ENOENT File does not exist. + +

CONFORMING TO +

SVID (not lstat()), AT&T (not lstat()), POSIX (not + lstat()), X/OPEN (not lstat()), BSD 4.3 + +
+
+

SEE ALSO +

+chmod, +chown, +readlink, +utime, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 1.1.75 1 January 1995 3 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/stderr.htm b/reference/C/MAN/stderr.htm new file mode 100644 index 0000000..4a04473 --- /dev/null +++ b/reference/C/MAN/stderr.htm @@ -0,0 +1,99 @@ +strerror + +
+
+
+
+
+

STRERROR(3) Linux Programmer's Manual STRERROR(3) +

+ +

NAME +

strerror - return string describing error code + +

SYNOPSIS +

#include <string.h> + + char *strerror(int errnum); + +

DESCRIPTION +

The strerror() function returns a string describing the + error code passed in the argument errno. The string can + only be used until the next call to strerror(). + +

RETURN VALUE +

The strerror() function returns the appropriate descrip- + tion string, or an unknown error message if the error code + is unknown. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+errno, +perror, +strsignal, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 13, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strcasecmp.htm b/reference/C/MAN/strcasecmp.htm new file mode 100644 index 0000000..9267d41 --- /dev/null +++ b/reference/C/MAN/strcasecmp.htm @@ -0,0 +1,101 @@ +strcasecmp + +
+
+
+
+
+

STRCASECMP(3) Linux Programmer's Manual STRCASECMP(3) +

+ +

NAME +

strcasecmp, strncasecmp - compare two strings ignoring + case + +

SYNOPSIS +

#include <string.h> + + int strcasecmp(const char *s1, const char *s2); + + int strncasecmp(const char *s1, const char *s2, size_t n); + +

DESCRIPTION +

The strcasecmp() function compares the two strings s1 and + s2, ignoring the case of the characters. It returns an + integer less than, equal to, or greater than zero if s1 is + found, respectively, to be less than, to match, or be + greater than s2. + + The strncasecmp() function is similar, except it only com- + pares the first n characters of s1. + +

RETURN VALUE +

The strcasecmp() and strncasecmp() functions return an + integer less than, equal to, or greater than zero if s1 + (or the first n bytes thereof) is found, respectively, to + be less than, to match, or be greater than s2. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+bcmp, +memcmp, +strcmp, +strcoll, +strncmp, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 11, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strcat.htm b/reference/C/MAN/strcat.htm new file mode 100644 index 0000000..209b597 --- /dev/null +++ b/reference/C/MAN/strcat.htm @@ -0,0 +1,101 @@ +strcat + +
+
+
+
+
+

STRCAT(3) Linux Programmer's Manual STRCAT(3) +

+ +

NAME +

strcat, strncat - concatenate two strings + +

SYNOPSIS +

#include <string.h> + + char *strcat(char *dest, const char *src); + + char *strncat(char *dest, const char *src, size_t n); + +

DESCRIPTION +

The strcat() function appends the src string to the dest + string overwriting the `\0' character at the end of dest, + and then adds a terminating `\0' character. The strings + may not overlap, and the dest string must have enough + space for the result. + + The strncat() function is similar, except that only the + first n characters of src are appended to dest. + +

RETURN VALUE +

The strcat() and strncat() functions return a pointer to + the resulting string dest. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+bcopy, +memccpy, +memcpy, +strcpy, +strncpy, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 11, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strcoll.htm b/reference/C/MAN/strcoll.htm new file mode 100644 index 0000000..043f740 --- /dev/null +++ b/reference/C/MAN/strcoll.htm @@ -0,0 +1,101 @@ +strcoll + +
+
+
+
+
+

STRCOLL(3) Linux Programmer's Manual STRCOLL(3) +

+ +

NAME +

strcoll - compare two strings using the current locale + +

SYNOPSIS +

#include <string.h> + + int strcoll(const char *s1, const char *s2); + +

DESCRIPTION +

The strcoll() function compares the two strings s1 and s2. + It returns an integer less than, equal to, or greater than + zero if s1 is found, respectively, to be less than, to + match, or be greater than s2. The comparison is based on + strings interpreted as appropriate for the program's cur- + rent locale for category LC_COLLATE. (See setlocale(3)). + +

RETURN VALUE +

The strcoll() function returns an integer less than, equal + to, or greater than zero if s1 is found, respectively, to + be less than, to match, or be greater than s2, when both + are interpreted as appropriate for the current locale. + +

CONFORMING TO +

SVID 3, BSD 4.3, ISO 9899 + +

NOTES +

The Linux C Library currently hasn't implemented the com- + plete POSIX-collating. + + In the "POSIX" or "C" locales strcoll() is equivalent to + strcmp(). + +
+
+

SEE ALSO +

+bcmp, +memcmp, +strcasecmp, +strcmp, +strxfrm, +setlocale, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 12, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strcspn.htm b/reference/C/MAN/strcspn.htm new file mode 100644 index 0000000..3124e7a --- /dev/null +++ b/reference/C/MAN/strcspn.htm @@ -0,0 +1,103 @@ +strcspn + +
+
+
+
+
+

STRSPN(3) Linux Programmer's Manual STRSPN(3) +

+ +

NAME +

strspn, strcspn - search a string for a set of characters + +

SYNOPSIS +

#include <string.h> + + size_t strspn(const char *s, const char *accept); + + size_t strcspn(const char *s, const char *reject); + +

DESCRIPTION +

The strspn() function calculates the length of the initial + segment of s which consists entirely of characters in + accept. + + The strcspn() function calculates the length of the ini- + tial segment of s which consists entirely of characters + not in reject. + +

RETURN VALUE +

The strspn() function returns the number of characters in + the initial segment of s which consist only of characters + from accept. + + The strcspn() function returns the number of characters in + the initial segment of s which are not in the string + reject. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+index, +memchr, +rindex, +strchr, +strpbrk, +strsep, +strstr, +strtok, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 12, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strftime.htm b/reference/C/MAN/strftime.htm new file mode 100644 index 0000000..7154eae --- /dev/null +++ b/reference/C/MAN/strftime.htm @@ -0,0 +1,233 @@ +strftime + +
+
+
+
+
+

STRFTIME(3) Linux Programmer's Manual STRFTIME(3) +

+ +

NAME +

strftime - format date and time + +

SYNOPSIS +

#include <time.h> + + size_t strftime(char *s, size_t max, const char *format, + const struct tm *tm); + +

DESCRIPTION +

The strftime() function formats the broken-down time tm + according to the format specification format and places + the result in the character array s of size max. + + Ordinary characters placed in the format string are copied + to s without conversion. Conversion specifiers are intro- + duced by a `%' character, and are replaced in s as fol- + lows: + + %a The abbreviated weekday name according to the cur- + rent locale. + + %A The full weekday name according to the current + locale. + + %b The abbreviated month name according to the current + locale. + + %B The full month name according to the current + locale. + + %c The preferred date and time representation for the + current locale. + + %d The day of the month as a decimal number (range 0 + to 31). + + %H The hour as a decimal number using a 24-hour clock + (range 00 to 23). + + %I The hour as a decimal number using a 12-hour clock + (range 01 to 12). + + %j The day of the year as a decimal number (range 001 + to 366). + + %m The month as a decimal number (range 10 to 12). + + %M The minute as a decimal number. + + %p Either `am' or `pm' according to the given time + value, or the corresponding strings for the current + locale. + + + + +

GNU July 2, 1993 1 +

+ + + + +

STRFTIME(3) Linux Programmer's Manual STRFTIME(3) +

+ + %S The second as a decimal number. + + %U The week number of the current year as a decimal + number, starting with the first Sunday as the first + day of the first week. + + %W The week number of the current year as a decimal + number, starting with the first Monday as the first + day of the first week. + + %w The day of the week as a decimal, Sunday being 0. + + %x The preferred date representation for the current + locale without the time. + + %X The preferred time representation for the current + locale without the date. + + %y The year as a decimal number without a century + (range 00 to 99). + + %Y The year as a decimal number including the century. + + %Z The time zone or name or abbreviation. + + %% A literal `%' character. + + The broken-down time structure tm is defined in <time.h> + as follows: + + struct tm + { + int tm_sec; /* seconds */ + int tm_min; /* minutes */ + int tm_hour; /* hours */ + int tm_mday; /* day of the month */ + int tm_mon; /* month */ + int tm_year; /* year */ + int tm_wday; /* day of the week */ + int tm_yday; /* day in the year */ + int tm_isdst; /* daylight saving time */ + }; + + The members of the tm structure are: + + tm_sec The number of seconds after the minute, normally in + the range 0 to 59, but can be up to 61 to allow for + leap seconds. + + tm_min The number of minutes after the hour, in the range + 0 to 59. + + tm_hour + The number of hours past midnight, in the range 0 + + + +

GNU July 2, 1993 2 +

+ + + + +

STRFTIME(3) Linux Programmer's Manual STRFTIME(3) +

+ + to 23. + + tm_mday + The day of the month, in the range 1 to 31. + + tm_mon The number of months since January, in the range 0 + to 11. + + tm_year + The number of years since 1900. + + tm_wday + The number of days since Sunday, in the range 0 to + 6. + + tm_yday + The number of days since January 1, in the range 0 + to 365. + + tm_isdst + A flag that indicates whether daylight saving time + is in effect at the time described. The value is + positive if daylight saving time is in effect, zero + if it is not, and negative if the information is + not available. + +

RETURN VALUE +

The strftime() function returns the number of characters + placed in the array s, not including the terminating NULL + character. If the value equals max, it means that the + array was too small. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+date, +time, +ctime, +setlocale, +sprintf, +

+
+

NOTES +

The function supports only those locales specified in + locale(7) + + + + + + + + + + + + + + + + +

GNU July 2, 1993 3 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strlen.htm b/reference/C/MAN/strlen.htm new file mode 100644 index 0000000..ea7334a --- /dev/null +++ b/reference/C/MAN/strlen.htm @@ -0,0 +1,97 @@ +strlen + +
+
+
+
+
+

STRLEN(3) Linux Programmer's Manual STRLEN(3) +

+ +

NAME +

strlen - calculate the length of a string + +

SYNOPSIS +

#include <string.h> + + size_t strlen(const char *s); + +

DESCRIPTION +

The strlen() function calculates the length of the string + s, not including the terminating `\0' character. + +

RETURN VALUE +

The strlen() function returns the number of characters in + s. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+string, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 12, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strpbrk.htm b/reference/C/MAN/strpbrk.htm new file mode 100644 index 0000000..008b98b --- /dev/null +++ b/reference/C/MAN/strpbrk.htm @@ -0,0 +1,103 @@ +strpbrk + +
+
+
+
+
+

STRPBRK(3) Linux Programmer's Manual STRPBRK(3) +

+ +

NAME +

strpbrk - search a string for any of a set of characters + +

SYNOPSIS +

#include <string.h> + + char *strpbrk(const char *s, const char *accept); + +

DESCRIPTION +

The strpbrk() function locates the first occurrence in the + string s of any of the characters in the string accept. + +

RETURN VALUE +

The strpbrk() function returns a pointer to the character + in s that matches one of the characters in accept. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+index, +memchr, +rindex, +strchr, +strsep, +spn, +strstr, +strtok, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 12, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strspn.htm b/reference/C/MAN/strspn.htm new file mode 100644 index 0000000..3eacb54 --- /dev/null +++ b/reference/C/MAN/strspn.htm @@ -0,0 +1,103 @@ +strspn + +
+
+
+
+
+

STRSPN(3) Linux Programmer's Manual STRSPN(3) +

+ +

NAME +

strspn, strcspn - search a string for a set of characters + +

SYNOPSIS +

#include <string.h> + + size_t strspn(const char *s, const char *accept); + + size_t strcspn(const char *s, const char *reject); + +

DESCRIPTION +

The strspn() function calculates the length of the initial + segment of s which consists entirely of characters in + accept. + + The strcspn() function calculates the length of the ini- + tial segment of s which consists entirely of characters + not in reject. + +

RETURN VALUE +

The strspn() function returns the number of characters in + the initial segment of s which consist only of characters + from accept. + + The strcspn() function returns the number of characters in + the initial segment of s which are not in the string + reject. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+index, +memchr, +rindex, +strchr, +strpbrk, +strsep, +strstr, +strtok, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          April 12, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strstr.htm b/reference/C/MAN/strstr.htm new file mode 100644 index 0000000..3e0ca0d --- /dev/null +++ b/reference/C/MAN/strstr.htm @@ -0,0 +1,103 @@ +strstr + +
+
+
+
+
+

STRSTR(3) Linux Programmer's Manual STRSTR(3) +

+ +

NAME +

strstr - locate a substring + +

SYNOPSIS +

#include <string.h> + + char *strstr(const char *haystack, const char *needle); + +

DESCRIPTION +

The strstr() function finds the first occurrence of the + substring needle in the string haystack. The terminating + `\0' characters are not compared. + +

RETURN VALUE +

The strstr() function returns a pointer to the beginning + of the substring, or NULL if the substring is not found. + +
+
+

SEE ALSO +

+index, +memchr, +rindex, +strchr, +strpbrk, +strsep, +strspn, +strtok, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 12, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/strtod.htm b/reference/C/MAN/strtod.htm new file mode 100644 index 0000000..d32acee --- /dev/null +++ b/reference/C/MAN/strtod.htm @@ -0,0 +1,101 @@ +strtod + +
+
+
+
+
+

STRTOD(3) Linux Programmer's Manual STRTOD(3) +

+ +

NAME +

strtod - convert ASCII string to double + +

SYNOPSIS +

#include <stdlib.h> + + double strtod(const char *nptr, char **endptr + +

DESCRIPTION +

The strtod function converts the initial portion of the + string pointed to by nptr to double representation. + + The expected form of the string is an optional plus + (``+'') or minus sign (``-'') followed by a sequence of + digits optionally containing a decimal-point character, + optionally followed by an exponent. An exponent consists + of an ``E'' or ``e'', followed by an optional plus or + minus sign, followed by a sequence of digits. + + Leading white-space characters in the string (as defined + by the isspace(3) function) are skipped. + +

RETURN VALUES +

The strtod function returns the converted value, if any. + + If endptr is not NULL, a pointer to the character after + the last character used in the conversion is stored in the + location referenced by endptr. + + If no conversion is performed, zero is returned and the + value of nptr is stored in the location referenced by + endptr. + + If the correct value would cause overflow, plus or minus + HUGE_VAL is returned (according to the sign of the value), + and ERANGE is stored in errno. If the correct value would + cause underflow, zero is returned and ERANGE is stored in + errno. + +

ERRORS +

ERANGE Overflow or underflow occurred. + +
+
+

SEE ALSO +

+atof, +atoi, +atol, +strtol, +strtoul, +

+
+

STANDARDS +

The strtod function conforms to ANSI-C. + +

BUGS +

This is a BSD manual page and may not reflect the current + Linux implementation. + + + + + + +

BSD Man Page 21 Aug 1994 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/sysconf.htm b/reference/C/MAN/sysconf.htm new file mode 100644 index 0000000..f09ca21 --- /dev/null +++ b/reference/C/MAN/sysconf.htm @@ -0,0 +1,233 @@ +sysconf + +
+
+
+
+
+

SYSCONF(3) Linux Programmer's Manual SYSCONF(3) +

+ +

NAME +

sysconf - Get configuration information at runtime + +

SYNOPSIS +

#include <unistd.h> + + long sysconf(int name); + +

DESCRIPTION +

sysconf() provides a way for the application to determine + values for system limits or options at runtime. + + The equivalent macros defined in <unistd.h> can only give + conservative values; if an application wants to take + advantage of values which may change, a call to sysconf() + can be made, which may yield more liberal results. + + For getting information about a particular file, see + fpathconf() or pathconf(). + + The following values are supported for name. First, the + POSIX.1 compatible values: + + _SC_ARG_MAX + The maximum length of the arguments to the exec() + family of functions; the corresponding macro is + ARG_MAX. + + _SC_CHILD_MAX + The number of simultaneous processes per user id, + the corresponding macro is _POSIX_CHILD_MAX. + + _SC_CLK_TCK + The number of clock ticks per second; the corre- + sponding macro is CLK_TCK. + + _SC_STREAM_MAX + The maximum number of streams that a process can + have open at any time. The corresponding POSIX + macro is STREAM_MAX, the corresponding standard C + macro is FOPEN_MAX. + + _SC_TZNAME_MAX + The maximum number of bytes in a timezone name, the + corresponding macro is TZNAME_MAX. + + _SC_OPEN_MAX + The maximum number of files that a process can have + open at any time, the corresponding macro is + _POSIX_OPEN_MAX. + + _SC_JOB_CONTROL + This indicates whether POSIX - style job control is + supported, the corresponding macro is + + + +

GNU April 18, 1993 1 +

+ + + + +

SYSCONF(3) Linux Programmer's Manual SYSCONF(3) +

+ + _POSIX_JOB_CONTROL. + + _SC_SAVED_IDS + This indicates whether a process has a saved set- + user-ID and a saved set-group-ID; the corresponding + macro is _POSIX_SAVED_IDS. + + _SC_VERSION + indicates the year and month the POSIX.1 standard + was approved in the format YYYYMML;the value + 199009L indicates the most recent revision, 1990. + + Next, the POSIX.2 values: + + _SC_BC_BASE_MAX + indicates the maximum obase value accepted by the + bc(1) utility; the corresponding macro is + BC_BASE_MAX. + + _SC_BC_DIM_MAX + indicates the maximum value of elements permitted + in an array by bc(1); the corresponding macro is + BC_DIM_MAX. + + _SC_BC_SCALE_MAX + indicates the maximum scale value allowed by bc(1); + the corresponding macro is BC_SCALE_MAX. + + _SC_BC_STRING_MAX + indicates the maximum length of a string accepted + by bc(1); the corresponding macro is BC_STRING_MAX. + + _SC_COLL_WEIGHTS_MAX + indicates the maximum numbers of weights that can + be assigned to an entry of the LC_COLLATE order + keyword in the locale definition file; the corre- + sponding macro is COLL_WEIGHTS_MAX. + + _SC_EXPR_NEST_MAX + is the maximum number of expressions which can be + nested within parentheses by expr(1). The corre- + sponding macro is EXPR_NEST_MAX. + + _SC_LINE_MAX + The maximum length of a utility's input line + length, either from standard input or from a file. + This includes length for a trailing newline. The + corresponding macro is LINE_MAX. + + _SC_RE_DUP_MAX + The maximum number of repeated occurrences of a + regular expression when the interval notation + \{m,n\} is used. The value of the corresponding + macro is RE_DUP_MAX. + + + +

GNU April 18, 1993 2 +

+ + + + +

SYSCONF(3) Linux Programmer's Manual SYSCONF(3) +

+ + _SC_2_VERSION + indicates the version of the POSIX.2 standard in + the format of YYYYMML. The corresponding macro is + POSIX2_VERSION. + + _SC_2_DEV + indicates whether the POSIX.2 C language develop- + ment facilities are supported. The corresponding + macro is POSIX2_C_DEV. + + _SC_2_FORT_DEV + indicates whether the POSIX.2 FORTRAN development + utilities are supported. The corresponding macro + is POSIX2_FORT_RUN. + + _SC_2_FORT_RUN + indicates whether the POSIX.2 FORTRAN runtime util- + ities are supported. The corresponding macro is + POSIX2_FORT_RUN. + + POSIX2_LOCALEDEF + indicates whether the POSIX.2 creation of locates + via locale(1) is supported. The corresponding + macro is POSIX2_LOCALEDEF. + + _SC_2_SW_DEV + indicates whether the POSIX.2 software development + utilities option is supported. The corresponding + macro is POSIX2_SW_DEV. + +

RETURN VALUE +

The value returned is the value of the system resource, 1 + if a queried option is available, 0 if it is not, or -1 on + error. The variable errno is not set. + +

CONFORMS TO +

POSIX.1, proposed POSIX.2 + +

BUGS +

It is difficult use ARG_MAX because it is not specified + how much of the argument space for exec() is consumed by + the user's environment variables. + + Some returned values may be huge; they are not suitable + for allocating memory. + + POSIX.2 is not yet an approved standard; the information + in this manpage is subject to change. + +
+
+

SEE ALSO +

+bc, +expr, +locale, +fpathconf, +pathconf, +

+
+
+
+
+
+
+

GNU April 18, 1993 3 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/tan.htm b/reference/C/MAN/tan.htm new file mode 100644 index 0000000..755afba --- /dev/null +++ b/reference/C/MAN/tan.htm @@ -0,0 +1,102 @@ +tan + +
+
+
+
+
+

TAN(3) Linux Programmer's Manual TAN(3) +

+ +

NAME +

tan - tangent function + +

SYNOPSIS +

#include <math.h> + + double tan(double x); + +

DESCRIPTION +

The tan() function returns the tangent of x, where x is + given in radians. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acos, +asin, +atan, +atan2, +cos, +sin, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                           June 8, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/tanh.htm b/reference/C/MAN/tanh.htm new file mode 100644 index 0000000..4adcce5 --- /dev/null +++ b/reference/C/MAN/tanh.htm @@ -0,0 +1,101 @@ +tanh + +
+
+
+
+
+

TANH(3) Linux Programmer's Manual TANH(3) +

+ +

NAME +

tanh - hyperbolic tangent function + +

SYNOPSIS +

#include <math.h> + + double tanh(double x); + +

DESCRIPTION +

The tanh() function returns the hyperbolic tangent of x, + which is defined mathematically as sinh(x) / cosh(x). + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+acosh, +asinh, +atanh, +cosh, +sinh, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          June 13, 1993                         1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/telldir.htm b/reference/C/MAN/telldir.htm new file mode 100644 index 0000000..fc8308f --- /dev/null +++ b/reference/C/MAN/telldir.htm @@ -0,0 +1,101 @@ +telldir + +
+
+
+
+
+

TELLDIR(3) Linux Programmer's Manual TELLDIR(3) +

+ +

NAME +

telldir - return current location in directory stream. + +

SYNOPSIS +

#include <dirent.h> + + off_t telldir(DIR *dir); + +

DESCRIPTION +

The telldir() function returns the current location asso- + ciated with the directory stream dir. + +

RETURN VALUE +

The telldir() function returns the current location in the + directory stream or -1 if an error occurs. + +

ERRORS +

EBADF Invalid directory stream descriptor dir. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+opendir, +readdir, +closedir, +rewinddir, +seekdir, +scandir, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+                          March 31, 1993                        1
+
+
+
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/test b/reference/C/MAN/test new file mode 100644 index 0000000..b08ea81 --- /dev/null +++ b/reference/C/MAN/test @@ -0,0 +1,4 @@ + + + .htm + .htm diff --git a/reference/C/MAN/time.htm b/reference/C/MAN/time.htm new file mode 100644 index 0000000..b1c382b --- /dev/null +++ b/reference/C/MAN/time.htm @@ -0,0 +1,100 @@ +time + +
+
+
+
+
+

TIME(2) Linux Programmer's Manual TIME(2) +

+ +

NAME +

time - get time in seconds + +

SYNOPSIS +

#include <time.h> + + time_t time(time_t *t); + +

DESCRIPTION +

time returns the time since 00:00:00 GMT, January 1, 1970, + measured in seconds. + + If t is non null, the return value is also stored in the + memory pointed to by t. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + Under BSD 4.3, this call is obsoleted by gettimeofday(2). + +
+
+

SEE ALSO +

+ctime, +date, +ftime, +gettimeofday, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 24 July 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/tmpfile.htm b/reference/C/MAN/tmpfile.htm new file mode 100644 index 0000000..b87aeae --- /dev/null +++ b/reference/C/MAN/tmpfile.htm @@ -0,0 +1,100 @@ +tmpfile + +
+
+
+
+
+

TMPFILE(3) Linux Programmer's Manual TMPFILE(3) +

+ +

NAME +

tmpfile - create a temporary file + +

SYNOPSIS +

#include <stdio.h> + + FILE *tmpfile (void); + +

DESCRIPTION +

The tmpfile() function generates a unique temporary file- + name using the path prefix P_tmpdir defined in <stdio.h>. + The temporary file is then opened in binary read/write + (w+b) mode. The file will be automatically deleted when + it is closed or the program terminates. + +

RETURN VALUE +

The tmpfile() function returns a stream descriptor, or + NULL if a unique filename cannot be generated or the + unique file cannot be opened. + +

ERRORS +

EACCES Search permission denied for directory in file's + path prefix. + + EEXIST Unable to generate a unique filename. + + EMFILE Too many file descriptors in use by process. + + ENFILE Too many files open in system. + + EROFS Read-only filesystem. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+mktemp, +mkstemp, +tmpnam, +tempnam, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 3, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/tmpnam.htm b/reference/C/MAN/tmpnam.htm new file mode 100644 index 0000000..b9af953 --- /dev/null +++ b/reference/C/MAN/tmpnam.htm @@ -0,0 +1,100 @@ +tmpnam + +
+
+
+
+
+

TMPNAM(3) Linux Programmer's Manual TMPNAM(3) +

+ +

NAME +

tmpnam - create a name for a temporary file + +

SYNOPSIS +

#include <stdio.h> + + char *tmpnam(char *s); + +

DESCRIPTION +

The tmpnam() function generates a unique temporary file- + name using the path prefix P_tmpdir defined in <stdio.h>. + If the argument s is NULL, tmpnam() returns the address of + an internal static area which holds the filename, which is + overwritten by subsequent calls to tmpnam(). If s is not + NULL, the filename is returned in s. + +

RETURN VALUE +

The tmpnam() function returns a pointer to the unique tem- + porary filename, or NULL if a unique name cannot be gener- + ated. + +

ERRORS +

EEXIST Unable to generate a unique filename. + +

CONFORMING TO +

SVID 3, POSIX, BSD 4.3, ISO 9899 + +
+
+

SEE ALSO +

+mktemp, +mkstemp, +tempnam, +tmpfile, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 3, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/togetpgrp.htm b/reference/C/MAN/togetpgrp.htm new file mode 100644 index 0000000..68d9c8c --- /dev/null +++ b/reference/C/MAN/togetpgrp.htm @@ -0,0 +1,492 @@ +tcgetpgrp + +
+
+
+
+
+

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ +

NAME +

termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, + tcflush, tcflow, cfgetospeed, cfgetispeed, cfsetispeed, + cfsetospeed, tcgetpgrp, tcsetpgrp - get and set terminal + attributes, line control, get and set baud rate, get and + set terminal foreground process group ID + +

SYNOPSIS +

#include <termios.h> + #include <unistd.h> + + int tcgetattr ( int fd, struct termios *termios_p ); + + int tcsetattr ( int fd, int optional_actions, struct + termios *termios_p ); + + int tcsendbreak ( int fd, int duration ); + + int tcdrain ( int fd ); + + int tcflush ( int fd, int queue_selector ); + + int tcflow ( int fd, int action ); + + speed_t cfgetospeed ( struct termios *termios_p ); + + int cfsetospeed ( struct termios *termios_p, speed_t speed + ); + + speed_t cfgetispeed ( struct termios *termios_p ); + + int cfsetispeed ( struct termios *termios_p, speed_t speed + ); + + pid_t tcgetpgrp ( int fd ); + + int tcsetpgrp ( int fd, pid_t pgrpid ); + +

DESCRIPTION +

The termios functions describe a general terminal inter- + face that is provided to control asynchronous communica- + tions ports. + + Many of the functions described here have a termios_p + argument that is a pointer to a termios structure. This + structure contains the following members: + + tcflag_t c_iflag; /* input modes */ + tcflag_t c_oflag; /* output modes */ + tcflag_t c_cflag; /* control modes */ + tcflag_t c_lflag; /* local modes */ + cc_t c_cc[NCCS]; /* control chars */ + + + + + +

Linux February 25, 1995 1 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + c_iflag flag constants: + + IGNBRK ignore BREAK condition on input + + BRKINT If IGNBRK is not set, generate SIGINT on BREAK con- + dition, else read BREAK as character \0. + + IGNPAR ignore framing errors and parity errors. + + PARMRK if IGNPAR is not set, prefix a character with a + parity error or framing error with \377 \0. If + neither IGNPAR nor PARMRK is set, read a character + with a parity error or framing error as \0. + + INPCK enable input parity checking + + ISTRIP strip off eighth bit + + INLCR translate NL to CR on input + + IGNCR ignore carriage return on input + + ICRNL translate carriage return to newline on input + (unless IGNCR is set) + + IUCLC map uppercase characters to lowercase on input + + IXON enable XON/XOFF flow control on output + + IXANY enable any character to restart output + + IXOFF enable XON/XOFF flow control on input + + IMAXBEL + ring bell when input queue is full + + c_oflag flag constants: + + OPOST enable implementation-defined output processing + + OLCUC map lowercase characters to uppercase on output + + ONLCR map NL to CR-NL on output + + OCRNL map CR to NL on output + + ONOCR don't output CR at column 0 + + ONLRET don't output CR + + OFILL send fill characters for a delay, rather than using + a timed delay + + OFDEL fill character is ASCII DEL. If unset, fill + + + +

Linux February 25, 1995 2 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + character is ASCII NUL + + NLDLY newline delay mask. Values are NL0 and NL1. + + CRDLY carriage return delay mask. Values are CR0, CR1, + CR2, or CR3. + + TABDLY horizontal tab delay mask. Values are TAB0, TAB1, + TAB2, TAB3, or XTABS. A value of XTABS expands + tabs to spaces (with tab stops every eight + columns). + + BSDLY backspace delay mask. Values are BS0 or BS1. + + VTDLY vertical tab delay mask. Values are VT0 or VT1. + + FFDLY form feed delay mask. Values are FF0 or FF1. + + c_cflag flag constants: + + CSIZE character size mask. Values are CS5, CS6, CS7, or + CS8. + + CSTOPB set two stop bits, rather than one. + + CREAD enable receiver. + + PARENB enable parity generation on output and parity + checking for input. + + PARODD parity for input and output is odd. + + HUPCL lower modem control lines after last process closes + the device (hang up). + + CLOCAL ignore modem control lines + + CIBAUD mask for input speeds (not used). + + CRTSCTS + flow control. + + c_lflag flag constants: + + ISIG when any of the characters INTR, QUIT, SUSP, or + DSUSP are received, generate the corresponding sig- + nal. + + ICANON enable canonical mode. This enables the special + characters EOF, EOL, EOL2, ERASE, KILL, REPRINT, + STATUS, and WERASE, and buffers by lines. + + XCASE if ICANON is also set, terminal is uppercase only. + Input is converted to lowercase, except for + + + +

Linux February 25, 1995 3 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + characters preceded by \. On output, uppercase + characters are preceded by \ and lowercase charac- + ters are converted to uppercase. + + ECHO echo input characters. + + ECHOE if ICANON is also set, the ERASE character erases + the preceding input character, and WERASE erases + the preceding word. + + ECHOK if ICANON is also set, the KILL character erases + the current line. + + ECHONL if ICANON is also set, echo the NL character even + if ECHO is not set. + + ECHOCTL + if ECHO is also set, ASCII control signals other + than TAB, NL, START, and STOP are echoed as ^X, + where X is the character with ASCII code 0x10 + greater than the control signal. For example, + character 0x28 (BS) is echoed as ^H. + + ECHOPRT + if ICANON and IECHO are also set, characters are + printed as they are being erased. + + ECHOKE if ICANON is also set, KILL is echoed by erasing + each character on the line, as specified by ECHOE + and ECHOPRT. + + FLUSHO output is being flushed. This flag is toggled by + typing the DISCARD character. + + NOFLSH disable flushing the input and output queues when + generating the SIGINT and SIGQUIT signals, and + flushing the input queue when generating the SIG- + SUSP signal. + + TOSTOP send the SIGTTOU signal to the process group of a + background process which tries to write to its con- + trolling terminal. + + PENDIN all characters in the input queue are reprinted + when the next character is read. (bash handles + typeahead this way.) + + IEXTEN enable implementation-defined input processing. + + tcgetattr() gets the parameters associated with the object + referred by fd and stores them in the termios structure + referenced by termios_p. This function may be invoked + from a background process; however, the terminal + attributes may be subsequently changed by a foreground + + + +

Linux February 25, 1995 4 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + process. + + tcsetattr() sets the parameters associated with the termi- + nal (unless support is required from the underlying hard- + ware that is not available) from the termios structure + referred to by termios_p. optional_actions specifies when + the changes take effect: + + TCSANOW + the change occurs immediately. + + TCSADRAIN + the change occurs after all output written to fd + has been transmitted. This function should be used + when changing parameters that affect output. + + TCSAFLUSH + the change occurs after all output written to the + object referred by fd has been transmitted, and all + input that has been received but not read will be + discarded before the change is made. + + tcsendbreak() transmits a continuous stream of zero-valued + bits for a specific duration, if the terminal is using + asynchronous serial data transmission. If duration is + zero, it transmits zero-valued bits for at least 0.25 sec- + onds, and not more that 0.5 seconds. If duration is not + zero, it sends zero-valued bits for duration*N seconds, + where N is at least 0.25, and not more than 0.5. + + If the terminal is not using asynchronous serial data + transmission, tcsendbreak() returns without taking any + action. + + tcdrain() waits until all output written to the object + referred to by fd has been transmitted. + + tcflush() discards data written to the object referred to + by fd but not transmitted, or data received but not read, + depending on the value of queue_selector: + + TCIFLUSH + flushes data received but not read. + + TCOFLUSH + flushes data written but not transmitted. + + TCIOFLUSH + flushes both data received but not read, and data + written but not transmitted. + + tcflow() suspends transmission or reception of data on the + object referred to by fd, depending on the value of + action: + + + +

Linux February 25, 1995 5 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + TCOOFF suspends output. + + TCOON restarts suspended output. + + TCIOFF transmits a STOP character, which stops the termi- + nal device from transmitting data to the system. + + TCION transmits a START character, which starts the ter- + minal device transmitting data to the system. + + The default on open of a terminal file is that neither its + input nor its output is suspended. + + The baud rate functions are provided for getting and set- + ting the values of the input and output baud rates in the + termios structure. The new values do not take effect + until tcsetattr() is successfully called. + + Setting the speed to B0 instructs the modem to "hang up". + The actual bit rate corresponding to B38400 may be altered + with setserial(8). + + The input and output baud rates are stored in the termios + structure. + + cfgetospeed() returns the output baud rate stored in the + termios structure pointed to by termios_p. + + cfsetospeed() sets the output baud rate stored in the + termios structure pointed to by termios_p to speed, which + must be one of these constants: + B0 + B50 + B75 + B110 + B134 + B150 + B200 + B300 + B600 + B1200 + B1800 + B2400 + B4800 + B9600 + B19200 + B38400 + B57600 + B115200 + B230400 + The zero baud rate, B0, is used to terminate the connec- + tion. If B0 is specified, the modem control lines shall + no longer be asserted. Normally, this will disconnect the + line. CBAUDEX is a mask for the speeds beyond those + + + +

Linux February 25, 1995 6 +

+ + + + +

TERMIOS(2) Linux Programmer's Manual TERMIOS(2) +

+ + defined in POSIX.1 (57600 and above). Thus, B57600 & + CBAUDEX is nonzero. + + cfgetispeed() returns the input baud rate stored in the + termios structure. + + cfsetispeed() sets the input baud rate stored in the + termios structure to speed. If the input baud rate is set + to zero, the input baud rate will be equal to the output + baud rate. + + tcgetpgrp() returns process group ID of foreground pro- + cessing group, or -1 on error. + + tcsetpgrp() sets process group ID to pgrpid. pgrpid must + be the ID of a process group in the same session. + +

RETURN VALUES +

cfgetispeed() returns the input baud rate stored in the + termios structure. + + cfgetospeed() returns the output baud rate stored in the + termios structure. + + tcgetpgrp() returns process group ID of foreground pro- + cessing group, or -1 on error. + + All other functions return: + + 0 on success. + + -1 on failure and set errno to indicate the error. + +
+
+

SEE ALSO +

+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux February 25, 1995 7 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/toupper.htm b/reference/C/MAN/toupper.htm new file mode 100644 index 0000000..346390a --- /dev/null +++ b/reference/C/MAN/toupper.htm @@ -0,0 +1,99 @@ +toupper + +
+
+
+
+
+

TOUPPER(3) Linux Programmer's Manual TOUPPER(3) +

+ +

NAME +

toupper, tolower - convert letter to upper or lower case + +

SYNOPSIS +

#include <ctype.h> + + int toupper (int c); + int tolower (int c); + +

DESCRIPTION +

toupper() converts the letter c to upper case, if possi- + ble. + + tolower() converts the letter c to lower case, if possi- + ble. + +

RETURN VALUE +

The value returned is that of the converted letter, or c + if the conversion was not possible. + +

CONFORMS TO +

ANSI - C, BSD 4.3 + +

BUGS +

The details of what constitutes an uppercase or lowercase + letter depend on the current locale. For example, the + default "C" locale does not know about umlauts, so no con- + version is done for them. + + In some non - English locales, there are lowercase letters + with no corresponding uppercase equivalent; the German + sharp s is one example. + +
+
+

SEE ALSO +

+isalpha, +setlocale, +locale, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ttyname.htm b/reference/C/MAN/ttyname.htm new file mode 100644 index 0000000..58615dc --- /dev/null +++ b/reference/C/MAN/ttyname.htm @@ -0,0 +1,98 @@ +ttyname + +
+
+
+
+
+

TTYNAME(3) Linux Programmer's Manual TTYNAME(3) +

+ +

NAME +

ttyname - return name of a terminal + +

SYNOPSIS +

#include <unistd.h> + + char *ttyname ( int desc ); + +

DESCRIPTION +

Returns a pointer to the pathname of the terminal device + that is open on the file descriptor desc, or NULL on error + (for example, if desc is not connected to a terminal). + +

CONFORMING TO +

POSIX.1 + +
+
+

SEE ALSO +

+isatty, +fstat, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux April 20, 1995 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/uname.htm b/reference/C/MAN/uname.htm new file mode 100644 index 0000000..42d6a30 --- /dev/null +++ b/reference/C/MAN/uname.htm @@ -0,0 +1,99 @@ +uname + +
+
+
+
+
+

UNAME(2) Linux Programmer's Manual UNAME(2) +

+ +

NAME +

uname - get name and information about current kernel + +

SYNOPSIS +

#include <sys/utsname.h> + + int uname(struct utsname *buf); + +

DESCRIPTION +

uname returns system information in buf. The utsname + struct is as defined in /usr/include/sys/utsname.h : + struct utsname { + char sysname[65]; + char nodename[65]; + char release[65]; + char version[65]; + char machine[65]; + char domainname[65]; + }; + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EFAULT buf is not valid. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN + +
+
+

SEE ALSO +

+uname, +getdomainname, +gethostname, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 0.99.11 24 July 93 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/ungetc.htm b/reference/C/MAN/ungetc.htm new file mode 100644 index 0000000..54a79a5 --- /dev/null +++ b/reference/C/MAN/ungetc.htm @@ -0,0 +1,169 @@ +ungetc + +
+
+
+
+
+

GETS(3) Linux Programmer's Manual GETS(3) +

+ +

NAME +

fgetc, fgets, getc, getchar, gets, ungetc - input of char- + acters and strings + +

SYNOPSIS +

#include <stdio.h> + + int fgetc(FILE *stream); + char *fgets(char *s, int size, FILE *stream); + int getc(FILE *stream); + int getchar(void); + char *gets(char *s); + int ungetc(int c, FILE *stream); + +

DESCRIPTION +

fgetc() reads the next character from stream and returns + it as an unsigned char cast to an int, or EOF on end of + file or error. + + getc() is equivalent to fgetc() except that it may be + implemented as a macro which evaluates stream more than + once. + + getchar() is equivalent to getc(stdin). + + gets() reads a line from stdin into the buffer pointed to + by s until either a terminating newline or EOF, which it + replaces with '\0'. No check for buffer overrun is per- + formed (see BUGS below). + + fgets() reads in at most one less than n characters from + stream and stores them into the buffer pointed to by s. + Reading stops after an EOF or a newline. If a newline is + read, it is stored into the buffer. A '\0' is stored + after the last character in the buffer. + + ungetc() pushes c back to stream, cast to unsigned char, + where it is available for subsequent read operations. + Pushed - back characters will be returned in reverse + order; only one pushback is guaranteed. + + Calls to the functions described here can be mixed with + each other and with calls to other input functions from + the stdio library for the same input stream. + +

RETURN VALUES +

fgetc(), getc() and getchar() return the character read as + an unsigned char cast to an int or EOF on end of file or + error. + + gets() and fgets() return s on success, and NULL on end of + file or error. + + ungetc() returns c on success, or EOF on error. + + + +

GNU April 4, 1993 1 +

+ + + + +

GETS(3) Linux Programmer's Manual GETS(3) +

+ +

CONFORMS TO +

ANSI - C, POSIX.1 + +

BUGS +

Because it is impossible to tell without knowing the data + in advance how many characters gets() will read, and + because gets() will continue to store characters past the + end of the buffer, it is extremely dangerous to use. It + has been used to break computer security. Use fgets() + instead. + + It is not advisable to mix calls to input functions from + the stdio library with low - level calls to read() for the + file descriptor associated with the input stream; the + results will be undefined and very probably not what you + want. + +
+
+

SEE ALSO +

+read, +write, +fopen, +fread, +scanf, +puts, +fseek, +ferror, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU April 4, 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/unlink.htm b/reference/C/MAN/unlink.htm new file mode 100644 index 0000000..79ab69d --- /dev/null +++ b/reference/C/MAN/unlink.htm @@ -0,0 +1,168 @@ +unlink + +
+
+
+
+
+

UNLINK(2) Linux Programmer's Manual UNLINK(2) +

+ +

NAME +

unlink - delete a name and possibly the file it refers to + +

SYNOPSIS +

#include <unistd.h> + + int unlink(const char *pathname); + +

DESCRIPTION +

unlink deletes a name from the filesystem. If that name + was the last link to a file and no processes have the file + open the file is deleted and the space it was using is + made available for reuse. + + If the name was the last link to a file but any processes + still have the file open the file will remain in existence + until the last file descriptor referring to it is closed. + + If the name referred to a symbolic link the link is + removed. + + If the name referred to a socket, fifo or device the name + for it is removed but processes which have the object open + may continue to use it. + +

RETURN VALUE +

On success, zero is returned. On error, -1 is returned, + and errno is set appropriately. + +

ERRORS +

EFAULT pathname points outside your accessible address + space. + + EACCES Write access to the directory containing pathname + is not allowed for the process's effective uid, or + one of the directories in pathname did not allow + search (execute) permission. + + EPERM The directory containing pathname has the sticky- + bit (S_ISVTX) set and the process's effective uid + is neither the uid of the file to be deleted nor + that of the directory containing it. + + ENAMETOOLONG + pathname was too long. + + ENOENT A directory component in pathname does not exist + or is a dangling symbolic link. + + ENOTDIR A component used as a directory in pathname is + not, in fact, a directory. + + EISDIR pathname refers to a directory. + + + + +

Linux 24 July 1993 1 +

+ + + + +

UNLINK(2) Linux Programmer's Manual UNLINK(2) +

+ + ENOMEM Insufficient kernel memory was available. + + EROFS pathname refers to a file on a read-only filesys- + tem. + +

CONFORMING TO +

SVID, AT&T, POSIX, X/OPEN, BSD 4.3 + +

BUGS +

Infelicities in the protocol underlying NFS can cause the + unexpected disappearance of files which are still being + used. + +
+
+

SEE ALSO +

+link, +rename, +open, +rmdir, +mknod, +remove, +rm, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Linux 24 July 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/unsetenv.htm b/reference/C/MAN/unsetenv.htm new file mode 100644 index 0000000..fd95b1b --- /dev/null +++ b/reference/C/MAN/unsetenv.htm @@ -0,0 +1,98 @@ +unsetenv + +
+
+
+
+
+

SETENV(3) Linux Programmer's Manual SETENV(3) +

+ +

NAME +

setenv - change or add an environment variable + +

SYNOPSIS +

#include <stdlib.h> + + int setenv(const char *name, const char *value, int overwrite); + + void unsetenv(const char *name); + +

DESCRIPTION +

The setenv() function adds the variable name to the envi- + ronment with the value value, if name does not already + exist. If name does exist in the environment, then its + value is changed to value if overwrite is non-zero; if + overwrite is zero, then the value of name is not changed. + + The unsetenv() function deletes the variable name from the + environment. + +

RETURN VALUE +

The setenv() function returns zero on success, or -1 if + there was insufficient space in the environment. + +

CONFORMING TO +

BSD 4.3 + +
+
+

SEE ALSO +

+getenv, +putenv, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

BSD April 4, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/va_start.htm b/reference/C/MAN/va_start.htm new file mode 100644 index 0000000..a35845f --- /dev/null +++ b/reference/C/MAN/va_start.htm @@ -0,0 +1,159 @@ +va_start + +
+
+
+
+
+

STDARG(3) Linux Programmer's Manual STDARG(3) +

+ +

NAME +

stdarg - variable argument lists + +

SYNOPSIS +

#include <stdarg.h> + + void va_start( va_list ap, last); + typeva_arg( va_list ap, type); + void va_end( va_list ap); + +

DESCRIPTION +

A function may be called with a varying number of argu- + ments of varying types. The include file stdarg.h + declares a type va_list and defines three macros for step- + ping through a list of arguments whose number and types + are not known to the called function. + + The called function must declare an object of type va_list + which is used by the macros va_start, va_arg, and va_end. + + The va_start macro initializes ap for subsequent use by + va_arg and va_end, and must be called first. + + The parameter last is the name of the last parameter + before the variable argument list, i.e., the last parame- + ter of which the calling function knows the type. + + Because the address of this parameter is used in the + va_start macro, it should not be declared as a register + variable, or as a function or an array type. + + The va_start macro returns no value. + + The va_arg macro expands to an expression that has the + type and value of the next argument in the call. The + parameter ap is the va_list ap initialized by va_start. + Each call to va_arg modifies ap so that the next call + returns the next argument. The parameter type is a type + name specified so that the type of a pointer to an object + that has the specified type can be obtained simply by + adding a * to type. + + If there is no next argument, or if type is not compatible + with the type of the actual next argument (as promoted + according to the default argument promotions), random + errors will occur. + + The first use of the va_arg macro after that of the + va_start macro returns the argument after last. Succes- + sive invocations return the values of the remaining argu- + ments. + + The va_end macro handles a normal return from the function + whose variable argument list was initialized by va_start. + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

STDARG(3) Linux Programmer's Manual STDARG(3) +

+ + The va_end macro returns no value. + +

EXAMPLES +

The function foo takes a string of format characters and + prints out the argument associated with each format char- + acter based on the type. + void foo(char *fmt, ...) + { + va_list ap; + int d; + char c, *p, *s; + + va_start(ap, fmt); + while (*fmt) + switch(*fmt++) { + case 's': /* string */ + s = va_arg(ap, char *); + printf("string %s\n", s); + break; + case 'd': /* int */ + d = va_arg(ap, int); + printf("int %d\n", d); + break; + case 'c': /* char */ + c = va_arg(ap, char); + printf("char %c\n", c); + break; + } + va_end(ap); + } + +

STANDARDS +

The va_start, va_arg, and va_end macros conform to ANSI + C3.159-1989 (``ANSI C''). + +

COMPATIBILITY +

These macros are not compatible with the historic macros + they replace. A backward compatible version can be found + in the include file varargs.h. + +

BUGS +

Unlike the varargs macros, the stdarg macros do not permit + programmers to code a function with no fixed arguments. + This problem generates work mainly when converting varargs + code to stdarg code, but it also creates difficulties for + variadic functions that wish to pass all of their argu- + ments on to a function that takes a va_list argument, such + as vfprintf(3). + + + + + + + + + +

BSD MANPAGE 29 November 1993 2 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/vfprintf.htm b/reference/C/MAN/vfprintf.htm new file mode 100644 index 0000000..fd43848 --- /dev/null +++ b/reference/C/MAN/vfprintf.htm @@ -0,0 +1,362 @@ +vfprintf + +
+
+
+
+
+

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ +

NAME +

printf, fprintf, sprintf, vprintf, vfprintf, vsprintf - + formatted output conversion + +

SYNOPSIS +

#include <stdio.h> + + int printf( const char *format, ...); + int fprintf( FILE *stream, const char *format, ...); + int sprintf( char *str, const char *format, ...); + + #include <stdarg.h> + + int vprintf( const char *format, va_list ap); + int vfprintf( FILE *stream, const char *format, va_list + ap); + int vsprintf( char *str, char *format, va_list ap); + +

DESCRIPTION +

The printf family of functions produces output according + to a format as described below. Printf and vprintf write + output to stdout, the standard output stream; fprintf and + vfprintf write output to the given output stream; sprintf, + and vsprintf write to the character string str. These + functions write the output under the control of a format + string that specifies how subsequent arguments (or argu- + ments accessed via the variable-length argument facilities + of stdarg(3) are converted for output. These functions + return the number of characters printed (not including the + trailing `\0' used to end output to strings). + + The format string is composed of zero or more directives: + ordinary characters (not %), which are copied unchanged to + the output stream; and conversion specifications, each of + which results in fetching zero or more subsequent argu- + ments. Each conversion specification is introduced by the + character %. The arguments must correspond properly + (after type promotion) with the conversion specifier. + After the %, the following appear in sequence: + + o Zero or more of the following flags: + + # specifying that the value should be con- + verted to an ``alternate form''. For c, d, + i, n, p, s, and u conversions, this option + has no effect. For o conversions, the pre- + cision of the number is increased to force + the first character of the output string to + a zero (except if a zero value is printed + with an explicit precision of zero). For x + and X conversions, a non-zero result has the + string `0x' (or `0X' for X conversions) + prepended to it. For e, E, f, g, and G con- + versions, the result will always contain a + + + +

BSD MANPAGE 29 November 1993 1 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + decimal point, even if no digits follow it + (normally, a decimal point appears in the + results of those conversions only if a digit + follows). For g and G conversions, trailing + zeros are not removed from the result as + they would otherwise be. + + 0 specifying zero padding. For all conver- + sions except n, the converted value is + padded on the left with zeros rather than + blanks. If a precision is given with a + numeric conversion (d, i, o, u, i, x, and + X), the 0 flag is ignored. + + - (a negative field width flag) indicates the + converted value is to be left adjusted on + the field boundary. Except for n conver- + sions, the converted value is padded on the + right with blanks, rather than on the left + with blanks or zeros. A - overrides a 0 if + both are given. + + (a space) specifying that a blank should be + left before a positive number produced by a + signed conversion (d, e, E, f, g, G, or i). + + + specifying that a sign always be placed + before a number produced by a signed conver- + sion. A + overrides a space if both are + used. + + o An optional decimal digit string specifying a mini- + mum field width. If the converted value has fewer + characters than the field width, it will be padded + with spaces on the left (or right, if the left- + adjustment flag has been given) to fill out the + field width. + + o An optional precision, in the form of a period + (`.') followed by an optional digit string. If + the digit string is omitted, the precision is taken + as zero. This gives the minimum number of digits + to appear for d, i, o, u, x, and X conversions, the + number of digits to appear after the decimal-point + for e, E, and f conversions, the maximum number of + significant digits for g and G conversions, or the + maximum number of characters to be printed from a + string for s conversions. + + o The optional character h, specifying that a follow- + ing d, i, o, u, x, or X conversion corresponds to a + short int or unsigned short int argument, or that a + following n conversion corresponds to a pointer to + a short int argument. + + + +

BSD MANPAGE 29 November 1993 2 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + o The optional character l (ell) specifying that a + following d, i, o, u, x, or X conversion applies to + a pointer to a long int or unsigned long int argu- + ment, or that a following n conversion corresponds + to a pointer to a long int argument. + + o The character L specifying that a following e, E, + f, g, or G conversion corresponds to a long double + argument. + + o A character that specifies the type of conversion + to be applied. + + A field width or precision, or both, may be indicated by + an asterisk `*' instead of a digit string. In this case, + an int argument supplies the field width or precision. A + negative field width is treated as a left adjustment flag + followed by a positive field width; a negative precision + is treated as though it were missing. + + The conversion specifiers and their meanings are: + + diouxX The int (or appropriate variant) argument is con- + verted to signed decimal (d and i), unsigned octal + (o, unsigned decimal (u, or unsigned hexadecimal (x + and X) notation. The letters abcdef are used for x + conversions; the letters ABCDEF are used for X con- + versions. The precision, if any, gives the minimum + number of digits that must appear; if the converted + value requires fewer digits, it is padded on the + left with zeros. + + DOU The long int argument is converted to signed deci- + mal, unsigned octal, or unsigned decimal, as if the + format had been ld, lo, or lu respectively. These + conversion characters are deprecated, and will + eventually disappear. + + eE The double argument is rounded and converted in the + style [-]d.dddedd where there is one digit before + the decimal-point character and the number of dig- + its after it is equal to the precision; if the pre- + cision is missing, it is taken as 6; if the preci- + sion is zero, no decimal-point character appears. + An E conversion uses the letter E (rather than e) + to introduce the exponent. The exponent always + contains at least two digits; if the value is zero, + the exponent is 00. + + f The double argument is rounded and converted to + decimal notation in the style [-]ddd.ddd, where the + number of digits after the decimal-point character + is equal to the precision specification. If the + precision is missing, it is taken as 6; if the + + + +

BSD MANPAGE 29 November 1993 3 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + precision is explicitly zero, no decimal-point + character appears. If a decimal point appears, at + least one digit appears before it. + + g The double argument is converted in style f or e + (or E for G conversions). The precision specifies + the number of significant digits. If the precision + is missing, 6 digits are given; if the precision is + zero, it is treated as 1. Style e is used if the + exponent from its conversion is less than -4 or + greater than or equal to the precision. Trailing + zeros are removed from the fractional part of the + result; a decimal point appears only if it is fol- + lowed by at least one digit. + + c The int argument is converted to an unsigned char, + and the resulting character is written. + + s The ``char *'' argument is expected to be a pointer + to an array of character type (pointer to a + string). Characters from the array are written up + to (but not including) a terminating NUL character; + if a precision is specified, no more than the num- + ber specified are written. If a precision is + given, no null character need be present; if the + precision is not specified, or is greater than the + size of the array, the array must contain a termi- + nating NUL character. + + p The ``void *'' pointer argument is printed in hex- + adecimal (as if by %#x or %#lx). + + n The number of characters written so far is stored + into the integer indicated by the ``int *'' (or + variant) pointer argument. No argument is con- + verted. + + % A `%' is written. No argument is converted. The + complete conversion specification is `%%'. + + In no case does a non-existent or small field width cause + truncation of a field; if the result of a conversion is + wider than the field width, the field is expanded to con- + tain the conversion result. + + +

EXAMPLES +

To print a date and time in the form `Sunday, July 3, + 10:02', where weekday and month are pointers to strings: + #include <stdio.h> + fprintf(stdout, "%s, %s %d, %.2d:%.2d\n", + weekday, month, day, hour, min); + + To print to five decimal places: + + + +

BSD MANPAGE 29 November 1993 4 +

+ + + + +

PRINTF(3) Linux Programmer's Manual PRINTF(3) +

+ + #include <math.h> + #include <stdio.h> + fprintf(stdout, "pi = %.5f\n", 4 * atan(1.0)); + + To allocate a 128 byte string and print into it: + #include <stdio.h> + #include <stdlib.h> + #include <stdarg.h> + char *newfmt(const char *fmt, ...) + { + char *p; + va_list ap; + if ((p = malloc(128)) == NULL) + return (NULL); + va_start(ap, fmt); + (void) vsnprintf(p, 128, fmt, ap); + va_end(ap); + return (p); + } + +
+
+

SEE ALSO +

+printf, +scanf, +

+
+

STANDARDS +

The fprintf, printf, sprintf, vprintf, vfprintf, and + vsprintf functions conform to ANSI C3.159-1989 (``ANSI + C''). + +

BUGS +

Some floating point conversions under Linux cause memory + leaks. + + The conversion formats %D, %O, and %U are not standard and + are provided only for backward compatibility. These may + not be provided under Linux. + + The effect of padding the %p format with zeros (either by + the 0 flag or by specifying a precision), and the benign + effect (i.e., none) of the # flag on %n and %p conver- + sions, as well as other nonsensical combinations such as + %Ld, are not standard; such combinations should be + avoided. + + Because sprintf and vsprintf assume an infinitely long + string, callers must be careful not to overflow the actual + space; this is often impossible to assure. + + + + + + + + + + + +

BSD MANPAGE 29 November 1993 5 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/wcstombs.htm b/reference/C/MAN/wcstombs.htm new file mode 100644 index 0000000..808d7aa --- /dev/null +++ b/reference/C/MAN/wcstombs.htm @@ -0,0 +1,100 @@ +wcstombs + +
+
+
+
+
+

WCSTOMBS(3) Linux Programmer's Manual WCSTOMBS(3) +

+ +

NAME +

wcstombs - convert a wide character string to a multibyte + character string. + +

SYNOPSIS +

#include <stdlib.h> + + size_t wcstombs(char *s, const wchar_t *pwcs, size_t n); + +

DESCRIPTION +

The wcstombs() function converts a sequence of wide char- + acters from the array pwcs into a sequence of multibyte + characters and stores up to n bytes of multibyte charac- + ters in the array s. + +

RETURN VALUE +

wcstombs() returns the number of bytes stored in s or -1 + if s contains an invalid wide character. + +

CONFORMING TO +

SVID 3, ISO 9899 + +
+
+

SEE ALSO +

+mblen, +mbtowc, +mbstowcs, +wctomb, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 diff --git a/reference/C/MAN/wctomb.htm b/reference/C/MAN/wctomb.htm new file mode 100644 index 0000000..3574ac0 --- /dev/null +++ b/reference/C/MAN/wctomb.htm @@ -0,0 +1,100 @@ +wctomb + +
+
+
+
+
+

WCTOMB(3) Linux Programmer's Manual WCTOMB(3) +

+ +

NAME +

wctomb - convert a wide character to a multibyte charac- + ter. + +

SYNOPSIS +

#include <stdlib.h> + + int wctomb(char *s, wchar_t wchar); + +

DESCRIPTION +

The wctomb() function converts a wide character wchar into + a multibyte character and, if s is not NULL, stores the + multibyte character representation in s. + +

RETURN VALUE +

wctomb() returns the number of bytes in the multibyte + character or -1 if the wide character is not valid. + +

CONFORMING TO +

SVID 3, ISO 9899 + +
+
+

SEE ALSO +

+mblen, +mbstowcs, +mbtowc, +wcstombs, +

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

GNU March 29, 1993 1 +

+ +
+

+


+

+

+ + + + +
+Top + +Master Index + +Keywords + +Functions +
+
+

+


+ +This manual page was brought to you by mjl_man V-2.0 -- cgit v1.2.3-54-g00ecf