X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblutil%2Fgetopt.c;h=5e4e02273c3c9ac327666da239a6289246bfeac9;hb=ced581bfa3f7029af4d3d743fa054922cf0a4e42;hp=1727aaf64166c5c02ac5251f5d261b6215884c90;hpb=6939c531700652491f4be4688c6a1f35a1ab8a18;p=openldap
diff --git a/libraries/liblutil/getopt.c b/libraries/liblutil/getopt.c
index 1727aaf641..5e4e02273c 100644
--- a/libraries/liblutil/getopt.c
+++ b/libraries/liblutil/getopt.c
@@ -1,14 +1,24 @@
+/* getopt.c -- replacement getopt(3) routines */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Portions Copyright 1998-2003 Kurt D. Zeilenga.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
+ */
+/* This work is based upon the public-domain getopt(3) routines
+ * developed by AT&T. Modified by Kurt D. Zeilenga for inclusion
+ * into OpenLDAP Software. Significant contributors include:
+ * Howard Chu
*/
-/*
- getopt.c
-
- modified public-domain AT&T getopt(3)
- modified by Kurt Zeilenga for inclusion into OpenLDAP
-*/
#include "portable.h"
@@ -90,7 +100,7 @@ printf("DF_TRACE_DEBUG: int getopt () in getopt.c\n");
optopt = (int) c;
if (c == arg || (cp = strchr(opts,c)) == NULL)
{
- ERR(argv,": illegal option--",c);
+ ERR(argv,_(": illegal option--"),c);
if (argv[optind][++sp] == eos)
{
optind++;
@@ -104,7 +114,7 @@ printf("DF_TRACE_DEBUG: int getopt () in getopt.c\n");
optarg = &argv[optind++][sp + 1];
else if (++optind >= argc)
{
- ERR(argv,": option requires an argument--",c);
+ ERR(argv,_(": option requires an argument--"),c);
sp = 1;
return error;
}