* Copyright 2008-2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SHADOW_H_
#define _SHADOW_H_
#include <stddef.h>
#include <stdio.h>
struct spwd {
char* sp_namp;
char* sp_pwdp;
int sp_lstchg;
int sp_min;
int sp_max;
int sp_warn;
int sp_inact;
int sp_expire;
int sp_flag;
};
#ifdef __cplusplus
extern "C" {
#endif
extern struct spwd* getspent(void);
extern int getspent_r(struct spwd* spwd, char* buffer, size_t bufferSize,
struct spwd** _result);
extern void setspent(void);
extern void endspent(void);
extern struct spwd* getspnam(const char* name);
extern int getspnam_r(const char* name, struct spwd* spwd, char* buffer,
size_t bufferSize, struct spwd** _result);
extern struct spwd* sgetspent(const char* line);
extern int sgetspent_r(const char* line, struct spwd *spwd, char *buffer,
size_t bufferSize, struct spwd** _result);
extern struct spwd* fgetspent(FILE* file);
extern int fgetspent_r(FILE* file, struct spwd* spwd, char* buffer,
size_t bufferSize, struct spwd** _result);
#ifdef __cplusplus
}
#endif
#endif