mtr@mace.cc.purdue.edu (Miek Rowan) (11/14/88)
Here are some fixes that are mostly for Sequent's dynix.
They are top level fixes in that they let you compile the
libraries and clients, and some minimal testing.
I can make xmh dump core - that is the only problem I have
found so far. More as I get to it.
These patches make no attempt at ./contrib.
I didn't make parallel Makefiles - I'll post that diff soon.
I also didn't include ./util/imake.includes/Sequent.macros - just
copy Guess.macros and change it to your preferences.
Changes:
./clients/xterm/main.c - uses getpseudotty() for sequents
./server/include/fontdir.h - fix for fonts - "private" is a reserved word
under dynix (opposite of "shared")
./fonts/mkfontdir/fontdir.c - same as above
./clients/xdm/Login.h - semicolon at the end of a struct member -
this was allowed in old c, no more
although most compilers take this
./clients/xdm/buf.[ch] - private is a reserved work under dynix
./util/imake.includes/Imake.tmpl- knows about sequents
./lib/Xaw/TextTr.c - for token sizes on the Sequent cc
this will still barf on a ANSI c compiler
(oh well :-)
*** /tmp/,RCSt1005636 Sun Nov 13 10:29:02 1988
--- ./clients/xterm/main.c Sun Nov 13 10:19:26 1988
***************
*** 946,951 ****
--- 946,962 ----
/* got one! */
return(0);
#else /* not (mips && SYSTYPE_SYSV) */
+ #if defined(sequent)
+ char *pchSlave,
+ *pchMaster;
+
+ if(-1 == (*pty = getpseudotty(&pchSlave, &pchMaster))) {
+ return 1;
+ }
+ strcpy(ttydev, pchSlave);
+ strcpy(ptydev, pchMaster);
+ return 0;
+ #else /* not sequent */
while (PTYCHAR1[letter]) {
ttydev [strlen(ttydev) - 2] = ptydev [strlen(ptydev) - 2] =
PTYCHAR1 [letter];
***************
*** 969,974 ****
--- 980,986 ----
* condition and let our caller terminate cleanly.
*/
return(1);
+ #endif /* sequent */
#endif /* mips && SYSTYPE_SYSV */
}
*** /tmp/,RCSt1006043 Sun Nov 13 10:50:28 1988
--- ./server/include/fontdir.h Fri Nov 11 16:30:20 1988
***************
*** 38,44 ****
--- 38,48 ----
typedef struct _FontFile {
char *name;
+ #if defined(sequent)
+ Opaque fonttable_private;
+ #else /* not sequent */
Opaque private;
+ #endif /* sequent */
Boolean alias;
} FontFileRec, *FontFile;
#define NullFontFile ((FontFile) NULL)
*** /tmp/,RCSt1006128 Sun Nov 13 10:53:00 1988
--- ./fonts/mkfontdir/fontdir.c Fri Nov 11 16:06:24 1988
***************
*** 60,66 ****
--- 60,70 ----
table->file.used++;
table->file.ff[idx].name = MakeCopy(name);
/* Warning: file names cannot be case smashed */
+ #ifdef sequent
+ table->file.ff[idx].fonttable_private = NULL;
+ #else /* not sequent */
table->file.ff[idx].private = NULL;
+ #endif
table->file.ff[idx].alias = isAlias;
return idx;
}
*** /tmp/,RCSt1006158 Sun Nov 13 10:55:16 1988
--- ./clients/xdm/Login.h Fri Nov 11 18:28:03 1988
***************
*** 73,79 ****
#define NAME_LEN 32
typedef struct _LoginData {
! char name[NAME_LEN], passwd[NAME_LEN]
} LoginData;
# define NOTIFY_OK 0
--- 73,79 ----
#define NAME_LEN 32
typedef struct _LoginData {
! char name[NAME_LEN], passwd[NAME_LEN] ;
} LoginData;
# define NOTIFY_OK 0
*** /tmp/,RCSt1006172 Sun Nov 13 10:55:59 1988
--- ./clients/xdm/buf.c Fri Nov 11 18:12:32 1988
***************
*** 41,47 ****
--- 41,51 ----
b->bufp = 0;
b->fill = 0;
b->size = len;
+ #if defined(sequent)
+ b->buffer_private = -1;
+ #else /* not sequent */
b->private = -1;
+ #endif /* sequent */
return b;
}
***************
*** 48,54 ****
--- 52,62 ----
fileFill (b)
struct buffer *b;
{
+ #if defined(sequent)
+ b->cnt = read (b->buffer_private, b->buf, b->size);
+ #else /* not sequent */
b->cnt = read (b->private, b->buf, b->size);
+ #endif /* sequent */
b->bufp = 0;
if (b->cnt <= 0) {
b->cnt = 0;
***************
*** 72,78 ****
--- 80,90 ----
if (!b->buf)
LogPanic ("out of memory\n");
b->cnt = b->bufp = 0;
+ #if defined(sequent)
+ b->buffer_private = fd;
+ #else /* not sequent */
b->private = fd;
+ #endif /* sequent */
b->fill = fileFill;
return b;
}
***************
*** 80,86 ****
--- 92,102 ----
bufClose (b)
struct buffer *b;
{
+ #if defined(sequent)
+ if (b->buffer_private != -1)
+ #else /* not sequent */
if (b->private != -1)
+ #endif /* sequent */
free (b->buf);
free ((char *) b);
}
*** /tmp/,RCSt1006177 Sun Nov 13 10:56:13 1988
--- ./clients/xdm/buf.h Fri Nov 11 18:08:51 1988
***************
*** 29,35 ****
--- 29,39 ----
int bufp;
int size;
int (*fill)();
+ #if defined(sequent)
+ int buffer_private;
+ #else /* not sequent */
int private;
+ #endif /* sequent */
};
extern struct buffer *fileOpen (), *dataOpen ();
*** /tmp/,RCSt1006237 Sun Nov 13 11:00:29 1988
--- ./util/imake.includes/Imake.tmpl Fri Nov 11 14:03:44 1988
***************
*** 104,109 ****
--- 104,116 ----
#define MipsArchitecture
#endif /* mips */
+ #ifdef sequent
+ #define MacroIncludeFile "Sequent.macros"
+ #define MacroFile Sequent.macros
+ #undef sequent
+ #define SequentArchitecture
+ #endif /* sequent */
+
#ifndef MacroIncludeFile
/**/# WARNING: Imake.tmpl not configured; guessing at definitions!!!
/**/# This might mean that BOOTSTRAPCFLAGS wasn't set when building imake.
*** /tmp/,RCSt1006260 Sun Nov 13 11:02:56 1988
--- ./lib/Xaw/TextTr.c Fri Nov 11 14:48:37 1988
***************
*** 2,59 ****
char defaultTextTranslations[] =
"\
! Ctrl<Key>F: forward-character() \n\
! Ctrl<Key>B: backward-character() \n\
! Ctrl<Key>D: delete-next-character() \n\
! Ctrl<Key>A: beginning-of-line() \n\
! Ctrl<Key>E: end-of-line() \n\
! Ctrl<Key>H: delete-previous-character() \n\
! Ctrl<Key>J: newline-and-indent() \n\
! Ctrl<Key>K: kill-to-end-of-line() \n\
! Ctrl<Key>L: redraw-display() \n\
! Ctrl<Key>M: newline() \n\
! Ctrl<Key>N: next-line() \n\
! Ctrl<Key>O: newline-and-backup() \n\
! Ctrl<Key>P: previous-line() \n\
! Ctrl<Key>V: next-page() \n\
! Ctrl<Key>W: kill-selection() \n\
! Ctrl<Key>Y: unkill() \n\
! Ctrl<Key>Z: scroll-one-line-up() \n\
! Meta<Key>F: forward-word() \n\
! Meta<Key>B: backward-word() \n\
! Meta<Key>I: insert-file() \n\
! Meta<Key>K: kill-to-end-of-paragraph() \n\
! Meta<Key>V: previous-page() \n\
! Meta<Key>Y: stuff() \n\
! Meta<Key>Z: scroll-one-line-down() \n\
! :Meta<Key>d: delete-next-word() \n\
! :Meta<Key>D: kill-word() \n\
! :Meta<Key>h: delete-previous-word() \n\
! :Meta<Key>H: backward-kill-word() \n\
! :Meta<Key>\\<: beginning-of-file() \n\
! :Meta<Key>\\>: end-of-file() \n\
! :Meta<Key>]: forward-paragraph() \n\
! :Meta<Key>[: backward-paragraph() \n\
! ~Shift Meta<Key>Delete: delete-previous-word() \n\
! Shift Meta<Key>Delete: backward-kill-word() \n\
! ~Shift Meta<Key>Backspace: delete-previous-word() \n\
! Shift Meta<Key>Backspace: backward-kill-word() \n\
! <Key>Right: forward-character() \n\
! <Key>Left: backward-character() \n\
! <Key>Down: next-line() \n\
! <Key>Up: previous-line() \n\
! <Key>Delete: delete-previous-character() \n\
! <Key>BackSpace: delete-previous-character() \n\
! <Key>Linefeed: newline-and-indent() \n\
! <Key>Return: newline() \n\
! <Key>: insert-char() \n\
! <FocusIn>: focus-in() \n\
! <FocusOut>: focus-out() \n\
! <Btn1Down>: select-start() \n\
! <Btn1Motion>: extend-adjust() \n\
! <Btn1Up>: extend-end(PRIMARY, CUT_BUFFER0) \n\
! <Btn2Down>: insert-selection(PRIMARY, CUT_BUFFER0) \n\
! <Btn3Down>: extend-start() \n\
! <Btn3Motion>: extend-adjust() \n\
<Btn3Up>: extend-end(PRIMARY, CUT_BUFFER0) \
";
--- 2,59 ----
char defaultTextTranslations[] =
"\
! Ctrl<Key>F: forward-character()\n\
! Ctrl<Key>B: backward-character()\n\
! Ctrl<Key>D: delete-next-character()\n\
! Ctrl<Key>A: beginning-of-line()\n\
! Ctrl<Key>E: end-of-line()\n\
! Ctrl<Key>H: delete-previous-character()\n\
! Ctrl<Key>J: newline-and-indent()\n\
! Ctrl<Key>K: kill-to-end-of-line()\n\
! Ctrl<Key>L: redraw-display()\n\
! Ctrl<Key>M: newline()\n\
! Ctrl<Key>N: next-line()\n\
! Ctrl<Key>O: newline-and-backup()\n\
! Ctrl<Key>P: previous-line()\n\
! Ctrl<Key>V: next-page()\n\
! Ctrl<Key>W: kill-selection()\n\
! Ctrl<Key>Y: unkill()\n\
! Ctrl<Key>Z: scroll-one-line-up()\n\
! Meta<Key>F: forward-word()\n\
! Meta<Key>B: backward-word()\n\
! Meta<Key>I: insert-file()\n\
! Meta<Key>K: kill-to-end-of-paragraph()\n\
! Meta<Key>V: previous-page()\n\
! Meta<Key>Y: stuff()\n\
! Meta<Key>Z: scroll-one-line-down()\n\
! :Meta<Key>d: delete-next-word()\n\
! :Meta<Key>D: kill-word()\n\
! :Meta<Key>h: delete-previous-word()\n\
! :Meta<Key>H: backward-kill-word()\n\
! :Meta<Key>\\<: beginning-of-file()\n\
! :Meta<Key>\\>: end-of-file()\n\
! :Meta<Key>]: forward-paragraph()\n\
! :Meta<Key>[: backward-paragraph()\n\
! ~Shift Meta<Key>Delete: delete-previous-word()\n\
! Shift Meta<Key>Delete: backward-kill-word()\n\
! ~Shift Meta<Key>Backspace: delete-previous-word()\n\
! Shift Meta<Key>Backspace: backward-kill-word()\n\
! <Key>Right: forward-character()\n\
! <Key>Left: backward-character()\n\
! <Key>Down: next-line()\n\
! <Key>Up: previous-line()\n\
! <Key>Delete: delete-previous-character()\n\
! <Key>BackSpace: delete-previous-character()\n\
! <Key>Linefeed: newline-and-indent()\n\
! <Key>Return: newline()\n\
! <Key>: insert-char()\n\
! <FocusIn>: focus-in()\n\
! <FocusOut>: focus-out()\n\
! <Btn1Down>: select-start()\n\
! <Btn1Motion>: extend-adjust()\n\
! <Btn1Up>: extend-end(PRIMARY, CUT_BUFFER0)\n\
! <Btn2Down>: insert-selection(PRIMARY, CUT_BUFFER0)\n\
! <Btn3Down>: extend-start()\n\
! <Btn3Motion>: extend-adjust()\n\
<Btn3Up>: extend-end(PRIMARY, CUT_BUFFER0) \
";mtr@mace.cc.purdue.edu (Miek Rowan) (11/14/88)
I forgot to mention that these patches are against the virgin X11R3 distribution plus the first official set of patches from the Consortium. I also put the patches on expo. (./contrib/Sequent.patches.Z) mtr