mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.231
and 1.33, respectively.
This commit is contained in:
parent
d32eff99cc
commit
5453c48016
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29136
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.53 1997/08/09 06:41:06 kato Exp $
|
||||
* $Id: syscons.c,v 1.54 1997/08/10 10:52:17 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -1109,28 +1109,17 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
if (scp->his_atr != NULL)
|
||||
free(scp->his_atr, M_DEVBUF);
|
||||
#endif
|
||||
scp->history_size = *(int*)data;
|
||||
if (scp->history_size < scp->ysize)
|
||||
scp->history_size = max(scp->ysize, *(int *)data)*scp->xsize;
|
||||
scp->history_head = scp->history_pos = scp->history =
|
||||
(u_short *)malloc(scp->history_size*sizeof(u_short),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
bzero(scp->history_head, scp->history_size*sizeof(u_short));
|
||||
#ifdef PC98
|
||||
{
|
||||
scp->his_atr_head = scp->his_atr_pos = scp->his_atr =
|
||||
(u_short *)malloc(scp->history_size*sizeof(u_short),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
bzero(scp->his_atr_head, scp->history_size*sizeof(u_short));
|
||||
#endif
|
||||
scp->history = NULL;
|
||||
#ifdef PC98
|
||||
scp->his_atr = NULL; }
|
||||
#endif
|
||||
else {
|
||||
scp->history_size *= scp->xsize;
|
||||
scp->history_head = scp->history_pos = scp->history =
|
||||
(u_short *)malloc(scp->history_size*sizeof(u_short),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
bzero(scp->history_head, scp->history_size*sizeof(u_short));
|
||||
#ifdef PC98
|
||||
scp->his_atr_head = scp->his_atr_pos = scp->his_atr =
|
||||
(u_short *)malloc(scp->history_size*sizeof(u_short),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
bzero(scp->his_atr_head, scp->history_size*sizeof(u_short));
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@ -1314,6 +1303,13 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
free(cut_buffer, M_DEVBUF);
|
||||
cut_buffer = (char *)malloc(scp->xsize*scp->ysize, M_DEVBUF, M_NOWAIT);
|
||||
cut_buffer[0] = 0x00;
|
||||
if (scp->history != NULL)
|
||||
free(scp->history, M_DEVBUF);
|
||||
scp->history_size = max(HISTORY_SIZE, scp->xsize*scp->ysize);
|
||||
scp->history_head = scp->history_pos = scp->history = (u_short *)
|
||||
malloc(scp->history_size*sizeof(u_short), M_DEVBUF, M_NOWAIT);
|
||||
if (scp->history != NULL)
|
||||
bzero(scp->history, scp->history_size*sizeof(u_short));
|
||||
if (scp == cur_console)
|
||||
set_mode(scp);
|
||||
scp->status &= ~UNKNOWN_MODE;
|
||||
@ -3630,7 +3626,7 @@ init_scp(scr_stat *scp)
|
||||
#ifdef PC98
|
||||
scp->his_atr_head = scp->his_atr_pos = scp->his_atr = NULL;
|
||||
#endif
|
||||
scp->history_size = HISTORY_SIZE;
|
||||
scp->history_size = max(HISTORY_SIZE, scp->xsize*scp->ysize);
|
||||
#ifdef KANJI
|
||||
scp->kanji_1st_char = 0;
|
||||
scp->kanji_type = 0;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.h,v 1.15 1997/07/16 13:55:59 kato Exp $
|
||||
* $Id: syscons.h,v 1.16 1997/08/26 15:09:36 kato Exp $
|
||||
*/
|
||||
|
||||
#ifndef _PC98_PC98_SYSCONS_H_
|
||||
@ -116,7 +116,10 @@ static unsigned int BELL_PITCH = 1678;
|
||||
#define FONT_8 2
|
||||
#define FONT_14 4
|
||||
#define FONT_16 8
|
||||
#define HISTORY_SIZE (COL * ROW * 4)
|
||||
#if !defined(SC_HISTORY_SIZE)
|
||||
#define SC_HISTORY_SIZE (ROW * 4)
|
||||
#endif /* SC_HISTORY_SIZE */
|
||||
#define HISTORY_SIZE (COL * (SC_HISTORY_SIZE))
|
||||
|
||||
/* defines related to hardware addresses */
|
||||
#ifdef PC98
|
||||
|
Loading…
Reference in New Issue
Block a user