1c80476e4SDavid E. O'Brien /* 2c80476e4SDavid E. O'Brien * tc.h: Tcsh includes 3c80476e4SDavid E. O'Brien */ 4c80476e4SDavid E. O'Brien /*- 5c80476e4SDavid E. O'Brien * Copyright (c) 1980, 1991 The Regents of the University of California. 6c80476e4SDavid E. O'Brien * All rights reserved. 7c80476e4SDavid E. O'Brien * 8c80476e4SDavid E. O'Brien * Redistribution and use in source and binary forms, with or without 9c80476e4SDavid E. O'Brien * modification, are permitted provided that the following conditions 10c80476e4SDavid E. O'Brien * are met: 11c80476e4SDavid E. O'Brien * 1. Redistributions of source code must retain the above copyright 12c80476e4SDavid E. O'Brien * notice, this list of conditions and the following disclaimer. 13c80476e4SDavid E. O'Brien * 2. Redistributions in binary form must reproduce the above copyright 14c80476e4SDavid E. O'Brien * notice, this list of conditions and the following disclaimer in the 15c80476e4SDavid E. O'Brien * documentation and/or other materials provided with the distribution. 1629301572SMark Peek * 3. Neither the name of the University nor the names of its contributors 17c80476e4SDavid E. O'Brien * may be used to endorse or promote products derived from this software 18c80476e4SDavid E. O'Brien * without specific prior written permission. 19c80476e4SDavid E. O'Brien * 20c80476e4SDavid E. O'Brien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21c80476e4SDavid E. O'Brien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22c80476e4SDavid E. O'Brien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23c80476e4SDavid E. O'Brien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24c80476e4SDavid E. O'Brien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25c80476e4SDavid E. O'Brien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26c80476e4SDavid E. O'Brien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27c80476e4SDavid E. O'Brien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28c80476e4SDavid E. O'Brien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29c80476e4SDavid E. O'Brien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30c80476e4SDavid E. O'Brien * SUCH DAMAGE. 31c80476e4SDavid E. O'Brien */ 32c80476e4SDavid E. O'Brien #ifndef _h_tc 33c80476e4SDavid E. O'Brien #define _h_tc 34c80476e4SDavid E. O'Brien 35c80476e4SDavid E. O'Brien #ifndef _h_tc_const 36c80476e4SDavid E. O'Brien /* Don't include it while we are making it. */ 37c80476e4SDavid E. O'Brien # include "tc.const.h" 38c80476e4SDavid E. O'Brien #endif /* _h_tc_const */ 39c80476e4SDavid E. O'Brien #include "tc.os.h" 40c80476e4SDavid E. O'Brien #include "tc.sig.h" 41c80476e4SDavid E. O'Brien #include "tc.decls.h" 42c80476e4SDavid E. O'Brien 4345e5710bSMark Peek extern size_t tlength; 4423338178SMark Peek 45c80476e4SDavid E. O'Brien #define FMT_PROMPT 0 46c80476e4SDavid E. O'Brien #define FMT_WHO 1 47c80476e4SDavid E. O'Brien #define FMT_HISTORY 2 48c80476e4SDavid E. O'Brien #define FMT_SCHED 3 49c80476e4SDavid E. O'Brien 5045e5710bSMark Peek struct strbuf { 5145e5710bSMark Peek char *s; 5245e5710bSMark Peek size_t len; /* Valid characters */ 5345e5710bSMark Peek size_t size; /* Allocated characters */ 5445e5710bSMark Peek }; 5545e5710bSMark Peek 5645e5710bSMark Peek struct Strbuf { 5745e5710bSMark Peek Char *s; 5845e5710bSMark Peek size_t len; /* Valid characters */ 5945e5710bSMark Peek size_t size; /* Allocated characters */ 6045e5710bSMark Peek }; 6145e5710bSMark Peek 6245e5710bSMark Peek /* We don't have explicit initializers for variables with static storage 6345e5710bSMark Peek duration, so these values should be equivalent to default initialization. */ 6445e5710bSMark Peek #define strbuf_INIT { NULL, 0, 0 } 6545e5710bSMark Peek #define Strbuf_INIT { NULL, 0, 0 } 6645e5710bSMark Peek extern const struct strbuf strbuf_init; 6745e5710bSMark Peek extern const struct Strbuf Strbuf_init; 6845e5710bSMark Peek 6945e5710bSMark Peek /* A string vector in progress */ 7045e5710bSMark Peek struct blk_buf 7145e5710bSMark Peek { 7245e5710bSMark Peek Char **vec; 7345e5710bSMark Peek size_t len; /* Valid strings */ 7445e5710bSMark Peek size_t size; /* Allocated space for string pointers */ 7545e5710bSMark Peek }; 7645e5710bSMark Peek 7745e5710bSMark Peek #define BLK_BUF_INIT { NULL, 0, 0 } 7845e5710bSMark Peek 79c80476e4SDavid E. O'Brien #endif /* _h_tc */ 80