Print this page
4023 - Typo in file(1) manpage and various others

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3socket/getipnodebyname.3socket
          +++ new/usr/src/man/man3socket/getipnodebyname.3socket
   1    1  '\" te
   2    2  .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
   3    3  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    4  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    5  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH GETIPNODEBYNAME 3SOCKET "Aug 22, 2007"
        6 +.TH GETIPNODEBYNAME 3SOCKET "Sep 10, 2013"
   7    7  .SH NAME
   8    8  getipnodebyname, getipnodebyaddr, freehostent \- get IP node entry
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12   12  \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsocket\fR \fB -lnsl \fR [ \fIlibrary\fR... ]
  13   13  #include <sys/socket.h>
  14   14  #include <netdb.h>
  15   15  
  16   16  \fBstruct hostent *\fR\fBgetipnodebyname\fR(\fBconst char *\fR\fIname\fR, \fBint\fR \fIaf\fR,
↓ open down ↓ 430 lines elided ↑ open up ↑
 447  447       #include <netdb.h>
 448  448  
 449  449       main(int argc, const char **argv)
 450  450       {
 451  451       char abuf[INET6_ADDRSTRLEN];
 452  452       int error_num;
 453  453       struct hostent *hp;
 454  454       char **p;
 455  455  
 456  456           if (argc != 2) {
 457      -             (void) printf("usage: %s hostname\n", argv[0]);
      457 +             (void) printf("usage: %s hostname\en", argv[0]);
 458  458               exit (1);
 459  459           }
 460  460  
 461  461       /* argv[1] can be a pointer to a hostname or literal IP address */
 462  462       hp = getipnodebyname(argv[1], AF_INET6, AI_ALL | AI_ADDRCONFIG |
 463  463          AI_V4MAPPED, &error_num);
 464  464       if (hp == NULL) {
 465  465          if (error_num == TRY_AGAIN) {
 466  466              printf("%s: unknown host or invalid literal address "
 467      -                "(try again later)\n", argv[1]);
      467 +                "(try again later)\en", argv[1]);
 468  468          } else {
 469      -            printf("%s: unknown host or invalid literal address\n",
      469 +            printf("%s: unknown host or invalid literal address\en",
 470  470                  argv[1]);
 471  471          }
 472  472          exit (1);
 473  473       }
 474  474       for (p = hp->h_addr_list; *p != 0; p++) {
 475  475          struct in6_addr in6;
 476  476          char **q;
 477  477  
 478  478          bcopy(*p, (caddr_t)&in6, hp->h_length);
 479  479          (void) printf("%s\t%s", inet_ntop(AF_INET6, (void *)&in6,
 480  480              abuf, sizeof(abuf)), hp->h_name);
 481  481          for (q = hp->h_aliases; *q != 0; q++)
 482  482          (void) printf(" %s", *q);
 483      -        (void) putchar('\n');
      483 +        (void) putchar('\en');
 484  484       }
 485  485       freehostent(hp);
 486  486       exit (0);
 487  487       }
 488  488  .fi
 489  489  .in -2
 490  490  
 491  491  .SH ATTRIBUTES
 492  492  .sp
 493  493  .LP
↓ open down ↓ 56 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX