comparison src/os_unix.c @ 273:2463194c8cdd

updated for version 7.0073
author vimboss
date Thu, 19 May 2005 21:00:46 +0000
parents 4707450c2b33
children bf6ee000a80c
comparison
equal deleted inserted replaced
272:ddada568db54 273:2463194c8cdd
1305 1305
1306 /* Compute elapsed time. */ 1306 /* Compute elapsed time. */
1307 gettimeofday(&end_tv, NULL); 1307 gettimeofday(&end_tv, NULL);
1308 smsg((char_u *)_("Opening the X display took %ld msec"), 1308 smsg((char_u *)_("Opening the X display took %ld msec"),
1309 (end_tv.tv_sec - tvp->tv_sec) * 1000L 1309 (end_tv.tv_sec - tvp->tv_sec) * 1000L
1310 + (end_tv.tv_usec - tvp->tv_usec) / 1000L); 1310 + (end_tv.tv_usec - tvp->tv_usec) / 1000L);
1311 } 1311 }
1312 # endif 1312 # endif
1313 #endif 1313 #endif
1314 1314
1315 #if defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD)) 1315 #if defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD))
2090 2090
2091 if ((pw = getpwuid(uid)) != NULL 2091 if ((pw = getpwuid(uid)) != NULL
2092 && pw->pw_name != NULL && *(pw->pw_name) != NUL) 2092 && pw->pw_name != NULL && *(pw->pw_name) != NUL)
2093 { 2093 {
2094 STRNCPY(s, pw->pw_name, len); 2094 STRNCPY(s, pw->pw_name, len);
2095 s[len - 1] = NUL;
2095 return OK; 2096 return OK;
2096 } 2097 }
2097 #endif 2098 #endif
2098 sprintf((char *)s, "%d", (int)uid); /* assumes s is long enough */ 2099 sprintf((char *)s, "%d", (int)uid); /* assumes s is long enough */
2099 return FAIL; /* a number is not a name */ 2100 return FAIL; /* a number is not a name */
6451 sizeof(errorstring), 6452 sizeof(errorstring),
6452 errorstring); 6453 errorstring);
6453 if (xsmp.smcconn == NULL) 6454 if (xsmp.smcconn == NULL)
6454 { 6455 {
6455 char errorreport[132]; 6456 char errorreport[132];
6456 sprintf(errorreport, _("XSMP SmcOpenConnection failed: %s"), 6457
6457 errorstring); 6458 vim_snprintf(errorreport, sizeof(errorreport),
6459 _("XSMP SmcOpenConnection failed: %s"), errorstring);
6458 if (p_verbose > 0) 6460 if (p_verbose > 0)
6459 MSG(errorreport); 6461 MSG(errorreport);
6460 return; 6462 return;
6461 } 6463 }
6462 xsmp.iceconn = SmcGetIceConnection(xsmp.smcconn); 6464 xsmp.iceconn = SmcGetIceConnection(xsmp.smcconn);