From c7bb19c55c7a902e25bdd33b0d49a2ddcf62e07a Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 22 Dec 2012 21:38:26 +0000 Subject: update C coding style to a more commonly used style git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c --- compat/pam_compat.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'compat/pam_compat.h') diff --git a/compat/pam_compat.h b/compat/pam_compat.h index 4109b77..ac94986 100644 --- a/compat/pam_compat.h +++ b/compat/pam_compat.h @@ -1,7 +1,7 @@ /* pam_compat.h - provide a replacement definitions for some pam functions - Copyright (C) 2009, 2010 Arthur de Jong + Copyright (C) 2009, 2010, 2011, 2012 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -48,32 +48,35 @@ /* define our own replacement pam_get_authtok() if it wasn't found */ #ifndef HAVE_PAM_GET_AUTHTOK -int pam_get_authtok(pam_handle_t *pamh,int item,const char **authtok,const char *prompt); +int pam_get_authtok(pam_handle_t *pamh, int item, const char **authtok, + const char *prompt); #endif /* not HAVE_PAM_GET_AUTHTOK */ /* replace pam_prompt() if needed */ #ifndef HAVE_PAM_PROMPT -int pam_prompt(pam_handle_t *pamh,int style,char **response,const char *format,...) - LIKE_PRINTF(4,5); +int pam_prompt(pam_handle_t *pamh, int style, char **response, + const char *format, ...) + LIKE_PRINTF(4, 5); #endif /* not HAVE_PAM_PROMPT */ /* provide pam_info() if needed */ #ifndef pam_info -#define pam_info(pamh,format...) \ - pam_prompt(pamh,PAM_TEXT_INFO,NULL,##format) +#define pam_info(pamh, format...) \ + pam_prompt(pamh, PAM_TEXT_INFO, NULL, ##format) #endif /* not pam_info */ /* provide pam_error() if needed */ #ifndef pam_error -#define pam_error(pamh,format...) \ - pam_prompt(pamh,PAM_ERROR_MSG,NULL,##format) +#define pam_error(pamh, format...) \ + pam_prompt(pamh, PAM_ERROR_MSG, NULL, ##format) #endif /* not pam_error */ /* fall back to using getpwnam() if pam_modutil_getpwnam() isn't defined */ #ifndef HAVE_PAM_MODUTIL_GETGWNAM #include #include -#define pam_modutil_getpwnam(pamh,user) getpwnam(user) +#define pam_modutil_getpwnam(pamh, user) \ + getpwnam(user) #endif /* not HAVE_PAM_MODUTIL_GETGWNAM */ /* fall back to using syslog() if pam_syslog() doesn't exist */ @@ -81,8 +84,8 @@ int pam_prompt(pam_handle_t *pamh,int style,char **response,const char *format,. #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif /* not LOG_AUTHPRIV */ -#define pam_syslog(pamh,priority,format...) \ - syslog(LOG_AUTHPRIV|(priority),##format) +#define pam_syslog(pamh, priority, format...) \ + syslog(LOG_AUTHPRIV|(priority), ##format) #endif /* not HAVE_PAM_SYSLOG */ #endif /* _COMPAT_LDAP_COMPAT_H */ -- cgit v1.2.3