Deleted Added
sdiff udiff text old ( 17681 ) new ( 17688 )
full compact
1/*
2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

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

462 register u_int i, nlen = nsap[0];
463 register char *cp;
464 register struct enamemem *tp;
465
466 tp = lookup_nsap(nsap);
467 if (tp->e_name)
468 return tp->e_name;
469
470 tp->e_name = cp = (char *)malloc(nlen * 2 + 2);
471 if (cp == NULL)
472 error("isonsap_string: malloc");
473
474 nsap++;
475 *cp++ = '/';
476 for (i = nlen; (int)--i >= 0;) {
477 *cp++ = hex[*nsap >> 4];
478 *cp++ = hex[*nsap++ & 0xf];
479 }
480 *cp = '\0';
481 return (tp->e_name);
482}
483
484char *
485tcpport_string(u_short port)
486{

--- 270 unchanged lines hidden ---