BAN-AI-Communications/k95-mingw

View on GitHub
k95source/ckupty.c

Summary

Maintainability
Test Coverage
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* C K U P T Y -- C-Kermit pseudoterminal control functions for UNIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Copyright 1995 by the Massachusetts Institute of Technology.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Permission to use, copy, modify, and distribute this software and its
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
documentation for any purpose and without fee is hereby granted, provided
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
that the above copyright notice appear in all copies and that both that
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
copyright notice and this permission notice appear in supporting
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
documentation, and that the name of M.I.T. not be used in advertising or
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
publicity pertaining to distribution of the software without specific,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
written prior permission. Furthermore if you modify this software you must
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
label your software as modified software and not distribute it in such a
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
fashion that it might be confused with the original M.I.T. software.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
M.I.T. makes no representations about the suitability of this software for
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
any purpose. It is provided "as is" without express or implied warranty.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Modified for use in C-Kermit, and new material added, by:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Jeffrey Altman <jaltman@secure-endpoints.com>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Secure Endpoints Inc., New York City
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
November 1999
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Built and tested successully on:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. 4.4BSD, including BSDI/OS, NetBSD, FreeBSD, OpenBSD, Mac OS X
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. AIX 4.1 and later
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. DG/UX 5.4R4.11
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. Digital UNIX 3.2 and 4.0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. HP-UX 9.00 and later
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. IRIX 6.0 and later
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. Linux
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. NeXTSTEP 3.x
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. QNX 4.25 (except PTY process termination not detected)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. SCO OSR5.0.5
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. SCO Unixware 7
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. SINIX 5.42
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. Solaris 2.x and 7
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. SunOS 4.1.3
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Included but not tested yet in:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. Macintosh OSX, OpenBSD, and any other BSD44-based system not listed above
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Failures include:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. SCO UNIX 3.2v4.2 (compile fails with syntax error in <memory.h>)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
. HP-UX 8.00 and earlier (no vhangup or ptsname routines)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include "ckcsym.h"
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include "ckcdeb.h" /* To pick up NETPTY definition */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NETPTY /* Selector for PTY support */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char * ptyver = "No PTY support";
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* (rest of this module...) */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char * ptyver = "PTY support 8.0.014, 20 Aug 2002";
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* These will no doubt need adjustment... */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NEXT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETSID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NEXT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_KILLPG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_TTYNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_WAITPID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef LINUX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef ATTSV
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HPUX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef AIX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef BSD44ORPOSIX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef IRIX60
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef QNX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* QNX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* IRIX60 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* BSD44ORPOSIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* AIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HPUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ATTSV */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* LINUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef QNX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <fcntl.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* QNX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define POSIX_TERMIOS /* Seems to be a misnomer */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef NEXT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef GETPGRP_ONEARG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define GETPGRP_ONEARG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* GETPGRP_ONEARG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NEXT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WANT_UTMP /* See ckupty.h */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
WANT_UTMP is not defined because (a) the utmp/wtmp junk is the most
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
nonportable part of this module, and (b) we're not logging anybody
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
in, we're just running a process, and don't need to write utmp/wtmp records.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_SETUTXENT /* Who has <utmpx.h> */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SOLARIS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef IRIX60
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_SCOV5
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HPUX10
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef UNIXWARE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef IRIX60
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* IRIX60 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* UNIXWARE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HPUX10 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CK_SCOV5 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* IRIX60 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SOLARIS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTXENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_UTHOST /* Does utmp include ut_host[]? */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SETUTXENT /* utmpx always does */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_UTHOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef LINUX /* Linux does */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_UTHOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SUNOS4 /* SunOS does */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_UTHOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef AIX41 /* AIX 4.1 and later do */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_UTHOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* AIX41 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SUNOS4 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* LINUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTXENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UTHOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define NO_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_HOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UT_HOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WANT_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef LINUX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SYS_SELECT_H
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_GETUTENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_SETUTENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_UPDWTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* LINUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HPUX10
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define VHANG_FIRST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTSNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HPUX9
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define VHANG_FIRST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTSNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HPUX9 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HPUX10 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SUNOS4
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define VHANG_FIRST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SUNOS4 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef IRIX60
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE__GETPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* IRIX60 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SINIX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_STREAMS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_GRANTPT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTSNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define PUSH_PTEM
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define PUSH_LDTERM
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define PUSH_TTCOMPAT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SINIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef ultrix
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define MUST_SETPGRP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ultrix */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef QNX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define MUST_SETPGRP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define NO_DEVTTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* QNX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef LINUX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTMX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_GRANTPT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTSNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTMX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_STREAMS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define HAVE_PTMX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_STREAMS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* LINUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include "ckupty.h"
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef PTYNOBLOCK
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef O_NDELAY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef O_NONBLOCK
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define O_NDELAY O_NONBLOCK
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* O_NONBLOCK */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* O_NDELAY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* PTYNOBLOCK */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef O_NDELAY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#undef O_NDELAY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* O_NDELAY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define O_NDELAY 0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* PTYNOBLOCK */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef ONLCR
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define ONLCR 0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ONLCR */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_WAIT_H
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <sys/wait.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CK_WAIT_H */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef STREAMSPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* INIT_SPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <sys/stream.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <stropts.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <termio.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Make sure we don't get the BSD version */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SYS_TTY_H
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include "/usr/include/sys/tty.h"
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SYS_TTY_H */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAS_PTYVAR /* Where is this set? */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <sys/ptyvar.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAS_PTYVAR */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef TIOCPKT_FLUSHWRITE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TIOCPKT_FLUSHWRITE 0x02
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TIOCPKT_NOSTOP 0x10
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TIOCPKT_DOSTOP 0x20
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TIOCPKT_IOCTL 0x40
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCPKT_FLUSHWRITE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAS_PTYVAR */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_TTY_H
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#include <tty.h>
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_TTY_H */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Because of the way ptyibuf is used with streams messages, we need
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyibuf+1 to be on a full-word boundary. The following weirdness
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
is simply to make that happen.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long ptyibufbuf[BUFSIZ/sizeof(long)+1];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *ptyibuf = ((char *)&ptyibufbuf[1])-1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *ptyip = ((char *)&ptyibufbuf[1])-1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char ptyibuf2[BUFSIZ];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
unsigned char ctlbuf[BUFSIZ];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct strbuf strbufc, strbufd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int readstream();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* ! STREAMSPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* I/O data buffers, pointers, and counters. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char ptyibuf[BUFSIZ], *ptyip = ptyibuf;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char ptyibuf2[BUFSIZ];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ! STREAMSPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct termbuf {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct sgttyb sg;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct tchars tc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct ltchars ltc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int state;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int lflags;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} termbuf, termbuf2;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfsetospeed(tp,val) (tp)->sg.sg_ospeed = (val)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfsetispeed(tp,val) (tp)->sg.sg_ispeed = (val)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfgetospeed(tp) (tp)->sg.sg_ospeed
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfgetispeed(tp) (tp)->sg.sg_ispeed
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SYSV_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define termios termio
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SYSV_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef TCSANOW
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TCSETS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSANOW TCSETS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSADRAIN TCSETSW
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define tcgetattr(f, t) ioctl(f, TCGETS, (char *)t)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* TCSETS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TCSETA
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSANOW TCSETA
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSADRAIN TCSETAW
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define tcgetattr(f,t) ioctl(f,TCGETA,(char *)t)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* TCSETA */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSANOW TIOCSETA
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define TCSADRAIN TIOCSETAW
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define tcgetattr(f,t) ioctl(f,TIOCGETA,(char *)t)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TCSETA */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TCSETS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define tcsetattr(f,a,t) ioctl(f,a,t)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfsetospeed(tp,val) (tp)->c_cflag &= ~CBAUD;(tp)->c_cflag|=(val)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CIBAUD
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfsetispeed(tp,val) \
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
(tp)->c_cflag &= ~CIBAUD; (tp)->c_cflag |= ((val)<<IBSHIFT)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfgetispeed(tp) (((tp)->c_cflag & CIBAUD)>>IBSHIFT)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* CIBAUD */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfsetispeed(tp,val) (tp)->c_cflag &= ~CBAUD; (tp)->c_cflag|=(val)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CIBAUD */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TCSANOW */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct termios termbuf, termbuf2; /* pty control structure */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
static int spty = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* INIT_SPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
extern int ttyfd; /* Standard Kermit usage */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
static int msg = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* termbuf routines (begin) */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
init_termbuf()
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
copy_termbuf(cp)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
set_termbuf()
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
These three routines are used to get and set the "termbuf" structure
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
to and from the kernel. init_termbuf() gets the current settings.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
copy_termbuf() hands in a new "termbuf" to write to the kernel, and
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
set_termbuf() writes the structure into the kernel.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
init_termbuf() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int rc = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memset(&termbuf,0,sizeof(termbuf));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memset(&termbuf2,0,sizeof(termbuf2));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = ioctl(ttyfd, TIOCGETP, (char *)&termbuf.sg);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc |= ioctl(ttyfd, TIOCGETC, (char *)&termbuf.tc);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc |= ioctl(ttyfd, TIOCGLTC, (char *)&termbuf.ltc);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCGSTATE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc |= ioctl(ttyfd, TIOCGSTATE, (char *)&termbuf.state);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCGSTATE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = tcgetattr(spty, &termbuf);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"init_termbuf() tcgetattr(spty)",ckitoa(rc),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = tcgetattr(ttyfd, &termbuf);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"init_termbuf() tcgetattr(ttyfd)",ckitoa(rc),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* INIT_SPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!rc)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf2 = termbuf;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCPKT_IOCTL
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
copy_termbuf(cp, len) char *cp; int len; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (len > sizeof(termbuf))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
len = sizeof(termbuf);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memcpy((char *)&termbuf, cp, len);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf2 = termbuf;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCPKT_IOCTL */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
set_termbuf() { /* Only make the necessary changes. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (memcmp((char *)&termbuf.sg, (char *)&termbuf2.sg, sizeof(termbuf.sg)))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(ttyfd, TIOCSETN, (char *)&termbuf.sg);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (memcmp((char *)&termbuf.tc, (char *)&termbuf2.tc, sizeof(termbuf.tc)))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(ttyfd, TIOCSETC, (char *)&termbuf.tc);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (memcmp((char *)&termbuf.ltc, (char *)&termbuf2.ltc,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sizeof(termbuf.ltc)))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(ttyfd, TIOCSLTC, (char *)&termbuf.ltc);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (termbuf.lflags != termbuf2.lflags)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(ttyfd, TIOCLSET, (char *)&termbuf.lflags);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (memcmp((char *)&termbuf, (char *)&termbuf2, sizeof(termbuf))) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int x;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
x = tcsetattr(spty, TCSANOW, &termbuf);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"set_termbuf tcsetattr(spty)",ckitoa(x),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
x = tcsetattr(ttyfd, TCSANOW, &termbuf);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"set_termbuf tcsetattr(ttyfd)",ckitoa(x),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* INIT_SPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* termbuf routines (end) */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_vhangup() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_VHANGUP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_POSIX_SIG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct sigaction sa;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Initialize "sa" structure. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigemptyset(&sa.sa_mask);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sa.sa_flags = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sa.sa_handler = SIG_IGN;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigaction(SIGHUP, &sa, (struct sigaction *)0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
vhangup();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sa.sa_handler = SIG_DFL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigaction(SIGHUP, &sa, (struct sigaction *)0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* CK_POSIX_SIG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
signal(SIGHUP,SIG_IGN);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
vhangup();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
signal(SIGHUP,SIG_DFL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CK_POSIX_SIG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CK_VHANGUP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
This routine is called twice. It's not particularly important that the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setsid() or TIOCSTTY ioctls succeed (they may not the second time), but
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rather that we have a controlling terminal at the end. It is assumed that
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
vhangup doesn't exist and confuse the process's notion of controlling
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
terminal on any system without TIOCNOTTY. That is, either vhangup() leaves
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
the controlling terminal in tact, breaks the association completely, or the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
system provides TIOCNOTTY to get things back into a reasonable state. In
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
practice, vhangup() either breaks the association completely or doesn't
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
effect controlling terminals, so this condition is met.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_void_association() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int con_fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SETSID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ptyint_void_association()",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"setsid()",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setsid();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETSID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_DEVTTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Void tty association first */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCNOTTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
con_fd = open("/dev/tty", O_RDWR);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ptyint_void_association() open(/dev/tty,O_RDWR)",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"/dev/tty",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
con_fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (con_fd >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(con_fd, TIOCNOTTY, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(con_fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef DEBUG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else debug(F101, "ptyint_void_association() open() errno","",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* DEBUG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCNOTTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_DEVTTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* PID may be zero for unknown.*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_cleanup(slave, pid, update_utmp) char *slave; int pid; int update_utmp; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef VHANG_LAST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int retval, fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* VHANG_LAST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_cleanup()",slave,pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WANT_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (update_utmp)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_update_utmp(PTY_DEAD_PROCESS,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
0,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slave,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
(char *)0,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
PTY_UTMP_USERNAME_VALID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WANT_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SETUID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
chmod(slave, 0666);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
chown(slave, 0, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SETUID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_REVOKE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
revoke(slave);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Revoke isn't guaranteed to send a SIGHUP to the processes it
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
dissociates from the terminal. The best solution without a Posix
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
mechanism for forcing a hangup is to killpg() the process group of the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty. This will at least kill the shell and hopefully, the child
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
processes. This is not always the case, however. If the shell puts
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
each job in a process group and doesn't pass along SIGHUP, all
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
processes may not die.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (pid > 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_KILLPG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
killpg(pid, SIGHUP);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
kill(-(pid), SIGHUP);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*HAVE_KILLPG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE_REVOKE*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef VHANG_LAST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
{
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int status;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_POSIX_SIG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigset_t old, new;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigemptyset(&new);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigaddset(&new, SIGCHLD);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigprocmask(SIG_BLOCK, &new, &old);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int mask = sigblock(sigmask(SIGCHLD));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
switch (retval = fork()) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case -1:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_POSIX_SIG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigprocmask(SIG_SETMASK, &old, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigsetmask(mask);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return errno;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case 0:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_void_association();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (retval = (pty_open_ctty(slave, &fd)))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
exit(retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_vhangup();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
exit(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
default:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_WAITPID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
waitpid(retval, &status, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /*HAVE_WAITPID*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
wait(&status);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_WAITPID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_POSIX_SIG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigprocmask(SIG_SETMASK, &old, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigsetmask(mask);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*CK_POSIX_SIG*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*VHANG_LAST*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_REVOKE*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_STREAMS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slave[strlen("/dev/")] = 'p';
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SETUID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
chmod(slave, 0666);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
chown(slave, 0, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SETUID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_STREAMS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_getpty(fd, slave, slavelength) int slavelength; int *fd; char *slave; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *cp;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *p;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int i, ptynum;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct stat stb;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_OPENPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE__GETPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char slavebuf[1024];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE__GETPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_OPENPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE__GETPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *slaveret; /* Temp to hold pointer to slave */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*HAVE__GETPTY*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_OPENPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int slavefd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_OPENPTY","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (openpty(fd,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
&slavefd,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slave,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
(struct termios *)0,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
(struct winsize *)0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(slavefd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE_OPENPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE__GETPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
This code is included for Irix; as of version 5.3, Irix has /dev/ptmx, but
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
it fails to work properly; even after calling unlockpt, root gets permission
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
denied opening the pty. The code to support _getpty should be removed if
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Irix gets working streams ptys in favor of maintaining the least needed code
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
paths.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE__GETPTY","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((slaveret = _getpty(fd, O_RDWR | O_NDELAY, 0600, 0)) == 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_NOPTY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (strlen(slaveret) > slavelength - 1) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_SLAVE_TOOLONG);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckstrncpy(slave, slaveret, slavelength);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE__GETPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open("/dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty()","open(/dev/ptym/clone) success",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
goto have_fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTMX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_PTMX","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open("/dev/ptmx",O_RDWR|O_NDELAY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty()","open(/dev/ptmx) success",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
goto have_fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTMX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open("/dev/ptc", O_RDWR|O_NDELAY); /* AIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty()","open(/dev/ptc) success",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
goto have_fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open("/dev/pty", O_RDWR|O_NDELAY); /* sysvimp */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd >= 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty()","open(/dev/pty) success",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
have_fd:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_GRANTPT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTMX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_GRANTPT","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (grantpt(*fd) || unlockpt(*fd))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_STREAMS);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTMX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_GRANTPT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTSNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_PTSNAME","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
p = (char *)ptsname(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty() ptsname()",p,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_TTYNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_TTYNAME","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
p = ttyname(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty() ttyname()",p,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* XXX If we don't have either what do we do? */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_NOPTY); /* punt */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_TTYNAME */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTSNAME */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (p) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (strlen(p) > slavelength - 1) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close (*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_SLAVE_TOOLONG);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckstrncpy(slave, p, slavelength);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (fstat(*fd, &stb) < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_FSTAT);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptynum = (int)(stb.st_rdev&0xFF);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sprintf(slavebuf, "/dev/ttyp%x", ptynum); /* safe */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (strlen(slavebuf) > slavelength - 1) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_SLAVE_TOOLONG);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty() slavebuf",slavebuf,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckstrncpy(slave, slavebuf, slavelength);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
for (cp = "pqrstuvwxyzPQRST";*cp; cp++) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sprintf(slavebuf,"/dev/ptyXX"); /* safe */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slavebuf[sizeof("/dev/pty") - 1] = *cp;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slavebuf[sizeof("/dev/ptyp") - 1] = '0';
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (stat(slavebuf, &stb) < 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
for (i = 0; i < 16; i++) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slavebuf[sizeof("/dev/ptyp") - 1] = "0123456789abcdef"[i];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open(slavebuf, O_RDWR|O_NDELAY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd < 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
continue;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty() found pty master",slavebuf,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slavebuf[sizeof("/dev/") - 1] = 't'; /* got pty */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (strlen(slavebuf) > slavelength -1) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_SLAVE_TOOLONG);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_getpty() slavebuf [2]",slavebuf,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckstrncpy(slave, slavebuf, slavelength);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_GETPTY_NOPTY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*HAVE__GETPTY*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_OPENPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_init() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTYM
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
static char dummy;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"HAVE_PTYM","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tty_bank = &master_name[strlen("/dev/ptym/pty")];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tty_num = &master_name[strlen("/dev/ptym/ptyX")];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slave_bank = &slave_name[strlen("/dev/pty/tty")];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
slave_num = &slave_name[strlen("/dev/pty/ttyX")];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0L);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
The following is an array of modules that should be pushed on the stream.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
See configure.in for caviats and notes about when this array is used and not
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
used.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_STREAMS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_LINE_PUSH
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
static char *push_list[] = {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef PUSH_PTEM
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ptem",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef PUSH_LDTERM
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ldterm",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef PUSH_TTCOMPAT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ttcompat",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
};
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_LINE_PUSH */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_STREAMS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_initialize_slave (fd) int fd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef POSIX_TERMIOS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef ultrix
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct termios new_termio;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct sgttyb b;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ultrix */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct sgttyb b;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* POSIX_TERMIOS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int pid;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef POSIX_TERMIOS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef ultrix
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int rc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ultrix */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* POSIX_TERMIOS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_initialize_slave()","fd",fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_STREAMS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_LINE_PUSH
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
while (ioctl(fd,I_POP,0) == 0) ; /* Clear out any old lined's */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (line_push(fd) < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_initialize_slave()","line_push() failed",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_LINE_PUSHFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /*No line_push */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
{
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char **module = &push_list[0];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
while (*module) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ioctl(fd, I_PUSH, *(module++)) < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_initialize_slave()","ioctl(I_PUSH) failed",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_PUSH_FAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*LINE_PUSH*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*HAVE_STREAMS*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Under Ultrix 3.0, the pgrp of the slave pty terminal needs to be set
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
explicitly. Why rlogind works at all without this on 4.3BSD is a mystery.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef GETPGRP_ONEARG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pid = getpgrp(getpid());
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pid = getpgrp();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* GETPGRP_ONEARG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_initialize_slave()","pid",pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCSPGRP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(fd, TIOCSPGRP, &pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCSPGRP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef POSIX_TERMIOS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef ultrix
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tcsetpgrp(fd, pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = tcgetattr(fd,&new_termio);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_initialize_slave tcgetattr(fd)",ckitoa(rc),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (rc == 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
new_termio.c_cc[VMIN] = 1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
new_termio.c_cc[VTIME] = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = tcsetattr(fd,TCSANOW,&new_termio);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_initialize_slave tcsetattr(fd)",ckitoa(rc),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* ultrix */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* POSIX_TERMIOS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0L);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WANT_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_logwtmp (tty, user, host) char *user, *tty, *host; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_LOGWTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
logwtmp(tty,user,host);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmp ut;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *tmpx;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char utmp_id[5];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int loggingin = user[0]; /* Will be empty for logout */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_host, host, sizeof(ut.ut_host));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_HOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_line, tty, sizeof(ut.ut_line));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_time = time(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_pid = getpid();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_user, user, sizeof(ut.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tmpx = tty + strlen(tty) - 2;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckmakmsg(utmp_id,5,"kr",tmpx,NULL,NULL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_id, utmp_id, sizeof(ut.ut_id));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_pid = (loggingin ? getpid() : 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_type = (loggingin ? USER_PROCESS : DEAD_PROCESS);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_name, user, sizeof(ut.ut_name));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_PID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(ptyint_update_wtmp(&ut, host, user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_LOGWTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WANT_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
This routine is called twice. It's not particularly important that the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setsid() or TIOCSTTY ioctls succeed (they may not the second time), but
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rather that we have a controlling terminal at the end. It is assumed that
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
vhangup doesn't exist and confuse the process's notion of controlling
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
terminal on any system without TIOCNOTTY. That is, either vhangup() leaves
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
the controlling terminal in tact, breaks the association completely, or the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
system provides TIOCNOTTY to get things back into a reasonable state. In
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
practice, vhangup() either breaks the association completely or doesn't
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
effect controlling terminals, so this condition is met.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_open_ctty(slave, fd) char * slave; int *fd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int retval;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_ctty() slave",slave,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* First, dissociate from previous terminal */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((retval = ptyint_void_association()) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"pty_open_ctty()",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ptyint_void_association() failed",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef MUST_SETPGRP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
The Ultrix (and other BSD tty drivers) require the process group
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
to be zero in order to acquire the new tty as a controlling tty.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setpgrp(0,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* MUST_SETPGRP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = open(slave, O_RDWR);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*fd < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_open_ctty() open failure", slave, errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_OPENFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef DEBUG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else if (deblog) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110, "pty_open_ctty() open ok", slave, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* DEBUG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef MUST_SETPGRP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setpgrp(0, getpid());
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* MUST_SETPGRP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCSCTTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval = ioctl(*fd, TIOCSCTTY, 0); /* Don't check return.*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_open_ctty() ioctl TIOCSCTTY",ckitoa(retval),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCSTTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0L);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_open_slave(slave, fd) char *slave; int *fd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int vfd, testfd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long retval;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CK_POSIX_SIG
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct sigaction sa;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sigemptyset(&sa.sa_mask); /* Initialize "sa" structure. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sa.sa_flags = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CK_POSIX_SIG */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
First, chmod and chown the slave. If we have vhangup then we really need
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_open_ctty to make sure our controlling terminal is the pty we're
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
opening. However, if we are using revoke or nothing then we just need a
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
file descriiptor for the pty. Considering some OSes in this category break
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
on the second call to open_ctty (currently OSF but others may), we simply
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
use a descriptor if we can.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef VHANG_FIRST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((retval = pty_open_ctty(slave, &vfd)) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"pty_open_slave() VHANG_FIRST",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"pty_open_ctty() failed",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (vfd < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"pty_open_slave() VHANG_FIRST",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"PTY_OPEN_SLAVE_OPENFAIL",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
vfd
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_OPENFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* VHANG_FIRST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (slave == NULL || *slave == '\0') {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_slave()","PTY_OPEN_SLAVE_TOOSHORT",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_TOOSHORT);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SETUID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (chmod(slave, 0)) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_slave()","PTY_OPEN_SLAVE_CHMODFAIL",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_CHMODFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (chown(slave, 0, 0 ) == -1 ) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_slave()","PTY_OPEN_SLAVE_CHOWNFAIL",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_CHOWNFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SETUID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef VHANG_FIRST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_vhangup();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(vfd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* VHANG_FIRST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((retval = ptyint_void_association()) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"pty_open_slave()",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"ptyint_void_association() failed",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_REVOKE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (revoke (slave) < 0 ) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_slave()","PTY_OPEN_SLAVE_REVOKEFAIL",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_REVOKEFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_REVOKE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Open the pty for real. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval = pty_open_ctty(slave, fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (retval != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_open_slave()","pty_open_ctty() failed",retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_OPENFAIL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
retval = pty_initialize_slave(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (retval) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_open_slave()","pty_initialize_slave() failed",retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_DEVTTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
testfd = open("/dev/tty", O_RDWR|O_NDELAY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (testfd < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_open_slave() open failed","/dev/tty",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(*fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*fd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_OPEN_SLAVE_NOCTTY);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(testfd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_DEVTTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_open_slave()","success",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0L);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WANT_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef UTMP_FILE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef _PATH_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define UTMP_FILE _PATH_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* _PATH_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* UTMP_FILE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* If it is *still* missing, assume /etc/utmp */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef UTMP_FILE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define UTMP_FILE "/etc/utmp"
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* UTMP_FILE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define WTMP_REQUIRES_USERNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_PID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_update_utmp(process_type, pid, username, line, host, flags)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int process_type;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int pid;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *username, *line, *host;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int flags;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* pty_update_utmp */ {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmp ent, ut;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_SETUTENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct stat statb;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int tty;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmpx utx;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTXENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char *tmpx;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char utmp_id[5];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_PID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char userbuf[32];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"pty_update_utmp()","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_line, line+sizeof("/dev/")-1, sizeof(ent.ut_line));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_time = time(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (process_type == PTY_LOGIN_PROCESS)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0L);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* NO_UT_PID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_pid = pid;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
switch (process_type) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case PTY_LOGIN_PROCESS:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_type = LOGIN_PROCESS;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case PTY_USER_PROCESS:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_type = USER_PROCESS;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case PTY_DEAD_PROCESS:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_type = DEAD_PROCESS;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
default:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(PTY_UPDATE_UTMP_PROCTYPE_INVALID);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /*NO_UT_PID*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (host)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_host, host, sizeof(ent.ut_host));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ent.ut_host[0] = '\0';
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_HOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_PID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!strcmp (line, "/dev/console")) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char * s = NULL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef sun
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef __SVR4
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
s = "co";
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
s = "cons";
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __SVR4 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
s = "cons";
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* sun */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_id, s, 4);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tmpx = line + strlen(line)-1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (*(tmpx-1) != '/') tmpx--; /* last 2 chars unless it's a '/' */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef __hpux
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckstrncpy(utmp_id, tmpx, 5);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ckmakmsg(utmp_id,5,"kl",tmpx,NULL,NULL);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_id, utmp_id, sizeof(ent.ut_id));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_user, username, sizeof(ent.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ent.ut_name, username, sizeof(ent.ut_name));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_PID */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (username[0])
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(userbuf, username, sizeof(userbuf));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
userbuf[0] = '\0';
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SETUTENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utmpname(UTMP_FILE);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setutent();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
If we need to preserve the user name in the wtmp structure and Our flags
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tell us we can obtain it from the utmp and we succeed in obtaining it, we
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
then save the utmp structure we obtain, write out the utmp structure and
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
change the username pointer so it is used by update_wtmp.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WTMP_REQUIRES_USERNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((!username[0]) && (flags&PTY_UTMP_USERNAME_VALID) &&line) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmp *utptr;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_line, line, sizeof(ut.ut_line));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utptr = getutline(&ut);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (utptr)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(userbuf,utptr->ut_user,sizeof(ut.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WTMP_REQUIRES_USERNAME */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pututline(&ent);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
endutent();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_SETUTXENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
setutxent();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_GETUTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
getutmpx(&ent, &utx);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE_GETUTMPX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* For platforms like HPUX and Dec Unix which don't have getutmpx */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_user, ent.ut_user, sizeof(ent.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_id, ent.ut_id, sizeof(ent.ut_id));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_line, ent.ut_line, sizeof(ent.ut_line));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_pid = pid; /* kludge for Irix, etc. to avoid trunc. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_type = ent.ut_type;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef UT_EXIT_STRUCTURE_DIFFER
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_exit.ut_exit = ent.ut_exit.e_exit;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* UT_EXIT_STRUCTURE_DIFFER */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* KLUDGE for now; eventually this will be a feature test... See PR#[40] */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef __hpux
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_exit.__e_termination = ent.ut_exit.e_termination;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_exit.__e_exit = ent.ut_exit.e_exit;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* XXX do nothing for now; we don't even know the struct member exists */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* UT_EXIT_STRUCTURE_DIFFER */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_tv.tv_sec = ent.ut_time;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_tv.tv_usec = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_GETUTMPX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (host)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_host, host, sizeof(utx.ut_host));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_host[0] = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pututxline(&utx);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
endutxent();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTXENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE_SETUTENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (flags&PTY_TTYSLOT_USABLE) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tty = ttyslot();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int lc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tty = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((fd = open(UTMP_FILE, O_RDWR)) < 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
for (lc = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
lseek(fd, (off_t)(lc * sizeof(struct utmp)), SEEK_SET) != -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
lc++
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (read(fd,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
(char *)&ut,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sizeof(struct utmp)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
) != sizeof(struct utmp)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (strncmp(ut.ut_line, ent.ut_line, sizeof(ut.ut_line)) == 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
tty = lc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WTMP_REQUIRES_USERNAME
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!username&&(flags&PTY_UTMP_USERNAME_VALID))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(userbuf, ut.ut_user, sizeof(ut.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WTMP_REQUIRES_USERNAME */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (tty > 0 && (fd = open(UTMP_FILE, O_WRONLY, 0)) >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
write(fd, (char *)&ent, sizeof(struct utmp));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_SETUTENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Don't record LOGIN_PROCESS entries. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (process_type == PTY_LOGIN_PROCESS)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(ptyint_update_wtmp(&ent, host, userbuf));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef WTMP_FILE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef _PATH_WTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define WTMP_FILE _PATH_WTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* _PATH_WTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WTMP_FILE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef WTMPX_FILE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef _PATH_WTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_UPDWTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define WTMPX_FILE _PATH_WTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UPDWTMPX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* _PATH_WTMPX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WTMPX_FILE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* If it is *still* missing, assume /usr/adm/wtmp */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef WTMP_FILE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define WTMP_FILE "/usr/adm/wtmp"
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WTMP_FILE */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef COMMENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* The following test can not be made portably */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
This is ugly, but the lack of standardization in the utmp/utmpx space, and
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
what glibc implements and doesn't make available, is even worse.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* #undef HAVE_UPDWTMPX */ /* Don't use updwtmpx for glibc 2.1 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* #endif */ /* __GLIBC__ etc */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* COMMENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef __GLIBC__
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#undef HAVE_UPDWTMPX /* Don't use updwtmpx for glibc period */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __GLIBC__ */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* COMMENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ptyint_update_wtmp(ent,host,user) struct utmp *ent; char *host; char *user; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmp ut;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct stat statb;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int fd;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
time_t uttime;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_UPDWTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct utmpx utx;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
getutmpx(ent, &utx);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (host)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_host, host, sizeof(utx.ut_host) );
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
utx.ut_host[0] = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (user)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(utx.ut_user, user, sizeof(utx.ut_user));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
updwtmpx(WTMPX_FILE, &utx);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UPDWTMPX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_UPDWTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef HAVE_UPDWTMPX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* This is already performed byupdwtmpx if present.*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
updwtmp(WTMP_FILE, ent);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UPDWTMPX*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HAVE_UPDWTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!fstat(fd, &statb)) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memset((char *)&ut, 0, sizeof(ut));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef __hpux
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_id, ent->ut_id, sizeof (ut.ut_id));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_line, ent->ut_line, sizeof(ut.ut_line));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_name, ent->ut_name, sizeof(ut.ut_name));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef NO_UT_HOST
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
strncpy(ut.ut_host, ent->ut_host, sizeof(ut.ut_host));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NO_UT_HOST */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
time(&uttime);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_time = uttime;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_GETUTENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef USER_PROCESS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ent->ut_name) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!ut.ut_pid)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_pid = getpid();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef __hpux
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_type = USER_PROCESS;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_type = ent->ut_type;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* __hpux */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef EMPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_type = EMPTY;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ut.ut_type = DEAD_PROCESS; /* For Linux brokenness*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* EMPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USER_PROCESS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_GETUTENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (write(fd, (char *)&ut, sizeof(struct utmp)) !=
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
sizeof(struct utmp))
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef COHERENT
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ftruncate(fd, statb.st_size);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
chsize(fd, statb.st_size);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* COHERENT */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(fd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_UPDWTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0); /* no current failure cases; file not found is not failure!*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WANT_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
static char Xline[17] = { 0, 0 };
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int pty_fork_pid = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
getptyslave()
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Open the slave side of the pty, and do any initialization that is necessary.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
The return value is a file descriptor for the slave side.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
getptyslave() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int t = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long retval;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCGWINSZ
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct winsize ws;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
extern int cmd_rows, cmd_cols;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCGWINSZ */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F100,"getptyslave()","",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* Opening the slave side may cause initilization of the
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* kernel tty structure. We need remember the state of:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* if linemode was turned on
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* terminal window size
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* terminal speed
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
* so that we can reset them if we need to.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((retval = pty_open_slave(Xline, &t)) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
perror(Xline);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg++;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"getptyslave()","Unable to open slave",retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"getptyslave","ttyfd",ttyfd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"getptyslave","t",t);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef INIT_SPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
spty = t;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* INIT_SPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef STREAMSPTY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ioctl(t,I_PUSH,"pckt") < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"getptyslave()","ioctl(I_PUSH) failed",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef _AIX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
fatal("I_PUSH pckt");
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* _AIX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* STREAMSPTY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Set up the tty modes as we like them to be. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
init_termbuf();
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef TIOCGWINSZ
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (cmd_rows || cmd_cols) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memset((char *)&ws, 0, sizeof(ws));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ws.ws_col = cmd_cols;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ws.ws_row = cmd_rows;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ioctl(t, TIOCSWINSZ, (char *)&ws);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* TIOCGWINSZ */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Settings for sgtty based systems */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.sg.sg_flags |= CRMOD|ANYP|ECHO|XTABS;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef OXTABS
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#define OXTABS 0
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* OXTABS */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Settings for UNICOS and HPUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef CRAY
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_oflag = OPOST|ONLCR|TAB3;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag = IGNPAR|ISTRIP|ICRNL|IXON;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_lflag = ISIG|ICANON|ECHO|ECHOE|ECHOK;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_cflag = EXTB|HUPCL|CS8;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* CRAY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HPUX
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_oflag = OPOST|ONLCR|TAB3;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag = IGNPAR|ISTRIP|ICRNL|IXON;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_lflag = ISIG|ICANON|ECHO|ECHOE|ECHOK;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_cflag = EXTB|HUPCL|CS8;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* HPUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef USE_TERMIO
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Settings for all other termios/termio based systems, other than 4.4BSD.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
In 4.4BSD the kernel does the initial terminal setup.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef BSD42
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifndef BSD44
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_lflag |= ECHO|ICANON|IEXTEN|ISIG;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_oflag |= ONLCR|OXTABS|OPOST;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag |= ICRNL|IGNPAR;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_cflag |= HUPCL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag &= ~IXOFF;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* BSD44 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#else /* BSD42 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_lflag |= ECHO|ICANON|IEXTEN|ISIG;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_oflag |= ONLCR|OXTABS|OPOST;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag |= ICRNL|IGNPAR;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_cflag |= HUPCL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
termbuf.c_iflag &= ~IXOFF;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* BSD42 */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* USE_TERMIO */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HPUX */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* CRAY */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
set_termbuf(); /* Set the tty modes, and make this our controlling tty. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (t != 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
dup2(t, 0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (t != 1)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
dup2(t, 1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (t != 2)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
dup2(t, 2);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (t > 2)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(t);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ttyfd > 2) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(ttyfd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ttyfd = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
To be called to determine if a trap is pending on a pty
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if and only if select() cannot be used.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_trap_pending(fd) int fd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int pending;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int rc;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
rc = ioctl(fd, TIOCTRAPSTATUS, (char *)&pending, sizeof(pending));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (rc == 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F101,"pty_trap_pending()","",pending);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(pending);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_trap_pending()","ioctl() failed",rc);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
To be called after select() has returned indicating that an exception is
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
waiting on a pty. It should be called with the file descriptor of the pty.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Returns -1 on error; 0 if pty is still open; 1 if pty has closed.
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_trap_handler(fd) int fd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct request_info ri;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
memset(&ri,0,sizeof(ri));
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ioctl(fd,TIOCREQCHECK,(char *)&ri, sizeof(ri)) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_trap_handler()","ioctl(TIOCREQCHECK) failed",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
switch (ri.request) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case TIOCOPEN:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_trap_handler()","an open() call",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
case TIOCCLOSE:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_trap_handler()","a close() call",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
break;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
default:
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"pty_trap_handler()","an ioctl() call",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
ri.errno_error = EINVAL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ioctl(fd, TIOCREQSET, (char *)&ri,sizeof(ri)) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"pty_trap_handler()","ioctl(TIOCREQSET) failed",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (ri.request == TIOCCLOSE)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
else
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
exec_cmd(s) char * s; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
struct stringarray * q;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char ** args = NULL;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!s) return;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!*s) return;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
q = cksplit(1,0,s,NULL,"\\%[]&$+-/=*^_@!{}/<>|.#~'`:;?",7,0,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (!q) return;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
args = q->a_head + 1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
execvp(args[0],args);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Get a pty, scan input lines. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
do_pty(cmd) char * cmd; {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
long retval;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int syncpipe[2];
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int i;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int x;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg = 0; /* Message counter */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_init(); /* Find an available pty to use. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((retval = pty_getpty(&ttyfd, Xline, 20)) != 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (msg++ == 0)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
perror(Xline);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty()","pty_getpty() fails",retval);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty() Xline",Xline,0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef SIGTTOU
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/*
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Ignoring SIGTTOU keeps the kernel from blocking us. we tweak the tty with
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
an ioctl() (in ttioct() in /sys/tty.c in a BSD kernel)
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
signal(SIGTTOU, SIG_IGN);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* SIGTTOU */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Start up the command on the slave side of the terminal */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (pipe(syncpipe) < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty()","pipe() fails",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
perror("pipe() failed");
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg++;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty()","pipe fails",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if ((i = fork()) < 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* XXX - need to clean up the allocated pty */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
perror("fork() failed");
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg++;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty()","fork fails",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (i) { /* Wait for child before writing to parent side of pty. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
char c;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
int on = 1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(syncpipe[1]);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (read(syncpipe[0], &c, 1) == 0) { /* Slave side died */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
perror("Pipe read() failed");
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg++;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty()","Slave fails to initialize",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(syncpipe[0]);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(-1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_fork_pid = i; /* So we can clean it up later */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F101,"do_pty pty_fork_pid","",pty_fork_pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef HAVE_PTYTRAP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* HPUX does not allow the master to read end of file. */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Therefore, we must determine that the slave has been */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* closed by trapping the call to close(). */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
errno = 0;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
x = ioctl(ttyfd, TIOCTRAP, (char *)&on);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty ioctl(TIOCTRAP)",ckitoa(x),errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* HAVE_PTYTRAP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty()","synchronized - pty_fork_pid",pty_fork_pid);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(syncpipe[0]);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} else {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty()","Slave starts",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (getptyslave() == 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#ifdef WANT_UTMP
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_update_utmp(PTY_USER_PROCESS,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
getpid(),
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
"KERMIT",
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Xline,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
cmd,
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
PTY_TTYSLOT_USABLE
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* WANT_UTMP */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
/* Notify our parent we're ready to continue.*/
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty()","slave synchronizing",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
write(syncpipe[1],"y",1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(syncpipe[0]);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
close(syncpipe[1]);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
exec_cmd(cmd);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F111,"do_pty()","exec_cmd() returns - why?",errno);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
debug(F110,"do_pty()","getptyslave() fails - exiting",0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
exit(1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
return(0);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
} /* end of do_pty() */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
 
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
VOID
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
end_pty() {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
msg = 0; /* Message counter */
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
if (Xline[0] && pty_fork_pid >= 0) {
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_cleanup(Xline,pty_fork_pid,1);
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
Xline[0] = '\0';
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
pty_fork_pid = -1;
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
}
Too many #ifdef configurations - cppcheck only checks 12 of 292 configurations. Use --force to check all configurations.
#endif /* NETPTY */