/* If the user specified a special video mode for these dimensions,
use that mode. */
- sprintf (video_name, "screen-dimensions-%dx%d", *rows, *cols);
- video_mode = Fsymbol_value (Fintern_soft (build_string (video_name), Qnil));
+ video_mode
+ = Fsymbol_value (Fintern_soft (make_formatted_string
+ (video_name, "screen-dimensions-%dx%d",
+ *rows, *cols), Qnil));
if (INTEGERP (video_mode)
&& (video_mode_value = XINT (video_mode)) > 0)
/* The default face for the frame should always be realized and
cached. */
if (!fp)
- abort ();
+ emacs_abort ();
}
screen_face = face;
fg = fp->foreground;
{
char *spaces, *sp;
int i, j, offset = 2 * (new_pos_X + screen_size_X * new_pos_Y);
- extern int fatal_error_in_progress;
struct tty_display_info *tty = FRAME_TTY (f);
if (new_pos_X >= first_unused || fatal_error_in_progress)
static void
IT_delete_glyphs (struct frame *f, int n)
{
- abort ();
+ emacs_abort ();
}
/* set-window-configuration on window.c needs this. */
Lisp_Object tail;
int i, j, length = XINT (Flength (alist));
Lisp_Object *parms
- = (Lisp_Object *) alloca (length * sizeof (Lisp_Object));
+ = (Lisp_Object *) alloca (length * word_size);
Lisp_Object *values
- = (Lisp_Object *) alloca (length * sizeof (Lisp_Object));
+ = (Lisp_Object *) alloca (length * word_size);
/* Do we have to reverse the foreground and background colors? */
int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt);
int redraw = 0, fg_set = 0, bg_set = 0;
/* Extract parm names and values into those vectors. */
i = 0;
- for (tail = alist; CONSP (tail); tail = Fcdr (tail))
+ for (tail = alist; CONSP (tail); tail = XCDR (tail))
{
- Lisp_Object elt;
-
- elt = Fcar (tail);
+ Lisp_Object elt = XCAR (tail);
parms[i] = Fcar (elt);
CHECK_SYMBOL (parms[i]);
values[i] = Fcdr (elt);
}
tty = FRAME_TTY (sf);
- KVAR (current_kboard, Vwindow_system) = Qpc;
+ kset_window_system (current_kboard, Qpc);
sf->output_method = output_msdos_raw;
if (init_needed)
{
else
{
val = Fvector (NUM_RECENT_DOSKEYS, keys);
- memcpy (XVECTOR (val)->contents, keys + recent_doskeys_index,
- (NUM_RECENT_DOSKEYS - recent_doskeys_index) * sizeof (Lisp_Object));
- memcpy (XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index,
- keys, recent_doskeys_index * sizeof (Lisp_Object));
+ vcopy (val, 0, keys + recent_doskeys_index,
+ NUM_RECENT_DOSKEYS - recent_doskeys_index);
+ vcopy (val, NUM_RECENT_DOSKEYS - recent_doskeys_index,
+ keys, recent_doskeys_index);
return val;
}
}
const char *p;
if (!enable)
- abort ();
+ emacs_abort ();
IT_menu_make_room (menu);
menu->submenu[menu->count] = IT_menu_create ();
FD_ZERO (efds);
if (nfds != 1)
- abort ();
+ emacs_abort ();
/* If we are looking only for the terminal, with no timeout,
just read it and wait -- that's more efficient. */
EMACS_TIME clnow, cllast, cldiff;
gettime (&t);
- EMACS_SET_SECS_NSECS (cllast, t.tv_sec, t.tv_nsec);
+ cllast = make_emacs_time (t.tv_sec, t.tv_nsec);
while (!check_input || !detect_input_pending ())
{
gettime (&t);
- EMACS_SET_SECS_NSECS (clnow, t.tv_sec, t.tv_nsec);
- EMACS_SUB_TIME (cldiff, clnow, cllast);
- EMACS_SUB_TIME (*timeout, *timeout, cldiff);
+ clnow = make_emacs_time (t.tv_sec, t.tv_nsec);
+ cldiff = sub_emacs_time (clnow, cllast);
+ *timeout = sub_emacs_time (*timeout, cldiff);
/* Stop when timeout value crosses zero. */
if (EMACS_TIME_SIGN (*timeout) <= 0)
}
#endif
-#ifdef abort
-#undef abort
-void
-dos_abort (char *file, int line)
-{
- char buffer1[200], buffer2[400];
- int i, j;
-
- sprintf (buffer1, "<EMACS FATAL ERROR IN %s LINE %d>", file, line);
- for (i = j = 0; buffer1[i]; i++) {
- buffer2[j++] = buffer1[i];
- buffer2[j++] = 0x70;
- }
- dosmemput (buffer2, j, (int)ScreenPrimary);
- ScreenSetCursor (2, 0);
- abort ();
-}
-#else
void
-abort (void)
+emacs_abort (void)
{
dos_ttcooked ();
ScreenSetCursor (10, 0);
#endif /* __DJGPP_MINOR__ >= 2 */
exit (2);
}
-#endif
void
syms_of_msdos (void)