Fix formatting

Add copyright notice
This commit is contained in:
Nick Clifton 2000-07-29 19:37:30 +00:00
parent 751669bbb0
commit f0a69f46bb
2 changed files with 90 additions and 73 deletions

View File

@ -1,3 +1,8 @@
2000-07-29 Nick Clifton <nickc@cygnus.com>
* os9k.h: Add copyright notice.
Fix formatting.
2000-07-22 Jason Eckhardt <jle@cygnus.com> 2000-07-22 Jason Eckhardt <jle@cygnus.com>
* opcode/i860.h (btne, bte, bla): Changed these opcodes * opcode/i860.h (btne, bte, bla): Changed these opcodes

View File

@ -1,26 +1,45 @@
/* os9k.h - OS-9000 i386 module header definitions
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined(_MODULE_H) #if !defined(_MODULE_H)
#define _MODULE_H #define _MODULE_H
/* OS-9000 i386 module header definitions */
#define _MPF386 #define _MPF386
/* sizeof common header less parity field */ /* Size of common header less parity field. */
#define N_M_PARITY (sizeof(mh_com)-sizeof(unisgned short)) #define N_M_PARITY (sizeof(mh_com)-sizeof(unisgned short))
#define OLD_M_PARITY 46 #define OLD_M_PARITY 46
#define M_PARITY N_M_PARITY #define M_PARITY N_M_PARITY
#ifdef _MPF68K #ifdef _MPF68K
#define MODSYNC 0x4afc /* module header sync code for 680x0 processors */ #define MODSYNC 0x4afc /* Module header sync code for 680x0 processors. */
#endif #endif
#ifdef _MPF386 #ifdef _MPF386
#define MODSYNC 0x4afc /* module header sync code for 80386 processors */ #define MODSYNC 0x4afc /* Module header sync code for 80386 processors. */
#endif #endif
#define MODREV 1 /* module format revision 1 */ #define MODREV 1 /* Module format revision 1. */
#define CRCCON 0x800063 /* crc polynomial constant */ #define CRCCON 0x800063 /* CRC polynomial constant. */
/* Module access permission values */ /* Module access permission values. */
#define MP_OWNER_READ 0x0001 #define MP_OWNER_READ 0x0001
#define MP_OWNER_WRITE 0x0002 #define MP_OWNER_WRITE 0x0002
#define MP_OWNER_EXEC 0x0004 #define MP_OWNER_EXEC 0x0004
@ -36,7 +55,7 @@
#define MP_WORLD_MASK 0x0f00 #define MP_WORLD_MASK 0x0f00
#define MP_SYSTM_MASK 0xf000 #define MP_SYSTM_MASK 0xf000
/* Module Type/Language values */ /* Module Type/Language values. */
#define MT_ANY 0 #define MT_ANY 0
#define MT_PROGRAM 0x0001 #define MT_PROGRAM 0x0001
#define MT_SUBROUT 0x0002 #define MT_SUBROUT 0x0002
@ -58,22 +77,22 @@
#define ML_FRTNCODE 6 #define ML_FRTNCODE 6
#define ML_MASK 0x00ff #define ML_MASK 0x00ff
#define mktypelang(type,lang) (((type)<<8)|(lang)) #define mktypelang(type, lang) (((type) << 8) | (lang))
/* Module Attribute values */ /* Module Attribute values. */
#define MA_REENT 0x80 #define MA_REENT 0x80
#define MA_GHOST 0x40 #define MA_GHOST 0x40
#define MA_SUPER 0x20 #define MA_SUPER 0x20
#define MA_MASK 0xff00 #define MA_MASK 0xff00
#define MR_MASK 0x00ff #define MR_MASK 0x00ff
#define mkattrevs(attr, revs) (((attr)<<8)|(revs)) #define mkattrevs(attr, revs) (((attr) << 8) | (revs))
#define m_user m_owner.grp_usr.usr #define m_user m_owner.grp_usr.usr
#define m_group m_owner.grp_usr.grp #define m_group m_owner.grp_usr.grp
#define m_group_user m_owner.group_user #define m_group_user m_owner.group_user
/* macro definitions for accessing module header fields */ /* Macro definitions for accessing module header fields. */
#define MODNAME(mod) ((u_char*)((u_char*)mod + ((Mh_com)mod)->m_name)) #define MODNAME(mod) ((u_char*)((u_char*)mod + ((Mh_com)mod)->m_name))
#if 0 #if 0
/* Appears not to be used, and the u_int32 typedef is gone (because it /* Appears not to be used, and the u_int32 typedef is gone (because it
@ -83,87 +102,80 @@
#define MHCOM_BYTES_SIZE 80 #define MHCOM_BYTES_SIZE 80
#define N_BADMAG(a) (((a).a_info) != MODSYNC) #define N_BADMAG(a) (((a).a_info) != MODSYNC)
typedef struct mh_com { typedef struct mh_com
/* sync bytes ($4afc). */ {
/* Sync bytes ($4afc). */
unsigned char m_sync[2]; unsigned char m_sync[2];
unsigned char m_sysrev[2]; /* system revision check value */ unsigned char m_sysrev[2]; /* System revision check value. */
unsigned char unsigned char m_size[4]; /* Module size. */
m_size[4]; /* module size */ unsigned char m_owner[4]; /* Group/user id. */
unsigned char unsigned char m_name[4]; /* Offset to module name. */
m_owner[4]; /* group/user id */ unsigned char m_access[2]; /* Access permissions. */
unsigned char unsigned char m_tylan[2]; /* Type/lang. */
m_name[4]; /* offset to module name */ unsigned char m_attrev[2]; /* Rev/attr. */
unsigned char unsigned char m_edit[2]; /* Edition. */
m_access[2], /* access permissions */ unsigned char m_needs[4]; /* Module hardware requirements flags. (reserved). */
m_tylan[2], /* type/lang */ unsigned char m_usage[4]; /* Comment string offset. */
m_attrev[2], /* rev/attr */ unsigned char m_symbol[4]; /* Symbol table offset. */
m_edit[2]; /* edition */ unsigned char m_exec[4]; /* Offset to execution entry point. */
unsigned char unsigned char m_excpt[4]; /* Offset to exception entry point. */
m_needs[4], /* module hardware requirements flags. (reserved) */ unsigned char m_data[4]; /* Data storage requirement. */
m_usage[4], /* comment string offset */ unsigned char m_stack[4]; /* Stack size. */
m_symbol[4], /* symbol table offset */ unsigned char m_idata[4]; /* Offset to initialized data. */
m_exec[4], /* offset to execution entry point */ unsigned char m_idref[4]; /* Offset to data reference lists. */
m_excpt[4], /* offset to exception entry point */ unsigned char m_init[4]; /* Initialization routine offset. */
m_data[4], /* data storage requirement */ unsigned char m_term[4]; /* Termination routine offset. */
m_stack[4], /* stack size */ unsigned char m_ident[2]; /* Ident code for ident program. */
m_idata[4], /* offset to initialized data */ char m_spare[8]; /* Reserved bytes. */
m_idref[4], /* offset to data reference lists */ unsigned char m_parity[2]; /* Header parity. */
m_init[4], /* initialization routine offset */
m_term[4]; /* termination routine offset */
unsigned char
m_ident[2]; /* ident code for ident program */
char
m_spare[8]; /* reserved bytes */
unsigned char
m_parity[2]; /* header parity */
} mh_com,*Mh_com; } mh_com,*Mh_com;
/* Executable memory module */ /* Executable memory module. */
typedef mh_com *Mh_exec,mh_exec; typedef mh_com *Mh_exec,mh_exec;
/* Data memory module */ /* Data memory module. */
typedef mh_com *Mh_data,mh_data; typedef mh_com *Mh_data,mh_data;
/* File manager memory module */ /* File manager memory module. */
typedef mh_com *Mh_fman,mh_fman; typedef mh_com *Mh_fman,mh_fman;
/* device driver module */ /* Device driver module. */
typedef mh_com *Mh_drvr,mh_drvr; typedef mh_com *Mh_drvr,mh_drvr;
/* trap handler module */ /* Trap handler module. */
typedef mh_com mh_trap, *Mh_trap; typedef mh_com mh_trap, *Mh_trap;
/* Device descriptor module */ /* Device descriptor module. */
typedef mh_com *Mh_dev,mh_dev; typedef mh_com *Mh_dev,mh_dev;
/* Configuration module */ /* Configuration module. */
typedef mh_com *Mh_config, mh_config; typedef mh_com *Mh_config, mh_config;
#if 0 #if 0
#if !defined(_MODDIR_H) #if !defined(_MODDIR_H)
/* go get _os_fmod (and others) */ /* Go get _os_fmod (and others). */
#include <moddir.h> #include <moddir.h>
#endif #endif
error_code _os_crc(void *, u_int32, int *); error_code _os_crc (void *, u_int32, int *);
error_code _os_datmod(char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_data **); error_code _os_datmod (char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_data **);
error_code _os_get_moddir(void *, u_int32 *); error_code _os_get_moddir (void *, u_int32 *);
error_code _os_initdata(mh_com *, void *); error_code _os_initdata (mh_com *, void *);
error_code _os_link(char **, mh_com **, void **, u_int16 *, u_int16 *); error_code _os_link (char **, mh_com **, void **, u_int16 *, u_int16 *);
error_code _os_linkm(mh_com *, void **, u_int16 *, u_int16 *); error_code _os_linkm (mh_com *, void **, u_int16 *, u_int16 *);
error_code _os_load(char *, mh_com **, void **, u_int32, u_int16 *, u_int16 *, u_int32); error_code _os_load (char *, mh_com **, void **, u_int32, u_int16 *, u_int16 *, u_int32);
error_code _os_mkmodule(char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_com **, u_int32); error_code _os_mkmodule (char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_com **, u_int32);
error_code _os_modaddr(void *, mh_com **); error_code _os_modaddr (void *, mh_com **);
error_code _os_setcrc(mh_com *); error_code _os_setcrc (mh_com *);
error_code _os_slink(u_int32, char *, void **, void **, mh_com **); error_code _os_slink (u_int32, char *, void **, void **, mh_com **);
error_code _os_slinkm(u_int32, mh_com *, void **, void **); error_code _os_slinkm (u_int32, mh_com *, void **, void **);
error_code _os_unlink(mh_com *); error_code _os_unlink (mh_com *);
error_code _os_unload(char *, u_int32); error_code _os_unload (char *, u_int32);
error_code _os_tlink(u_int32, char *, void **, mh_trap **, void *, u_int32); error_code _os_tlink (u_int32, char *, void **, mh_trap **, void *, u_int32);
error_code _os_tlinkm(u_int32, mh_com *, void **, void *, u_int32); error_code _os_tlinkm (u_int32, mh_com *, void **, void *, u_int32);
error_code _os_iodel(mh_com *); error_code _os_iodel (mh_com *);
error_code _os_vmodul(mh_com *, mh_com *, u_int32); error_code _os_vmodul (mh_com *, mh_com *, u_int32);
#endif /* 0 */ #endif /* 0 */
#endif #endif