cd9660_util.c (256281) | cd9660_util.c (278060) |
---|---|
1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). Joliet support was added by --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)cd9660_util.c 8.3 (Berkeley) 12/5/94 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). Joliet support was added by --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)cd9660_util.c 8.3 (Berkeley) 12/5/94 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: stable/10/sys/fs/cd9660/cd9660_util.c 166639 2007-02-11 13:54:25Z rodrigc $"); | 39__FBSDID("$FreeBSD: stable/10/sys/fs/cd9660/cd9660_util.c 278060 2015-02-02 07:42:03Z dim $"); |
40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/mount.h> 44#include <sys/vnode.h> 45#include <sys/iconv.h> 46 47#include <fs/cd9660/iso.h> --- 27 unchanged lines hidden (view full) --- 75 76 if (flags & ISOFSMNT_KICONV && cd9660_iconv) { 77 i = j = len = 2; 78 inbuf[0]=(char)*(isofn - 1); 79 inbuf[1]=(char)*isofn; 80 inbuf[2]='\0'; 81 inp = inbuf; 82 outp = outbuf; | 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/mount.h> 44#include <sys/vnode.h> 45#include <sys/iconv.h> 46 47#include <fs/cd9660/iso.h> --- 27 unchanged lines hidden (view full) --- 75 76 if (flags & ISOFSMNT_KICONV && cd9660_iconv) { 77 i = j = len = 2; 78 inbuf[0]=(char)*(isofn - 1); 79 inbuf[1]=(char)*isofn; 80 inbuf[2]='\0'; 81 inp = inbuf; 82 outp = outbuf; |
83 cd9660_iconv->convchr(handle, (const char **)&inp, &i, &outp, &j); | 83 cd9660_iconv->convchr(handle, __DECONST(const char **, &inp), &i, 84 &outp, &j); |
84 len -= j; 85 if (clen) *clen = len; 86 *c = '\0'; 87 while(len--) 88 *c |= (*(outp - len - 1) & 0xff) << (len << 3); 89 } else { 90 switch (*c) { 91 default: --- 24 unchanged lines hidden (view full) --- 116 void *handle; 117 void *lhandle; 118{ 119 int i, j; 120 u_short c, d; 121 u_char *fnend = fn + fnlen, *isoend = isofn + isolen; 122 123 for (; fn < fnend; ) { | 85 len -= j; 86 if (clen) *clen = len; 87 *c = '\0'; 88 while(len--) 89 *c |= (*(outp - len - 1) & 0xff) << (len << 3); 90 } else { 91 switch (*c) { 92 default: --- 24 unchanged lines hidden (view full) --- 117 void *handle; 118 void *lhandle; 119{ 120 int i, j; 121 u_short c, d; 122 u_char *fnend = fn + fnlen, *isoend = isofn + isolen; 123 124 for (; fn < fnend; ) { |
124 d = sgetrune(fn, fnend - fn, (char const **)&fn, flags, lhandle); | 125 d = sgetrune(fn, fnend - fn, __DECONST(const char **, &fn), 126 flags, lhandle); |
125 if (isofn == isoend) 126 return d; 127 isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); 128 if (c == ';') { 129 if (d != ';') 130 return d; 131 for (i = 0; fn < fnend; i = i * 10 + *fn++ - '0') { 132 if (*fn < '0' || *fn > '9') { --- 111 unchanged lines hidden --- | 127 if (isofn == isoend) 128 return d; 129 isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); 130 if (c == ';') { 131 if (d != ';') 132 return d; 133 for (i = 0; fn < fnend; i = i * 10 + *fn++ - '0') { 134 if (*fn < '0' || *fn > '9') { --- 111 unchanged lines hidden --- |