Deleted Added
full compact
in6.c (83934) in6.c (91346)
1/* $FreeBSD: head/sys/netinet6/in6.c 83934 2001-09-25 18:40:52Z brooks $ */
1/* $FreeBSD: head/sys/netinet6/in6.c 91346 2002-02-27 02:44:45Z alfred $ */
2/* $KAME: in6.c,v 1.187 2001/05/24 07:43:59 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 1776 unchanged lines hidden (view full) ---

1786static int ip6round = 0;
1787char *
1788ip6_sprintf(addr)
1789 const struct in6_addr *addr;
1790{
1791 static char ip6buf[8][48];
1792 int i;
1793 char *cp;
2/* $KAME: in6.c,v 1.187 2001/05/24 07:43:59 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 1776 unchanged lines hidden (view full) ---

1786static int ip6round = 0;
1787char *
1788ip6_sprintf(addr)
1789 const struct in6_addr *addr;
1790{
1791 static char ip6buf[8][48];
1792 int i;
1793 char *cp;
1794 u_short *a = (u_short *)addr;
1795 u_char *d;
1794 const u_short *a = (const u_short *)addr;
1795 const u_char *d;
1796 int dcolon = 0;
1797
1798 ip6round = (ip6round + 1) & 7;
1799 cp = ip6buf[ip6round];
1800
1801 for (i = 0; i < 8; i++) {
1802 if (dcolon == 1) {
1803 if (*a == 0) {

--- 12 unchanged lines hidden (view full) ---

1816 dcolon = 1;
1817 } else {
1818 *cp++ = '0';
1819 *cp++ = ':';
1820 }
1821 a++;
1822 continue;
1823 }
1796 int dcolon = 0;
1797
1798 ip6round = (ip6round + 1) & 7;
1799 cp = ip6buf[ip6round];
1800
1801 for (i = 0; i < 8; i++) {
1802 if (dcolon == 1) {
1803 if (*a == 0) {

--- 12 unchanged lines hidden (view full) ---

1816 dcolon = 1;
1817 } else {
1818 *cp++ = '0';
1819 *cp++ = ':';
1820 }
1821 a++;
1822 continue;
1823 }
1824 d = (u_char *)a;
1824 d = (const u_char *)a;
1825 *cp++ = digits[*d >> 4];
1826 *cp++ = digits[*d++ & 0xf];
1827 *cp++ = digits[*d >> 4];
1828 *cp++ = digits[*d & 0xf];
1829 *cp++ = ':';
1830 a++;
1831 }
1832 *--cp = 0;

--- 622 unchanged lines hidden ---
1825 *cp++ = digits[*d >> 4];
1826 *cp++ = digits[*d++ & 0xf];
1827 *cp++ = digits[*d >> 4];
1828 *cp++ = digits[*d & 0xf];
1829 *cp++ = ':';
1830 a++;
1831 }
1832 *--cp = 0;

--- 622 unchanged lines hidden ---