ultrix_date.c
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C语言 代码 · 共 27 行
C
27 行
/* This program is used during an Ultrix build to set the Ultrix release * date for LMF into login.c. * It simply writes the current time plus a fixed offset onto the * standard outut, as a decimal number of days from the standard epoch, * and a human-readable message containing the same information on the * standard error. * * 15-Jun-1989 Giles Atkinson * */#define OFFSET 10*24*60*60 /* Offset is 10 days */#include <stdio.h>#include <sys/time.h>main () { struct timeval t; long when; gettimeofday(&t, 0); when = t.tv_sec+OFFSET; printf("%d\n", when); fprintf(stderr,"Setting LMF release date for ULTRIX to %s\n", ctime(&when));}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?