1*d19ef5a2SAaron LI /*- 2*d19ef5a2SAaron LI * SPDX-License-Identifier: BSD-3-Clause 3*d19ef5a2SAaron LI * 4*d19ef5a2SAaron LI * Copyright (c) 2020 The DragonFly Project. All rights reserved. 5*d19ef5a2SAaron LI * Copyright (c) 1989, 1993, 1994 6*d19ef5a2SAaron LI * The Regents of the University of California. All rights reserved. 7*d19ef5a2SAaron LI * 8*d19ef5a2SAaron LI * This code is derived from software contributed to The DragonFly Project 9*d19ef5a2SAaron LI * by Aaron LI <aly@aaronly.me> 10*d19ef5a2SAaron LI * 11*d19ef5a2SAaron LI * Redistribution and use in source and binary forms, with or without 12*d19ef5a2SAaron LI * modification, are permitted provided that the following conditions 13*d19ef5a2SAaron LI * are met: 14*d19ef5a2SAaron LI * 1. Redistributions of source code must retain the above copyright 15*d19ef5a2SAaron LI * notice, this list of conditions and the following disclaimer. 16*d19ef5a2SAaron LI * 2. Redistributions in binary form must reproduce the above copyright 17*d19ef5a2SAaron LI * notice, this list of conditions and the following disclaimer in the 18*d19ef5a2SAaron LI * documentation and/or other materials provided with the distribution. 19*d19ef5a2SAaron LI * 3. Neither the name of the University nor the names of its contributors 20*d19ef5a2SAaron LI * may be used to endorse or promote products derived from this software 21*d19ef5a2SAaron LI * without specific prior written permission. 22*d19ef5a2SAaron LI * 23*d19ef5a2SAaron LI * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24*d19ef5a2SAaron LI * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25*d19ef5a2SAaron LI * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26*d19ef5a2SAaron LI * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27*d19ef5a2SAaron LI * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28*d19ef5a2SAaron LI * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29*d19ef5a2SAaron LI * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30*d19ef5a2SAaron LI * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31*d19ef5a2SAaron LI * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32*d19ef5a2SAaron LI * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33*d19ef5a2SAaron LI * SUCH DAMAGE. 34*d19ef5a2SAaron LI */ 35*d19ef5a2SAaron LI 36*d19ef5a2SAaron LI #ifndef NNAMES_H_ 37*d19ef5a2SAaron LI #define NNAMES_H_ 38*d19ef5a2SAaron LI 39*d19ef5a2SAaron LI #define NDOWS 7 40*d19ef5a2SAaron LI #define NMONTHS 12 41*d19ef5a2SAaron LI #define NSEQUENCES 6 42*d19ef5a2SAaron LI 43*d19ef5a2SAaron LI struct nname { 44*d19ef5a2SAaron LI int value; /* month number, dow value, etc. */ 45*d19ef5a2SAaron LI const char *name; /* short name */ 46*d19ef5a2SAaron LI size_t len; /* length of short name */ 47*d19ef5a2SAaron LI const char *f_name; /* full name */ 48*d19ef5a2SAaron LI size_t f_len; /* length of full name */ 49*d19ef5a2SAaron LI char *n_name; /* short national name */ 50*d19ef5a2SAaron LI size_t n_len; /* length of short national name */ 51*d19ef5a2SAaron LI char *fn_name; /* full national name */ 52*d19ef5a2SAaron LI size_t fn_len; /* length of full national name */ 53*d19ef5a2SAaron LI }; 54*d19ef5a2SAaron LI 55*d19ef5a2SAaron LI extern struct nname dow_names[]; /* names of every day of week */ 56*d19ef5a2SAaron LI extern struct nname month_names[]; /* names of every month */ 57*d19ef5a2SAaron LI extern struct nname sequence_names[]; /* names of every sequence */ 58*d19ef5a2SAaron LI 59*d19ef5a2SAaron LI void set_nnames(void); 60*d19ef5a2SAaron LI void set_nsequences(const char *seq); 61*d19ef5a2SAaron LI 62*d19ef5a2SAaron LI #endif 63