promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/sysprim.c,v 9.23 1987/10/08 17:04:49 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/sysprim.c,v 9.24 1987/10/28 18:42:53 jinx Exp $
*
* Random system primitives. Most are implemented in terms of
* utilities in os.c
extern Boolean OS_Clean_Interrupt_Channel();
Primitive_2_Args();
- return (OS_Clean_Interrupt_Channel(Get_Integer(Arg1),
- Get_Integer(Arg2)) ?
- TRUTH : NIL);
+ PRIMITIVE_RETURN(OS_Clean_Interrupt_Channel(Get_Integer(Arg1),
+ Get_Integer(Arg2)) ?
+ TRUTH : NIL);
}
Built_In_Primitive(Prim_Get_Next_Interrupt_Char, 0,
/*NOTREACHED*/
}
IntCode &= ~INT_Character;
- return Make_Unsigned_Fixnum(result);
+ PRIMITIVE_RETURN(Make_Unsigned_Fixnum(result));
}
\f
/* Time primitives */
{
Primitive_0_Args();
- return Make_Unsigned_Fixnum(System_Clock());
+ PRIMITIVE_RETURN(Make_Unsigned_Fixnum(System_Clock()));
}
Built_In_Primitive(Prim_Setup_Timer_Interrupt, 2,
Set_Int_Timer(Days, Centi_Seconds);
}
IntCode &= ~INT_Timer;
- return NIL;
+ PRIMITIVE_RETURN(NIL);
}
\f
/* Date and current time primitives */
Primitive_0_Args(); \
\
result = OS_Name(); \
- if (result == -1) \
- return NIL; \
- return Make_Unsigned_Fixnum(result); \
+ PRIMITIVE_RETURN((result == -1) ? \
+ NIL : \
+ (Make_Unsigned_Fixnum(result))); \
}
Built_In_Primitive(Prim_Current_Year, 0, "CURRENT-YEAR", 0x126)
extern Boolean Restartable_Exit();
Primitive_0_Args();
- return ((Restartable_Exit() ? TRUTH : NIL));
+ PRIMITIVE_RETURN((Restartable_Exit() ? TRUTH : NIL));
}
/* (SET-RUN-LIGHT! OBJECT)
Built_In_Primitive(Prim_Set_Run_Light, 1, "SET-RUN-LIGHT!", 0xC0)
{
Primitive_1_Arg();
+
#ifdef RUN_LIGHT_IS_BEEP
- extern void OS_tty_beep();
+ {
+ extern void OS_tty_beep();
- OS_tty_beep();
- OS_Flush_Output_Buffer();
- return TRUTH;
+ OS_tty_beep();
+ OS_Flush_Output_Buffer();
+ PRIMITIVE_RETURN(TRUTH);
+ }
#else
- return NIL;
+ PRIMITIVE_RETURN(NIL);
#endif
}
extern Boolean OS_Under_Emacs();
Primitive_0_Args();
- return (OS_Under_Emacs() ? TRUTH : NIL);
+ PRIMITIVE_RETURN((OS_Under_Emacs() ? TRUTH : NIL));
}