X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Flib%2Fcompatglob.c;h=8cf77eaa96447a97c8683aca3702aec8ee261482;hb=b0e0d7757fe7cdc08be0269f37a7193e07fb1bb3;hp=7616b808f01507f2e6f738209a4cf06511661ca4;hpb=ec387a1267f4cac7625cd5b6d1c1f080d39085b3;p=dump.git diff --git a/compat/lib/compatglob.c b/compat/lib/compatglob.c index 7616b80..8cf77ea 100644 --- a/compat/lib/compatglob.c +++ b/compat/lib/compatglob.c @@ -2,8 +2,8 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999 - * + * Stelian Pop , 1999-2000 + * Stelian Pop - AlcĂ´ve , 2000-2002 */ /* @@ -21,11 +21,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -40,8 +36,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: compatglob.c,v 1.2 1999/10/11 13:31:10 stelian Exp $ */ /* @@ -69,7 +63,13 @@ * Number of matches in the current invocation of glob. */ +#ifndef lint +static const char rcsid[] = + "$Id: compatglob.c,v 1.10 2003/10/26 16:05:46 stelian Exp $"; +#endif /* not lint */ + #include +#include #ifndef HAVE_GLOB @@ -359,7 +359,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) * the password file */ if ( -#ifndef __linux__ +#if !defined(__linux__) && !defined(sunos) #ifndef __NETBSD_SYSCALLS issetugid() != 0 || #endif @@ -561,7 +561,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob) static int glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, glob_t *pglob) { - register struct dirent *dp; + struct dirent *dp; DIR *dirp; int err; char buf[MAXPATHLEN]; @@ -596,8 +596,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, glob_t *pg else readdirfunc = readdir; while ((dp = (*readdirfunc)(dirp))) { - register u_char *sc; - register Char *dc; + u_char *sc; + Char *dc; /* Initial DOT must be matched literally. */ if (dp->d_name[0] == DOT && *pattern != DOT) @@ -639,8 +639,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, glob_t *pg static int globextend(const Char *path, glob_t *pglob) { - register char **pathv; - register int i; + char **pathv; + int i; u_int newsize; char *copy; const Char *p; @@ -724,8 +724,8 @@ match(Char *name, Char *pat, Char *patend) void globfree(glob_t *pglob) { - register int i; - register char **pp; + int i; + char **pp; if (pglob->gl_pathv != NULL) { pp = pglob->gl_pathv + pglob->gl_offs; @@ -803,7 +803,7 @@ g_strcat(Char *dst, const Char *src) static void g_Ctoc(const Char *str, char *buf) { - register char *dc; + char *dc; for (dc = buf; (*dc++ = *str++) != EOS;) continue; @@ -813,7 +813,7 @@ g_Ctoc(const Char *str, char *buf) static void qprintf(const char *str, Char *s) { - register Char *p; + Char *p; (void)printf("%s:\n", str); for (p = s; *p; p++)