1167465Smp/* $Header: /p/tcsh/cvsroot/tcsh/tc.h,v 3.8 2006/01/12 19:55:38 christos Exp $ */ 259243Sobrien/* 359243Sobrien * tc.h: Tcsh includes 459243Sobrien */ 559243Sobrien/*- 659243Sobrien * Copyright (c) 1980, 1991 The Regents of the University of California. 759243Sobrien * All rights reserved. 859243Sobrien * 959243Sobrien * Redistribution and use in source and binary forms, with or without 1059243Sobrien * modification, are permitted provided that the following conditions 1159243Sobrien * are met: 1259243Sobrien * 1. Redistributions of source code must retain the above copyright 1359243Sobrien * notice, this list of conditions and the following disclaimer. 1459243Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1559243Sobrien * notice, this list of conditions and the following disclaimer in the 1659243Sobrien * documentation and/or other materials provided with the distribution. 17100616Smp * 3. Neither the name of the University nor the names of its contributors 1859243Sobrien * may be used to endorse or promote products derived from this software 1959243Sobrien * without specific prior written permission. 2059243Sobrien * 2159243Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2259243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2359243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2459243Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2559243Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2659243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2759243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2859243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2959243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3059243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3159243Sobrien * SUCH DAMAGE. 3259243Sobrien */ 3359243Sobrien#ifndef _h_tc 3459243Sobrien#define _h_tc 3559243Sobrien 3659243Sobrien#ifndef _h_tc_const 3759243Sobrien/* Don't include it while we are making it. */ 3859243Sobrien# include "tc.const.h" 3959243Sobrien#endif /* _h_tc_const */ 4059243Sobrien#include "tc.os.h" 4159243Sobrien#include "tc.sig.h" 4259243Sobrien#include "tc.decls.h" 4359243Sobrien 44167465Smpextern size_t tlength; 45145479Smp 4659243Sobrien#define FMT_PROMPT 0 4759243Sobrien#define FMT_WHO 1 4859243Sobrien#define FMT_HISTORY 2 4959243Sobrien#define FMT_SCHED 3 5059243Sobrien 51167465Smpstruct strbuf { 52167465Smp char *s; 53167465Smp size_t len; /* Valid characters */ 54167465Smp size_t size; /* Allocated characters */ 55167465Smp}; 56167465Smp 57167465Smpstruct Strbuf { 58167465Smp Char *s; 59167465Smp size_t len; /* Valid characters */ 60167465Smp size_t size; /* Allocated characters */ 61167465Smp}; 62167465Smp 63167465Smp/* We don't have explicit initializers for variables with static storage 64167465Smp duration, so these values should be equivalent to default initialization. */ 65167465Smp#define strbuf_INIT { NULL, 0, 0 } 66167465Smp#define Strbuf_INIT { NULL, 0, 0 } 67167465Smpextern const struct strbuf strbuf_init; 68167465Smpextern const struct Strbuf Strbuf_init; 69167465Smp 70167465Smp/* A string vector in progress */ 71167465Smpstruct blk_buf 72167465Smp{ 73167465Smp Char **vec; 74167465Smp size_t len; /* Valid strings */ 75167465Smp size_t size; /* Allocated space for string pointers */ 76167465Smp}; 77167465Smp 78167465Smp#define BLK_BUF_INIT { NULL, 0, 0 } 79167465Smp 8059243Sobrien#endif /* _h_tc */ 81