|
|
1.1 root 1: /*
2: * $Source: /mit/kerberos/src/lib/krb/RCS/month_sname.c,v $
3: * $Author: jtkohl $
4: *
5: * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
6: * of Technology.
7: *
8: * For copying and distribution information, please see the file
9: * <mit-copyright.h>.
10: */
11:
12: #ifndef lint
13: static char *rcsid_month_sname_c =
14: "$Header: month_sname.c,v 4.4 88/11/15 16:39:32 jtkohl Exp $";
15: #endif /* lint */
16:
17: #include <mit-copyright.h>
18:
19: /*
20: * Given an integer 1-12, month_sname() returns a string
21: * containing the first three letters of the corresponding
22: * month. Returns 0 if the argument is out of range.
23: */
24:
25: char *month_sname(n)
26: int n;
27: {
28: static char *name[] = {
29: "Jan","Feb","Mar","Apr","May","Jun",
30: "Jul","Aug","Sep","Oct","Nov","Dec"
31: };
32: return((n < 1 || n > 12) ? 0 : name [n-1]);
33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.