pr_time.c (e8e649cc5dd773fdde330d58c17c9f03e2f28286) | pr_time.c (e39ee4216c41bdbf93b5ccd7fad5970b330d1040) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993, 1994 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 the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 30 unchanged lines hidden (view full) --- 39static const char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94"; 40#endif 41 42#include <sys/types.h> 43#include <sys/time.h> 44 45#include <stdio.h> 46#include <string.h> | 1/*- 2 * Copyright (c) 1990, 1993, 1994 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 the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 30 unchanged lines hidden (view full) --- 39static const char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94"; 40#endif 41 42#include <sys/types.h> 43#include <sys/time.h> 44 45#include <stdio.h> 46#include <string.h> |
47#include <wchar.h> |
|
47 48#include "extern.h" 49 50/* 51 * pr_attime -- 52 * Print the time since the user logged in. 53 */ 54void --- 22 unchanged lines hidden (view full) --- 77 } 78 79 /* Default is hh:mm{am,pm}. */ 80 else { 81 (void)strcpy(fmt, use_ampm ? "%l:%M%p" : "%k:%M"); 82 } 83 84 (void)strftime(buf, sizeof(buf), fmt, &tp); | 48 49#include "extern.h" 50 51/* 52 * pr_attime -- 53 * Print the time since the user logged in. 54 */ 55void --- 22 unchanged lines hidden (view full) --- 78 } 79 80 /* Default is hh:mm{am,pm}. */ 81 else { 82 (void)strcpy(fmt, use_ampm ? "%l:%M%p" : "%k:%M"); 83 } 84 85 (void)strftime(buf, sizeof(buf), fmt, &tp); |
85 (void)printf("%-7.7s", buf); | 86 (void)wprintf(L"%-7.7s", buf); |
86} 87 88/* 89 * pr_idle -- 90 * Display the idle time. 91 * Returns number of excess characters that were used for long idle time. 92 */ 93int --- 26 unchanged lines hidden --- | 87} 88 89/* 90 * pr_idle -- 91 * Display the idle time. 92 * Returns number of excess characters that were used for long idle time. 93 */ 94int --- 26 unchanged lines hidden --- |