summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-09-05 10:17:30 +0000
committerkato <kato@FreeBSD.org>1997-09-05 10:17:30 +0000
commit103d22622fc5edb65abf4a79d03f95ccd9ecabd3 (patch)
treeb12a9bb4ba28594eb72cd8b92a233173f6bbafa4 /sys/pc98
parent5f1be5247ef225d1eb23ea1217c8bac3fded2a40 (diff)
downloadFreeBSD-src-103d22622fc5edb65abf4a79d03f95ccd9ecabd3.zip
FreeBSD-src-103d22622fc5edb65abf4a79d03f95ccd9ecabd3.tar.gz
Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.231
and 1.33, respectively.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/syscons.c40
-rw-r--r--sys/pc98/pc98/syscons.h7
2 files changed, 23 insertions, 24 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index 87f2150..2f6dae8 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -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
- {
-#endif
- scp->history = NULL;
-#ifdef PC98
- scp->his_atr = NULL; }
+ 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
- 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;
diff --git a/sys/pc98/pc98/syscons.h b/sys/pc98/pc98/syscons.h
index fb31367..9e3c212 100644
--- a/sys/pc98/pc98/syscons.h
+++ b/sys/pc98/pc98/syscons.h
@@ -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
OpenPOWER on IntegriCloud