OSDN Git Service

(split) LDP: Update original to LDP v3.63
[linuxjm/LDP_man-pages.git] / original / man3 / rtime.3
index 2ced816..ce093af 100644 (file)
@@ -9,7 +9,7 @@
 .\"
 .\" Slightly polished, aeb, 2003-04-06
 .\"
-.TH RTIME 3 2012-08-03 "GNU" "Linux Programmer's Manual"
+.TH RTIME 3 2014-01-05 "GNU" "Linux Programmer's Manual"
 .SH NAME
 rtime \- get time from a remote machine
 .SH SYNOPSIS
@@ -65,9 +65,11 @@ Try the example program with
 set to 1.
 .LP
 Libc5 uses the prototype
-.br
-int rtime(struct sockaddr_in *, struct timeval *, struct timeval *);
-.br
+.nf
+
+    int rtime(struct sockaddr_in *, struct timeval *, struct timeval *);
+
+.fi
 and requires
 .I <sys/time.h>
 instead of
@@ -81,7 +83,7 @@ You may check
 that the time entry within
 .I /etc/inetd.conf
 is not commented out.
-.br
+
 The program connects to a computer called "linux".
 Using "localhost" does not work.
 The result is the localtime of the computer "linux".
@@ -95,8 +97,8 @@ The result is the localtime of the computer "linux".
 #include <rpc/auth_des.h>
 #include <netdb.h>
 
-int use_tcp = 0;
-char *servername = "linux";
+static int use_tcp = 0;
+static char *servername = "linux";
 
 int
 main(void)
@@ -116,7 +118,7 @@ main(void)
     if (ret < 0)
         perror("rtime error");
     else {
-       time_t t = time1.tv_sec;
+        time_t t = time1.tv_sec;
         printf("%s\\n", ctime(&t));
     }