mudge.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <ctype.h>
#include "wish.h"
#include "token.h"
#include "vtdefs.h"
#include "actrec.h"
#include "slk.h"
#include "ctl.h"
#include "moremacros.h"
/* modes */
#define MODE_MOVE 1
#define MODE_RESHAPE 2
static int mode;
static int srow;
static int scol;
static int rows;
static int cols;
static char position1[] = "Position ";
static char position2[] = " corner and press ENTER";
/* mouse position */
extern int Mouse_row;
extern int Mouse_col;
extern int Open_mouse_mode;
char *mess_perm();
static int
{
make_box(0, 0, 0, 0, 0);
return SUCCESS;
}
/*ARGSUSED*/
static int
int wdw;
{
return FAIL;
}
/*ARGSUSED*/
static token
wdw_stream(rec, t)
register token t;
{
register int newsrow;
register int newscol;
register int newrows;
register int newcols;
register bool moving;
char *nstrcat();
switch (t) {
case TOK_UP:
newsrow--;
else
newrows--;
break;
case TOK_DOWN:
newsrow++;
else
newrows++;
break;
case TOK_LEFT:
newscol--;
else
newcols--;
break;
case TOK_RIGHT:
newscol++;
else
newcols++;
break;
case TOK_BTAB:
else
break;
case TOK_TAB:
else
break;
case TOK_BPRESSED:
}
else {
}
break;
case TOK_BRELEASED:
case TOK_RETURN:
case TOK_ENTER:
#ifdef _DEBUG
#endif
mode = MODE_RESHAPE;
} else {
if (mode & MODE_RESHAPE)
else {
}
ar_backup();
}
t = TOK_NOP;
break;
case TOK_CANCEL:
ar_backup();
t = TOK_NOP;
break;
}
if (moving) {
t = TOK_NOP;
}
else {
t |= TOK_ERROR;
}
}
return t;
}
static int
{
/* allow extra space for borders */
return SUCCESS;
}
void
bool reshape;
{
struct actrec a;
a.id = 0;
a.lifetime = AR_SHORTERM;
/*
* put up a permanent message, saving the old one
*/
if (Savemsg) /* ehr3 */
}