source: rtems/cpukit/libmisc/shell/extern-dd.h @ 9a77af8

4.104.115
Last change on this file since 9a77af8 was b311cbc9, checked in by Chris Johns <chrisj@…>, on 06/17/09 at 05:34:33

2009-06-17 Chris Johns <chrisj@…>

  • libmisc/shell/extern-dd.h: Delcare the conv arrays extern to stop PPC link errors.
  • libmisc/shell/main_time.c, libmisc/Makefile.am, libmisc/shell/shellconfig.h: Add a time command.
  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 *      The Regents of the University of California.  All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Keith Muller of the University of California, San Diego and Lance
7 * Visser of Convex Computer Corporation.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 *    notice, this list of conditions and the following disclaimer in the
16 *    documentation and/or other materials provided with the distribution.
17 * 4. Neither the name of the University nor the names of its contributors
18 *    may be used to endorse or promote products derived from this software
19 *    without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 *      @(#)extern.h    8.3 (Berkeley) 4/2/94
34 * $FreeBSD: src/bin/dd/extern.h,v 1.15 2004/08/15 19:10:05 rwatson Exp $
35 */
36
37#ifndef _EXTERN_DD_H_
38#define _EXTERN_DD_H_
39
40#include <setjmp.h>
41
42typedef struct rtems_shell_dd_globals_t {
43  IO    in, out;                /* input/output state */
44  STAT  st;                     /* statistics */
45  void  (*cfunc)(struct rtems_shell_dd_globals_t* globals);             /* conversion function */
46  uintmax_t cpy_cnt;            /* # of blocks to copy */
47  u_int ddflags;                /* conversion options */
48  size_t        cbsz;                   /* conversion block size */
49  uintmax_t files_cnt;  /* # of files to copy */
50  const u_char *ctab;           /* conversion table */
51  char  fill_char;              /* Character to fill with if defined */
52  u_char casetab[256];
53  int exit_code;
54  jmp_buf exit_jmp;
55} rtems_shell_dd_globals;
56
57#define in            globals->in
58#define out           globals->out
59#define st            globals->st
60#define cfunc         globals->cfunc
61#define cpy_cnt       globals->cpy_cnt
62#define ddflags       globals->ddflags
63#define cbsz          globals->cbsz
64#define files_cnt     globals->files_cnt
65#define casetab       globals->casetab
66#define ctab          globals->ctab
67#define fill_char     globals->fill_char
68#define exit_jump     &(globals->exit_jmp)
69
70#define block         rtems_shell_dd_block
71#define block_close   rtems_shell_dd_block_close
72#define dd_out        rtems_shell_dd_dd_out
73#define def           rtems_shell_dd_def
74#define def_close     rtems_shell_dd_def_close
75#define jcl           rtems_shell_dd_jcl
76#define pos_in        rtems_shell_dd_pos_in
77#define pos_out       rtems_shell_dd_pos_out
78#define summary       rtems_shell_dd_summary
79#define summaryx      rtems_shell_dd_summaryx
80#define terminate     rtems_shell_dd_terminate
81#define unblock       rtems_shell_dd_unblock
82#define unblock_close rtems_shell_dd_unblock_close
83
84void block(rtems_shell_dd_globals* );
85void block_close(rtems_shell_dd_globals* );
86void dd_out(rtems_shell_dd_globals* , int);
87void def(rtems_shell_dd_globals* globals);
88void def_close(rtems_shell_dd_globals* );
89void jcl(rtems_shell_dd_globals* , char **);
90void pos_in(rtems_shell_dd_globals* );
91void pos_out(rtems_shell_dd_globals* );
92void summary(rtems_shell_dd_globals* );
93void summaryx(rtems_shell_dd_globals* , int);
94void terminate(int);
95void unblock(rtems_shell_dd_globals* globals);
96void unblock_close(rtems_shell_dd_globals* globals);
97
98extern const u_char a2e_32V[256], a2e_POSIX[256];
99extern const u_char e2a_32V[256], e2a_POSIX[256];
100extern const u_char a2ibm_32V[256], a2ibm_POSIX[256];
101
102void rtems_shell_dd_exit(rtems_shell_dd_globals* globals, int code);
103
104#define exit(ec) rtems_shell_dd_exit(globals, ec)
105
106#endif /* !_EXTERN_H_ */
Note: See TracBrowser for help on using the repository browser.