Switch rpmio mode checking to use rstreq()

This commit is contained in:
Panu Matilainen 2009-08-31 09:39:16 +03:00
parent a5de0df0cd
commit f9de5ed430
1 changed files with 8 additions and 8 deletions

View File

@ -1750,29 +1750,29 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd));
return fd; return fd;
if (end && *end) { if (end && *end) {
if (!strcmp(end, "fdio")) { if (rstreq(end, "fdio")) {
iof = fdio; iof = fdio;
#if HAVE_ZLIB_H #if HAVE_ZLIB_H
} else if (!strcmp(end, "gzdio")) { } else if (rstreq(end, "gzdio")) {
iof = gzdio; iof = gzdio;
fd = gzdFdopen(fd, zstdio); fd = gzdFdopen(fd, zstdio);
#endif #endif
#if HAVE_BZLIB_H #if HAVE_BZLIB_H
} else if (!strcmp(end, "bzdio")) { } else if (rstreq(end, "bzdio")) {
iof = bzdio; iof = bzdio;
fd = bzdFdopen(fd, zstdio); fd = bzdFdopen(fd, zstdio);
#endif #endif
#if HAVE_LZMA_H #if HAVE_LZMA_H
} else if (!strcmp(end, "xzdio")) { } else if (rstreq(end, "xzdio")) {
iof = xzdio; iof = xzdio;
fd = xzdFdopen(fd, zstdio); fd = xzdFdopen(fd, zstdio);
} else if (!strcmp(end, "lzdio")) { } else if (rstreq(end, "lzdio")) {
iof = lzdio; iof = lzdio;
fd = lzdFdopen(fd, zstdio); fd = lzdFdopen(fd, zstdio);
#endif #endif
} else if (!strcmp(end, "ufdio")) { } else if (rstreq(end, "ufdio")) {
iof = ufdio; iof = ufdio;
} else if (!strcmp(end, "fpio")) { } else if (rstreq(end, "fpio")) {
iof = fpio; iof = fpio;
if (noLibio) { if (noLibio) {
int fdno = Fileno(fd); int fdno = Fileno(fd);
@ -1841,7 +1841,7 @@ FD_t Fopen(const char *path, const char *fmode)
if (stdio[0] == '\0') if (stdio[0] == '\0')
return NULL; return NULL;
if (end == NULL || !strcmp(end, "fdio")) { if (end == NULL || rstreq(end, "fdio")) {
if (_rpmio_debug) if (_rpmio_debug)
fprintf(stderr, "*** Fopen fdio path %s fmode %s\n", path, fmode); fprintf(stderr, "*** Fopen fdio path %s fmode %s\n", path, fmode);
fd = fdOpen(path, flags, perms); fd = fdOpen(path, flags, perms);