version 1.12, 2019/01/26 10:58:54 |
version 1.13, 2021/09/02 21:09:29 |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
|
#include <sys/param.h> |
|
#include <sys/queue.h> |
#include <sys/queue.h> |
#include <sys/socket.h> |
#include <sys/socket.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
|
|
#define LDIF_LINELENGTH 79 |
#define LDIF_LINELENGTH 79 |
#define LDAPPASSMAX 1024 |
#define LDAPPASSMAX 1024 |
|
|
|
#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) |
|
|
struct ldapc { |
struct ldapc { |
struct aldap *ldap_al; |
struct aldap *ldap_al; |
char *ldap_host; |
char *ldap_host; |
|
|
if (outlen > LDIF_LINELENGTH) |
if (outlen > LDIF_LINELENGTH) |
outlen--; |
outlen--; |
/* max. line length - newline - optional indent */ |
/* max. line length - newline - optional indent */ |
left = MIN(inlen - outlen, outlen ? |
left = MINIMUM(inlen - outlen, outlen ? |
LDIF_LINELENGTH - 2 : |
LDIF_LINELENGTH - 2 : |
LDIF_LINELENGTH - 1); |
LDIF_LINELENGTH - 1); |
fwrite(p + outlen, left, 1, stdout); |
fwrite(p + outlen, left, 1, stdout); |