Merge branch 'master' into dtdocbook

This commit is contained in:
Liang Chang
2021-12-12 20:01:35 +08:00
143 changed files with 2430 additions and 618 deletions

View File

@@ -2,7 +2,8 @@ MAINTAINERCLEANFILES = Makefile.in
lib_LTLIBRARIES = libDtPamSvc.la
libDtPamSvc_la_SOURCES = PamSvc.c ${top_srcdir}/Dt/PamSvc.h
# the PamSvc.h header file is located in include/Dt/
libDtPamSvc_la_SOURCES = PamSvc.c ${top_srcdir}/include/Dt/PamSvc.h
libDtPamSvc_la_LIBADD = -lpam

View File

@@ -1,58 +0,0 @@
/*
* CDE - Common Desktop Environment
*
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
*
* These libraries and programs are free software; you can
* redistribute them and/or modify them under the terms of the GNU
* Lesser General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* These libraries and programs are distributed in the hope that
* they will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/* $XConsortium: pam_svc.h /main/3 1996/10/30 11:13:40 drk $ */
/*******************************************************************************
**
** "@(#)pam_svc.h 1.4 95/09/12
**
** Copyright 1993, 1994, 1995 Sun Microsystems, Inc. All rights reserved.
**
** This file contains header info related to use of PAM
** (Pluggable Authentication Module) library.
**
*******************************************************************************/
/* *
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
* (c) Copyright 1993, 1994 International Business Machines Corp. *
* (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc. *
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
#ifndef _DT_PAM_SVC_H
#define _DT_PAM_SVC_H
#include <sys/types.h>
#define DT_BAD_GID 29 /* Invalid Group ID */
#define DT_INITGROUP_FAIL 30 /* group IDs init failed */
#define DT_BAD_UID 31 /* Invaid User ID */
/*
* External procedure declarations
*/
extern int _DtAuthentication(char*, char*, char*, char*, char*);
extern int _DtAccounting(char*, char*, char[], char*, char*, pid_t, int, int);
extern int _DtSetCred(char*, char *, uid_t, gid_t);
#endif /* _DT_PAM_SVC_H */

View File

@@ -573,7 +573,8 @@ _DtPrintGetDefaultXPrinterName(
else if((default_printer = getenv("XPRINTER")) != (String)NULL);
else if((default_printer = getenv("PDPRINTER")) != (String)NULL);
else if((default_printer = getenv("LPDEST")) != (String)NULL);
else if((default_printer = getenv("PRINTER")) != (String)NULL);
else if((default_printer = getenv("PRINTER")) != (String)NULL)
;
/*
* return a copy of the printer name
*/

View File

@@ -121,7 +121,7 @@ int dbn /* Database number */
goto quit;
/* ensure record not already connected to set */
if ( ! crmp.owner == NULL_DBA ) {
if ( ! (crmp.owner == NULL_DBA) ) {
stat = dberr(S_ISOWNED);
goto quit;
}

View File

@@ -65,10 +65,10 @@ unsigned strhash(const char *p)
while (*p != '\0')
{
h = (h << 4) + (unsigned)CHARADV(p);
if (g = h & ((unsigned)0xF << BITS(unsigned) - 4))
if ((g = h) & ((unsigned)0xF << (BITS(unsigned) - 4)))
{
h ^= g >> BITS(unsigned) - 4;
h ^= g;
h ^= g >> (BITS(unsigned) - 4);
h ^= g;
}
}
return h;
@@ -93,10 +93,10 @@ unsigned strhashi(const char *p)
h = (h << 4) + (unsigned)tolower(*p++);
}
if (g = h & ((unsigned)0xF << BITS(unsigned) - 4))
if ((g = h) & ((unsigned)0xF << (BITS(unsigned) - 4)))
{
h ^= g >> BITS(unsigned) - 4;
h ^= g;
h ^= g >> (BITS(unsigned) - 4);
h ^= g;
}
}
return h;

View File

@@ -149,7 +149,7 @@ _GetMwmWindow(
}
}
if (rcode == Success);
if (rcode == Success)
{
*pMwmWindow = pWmInfo->wmWindow;
}

View File

@@ -100,7 +100,7 @@ add_message(const _Tt_s_message_ptr &m)
{
_Tt_xdr_version xvers(_version);
if (! _flags&(1<<_TT_PROC_ACTIVE)) {
if (! (_flags&(1<<_TT_PROC_ACTIVE))) {
_tt_syslog(0, LOG_ERR,
catgets(_ttcatd, 2, 4,
"A ToolTalk client died before it "