1#include "copyright.h"
2#include "qt.h"
3
4// static void *qt_sp_bottom_save;
5
6#ifdef QT_VARGS_DEFAULT
7
8/* If the stack grows down, `vargs' is a pointer to the lowest
9   address in the block of arguments.  If the stack grows up, it is a
10   pointer to the highest address in the block. */
11
12  qt_t *
13qt_vargs (qt_t *sp, int nbytes, void *vargs,
14	  void *pt, qt_startup_t *startup,
15	  qt_vuserf_t *vuserf, qt_cleanup_t *cleanup)
16{
17  int i;
18
19  sp = QT_VARGS_MD0 (sp, nbytes);
20#ifdef QT_GROW_UP
21    for (i=nbytes/sizeof(qt_word_t); i>0; --i) {
22      QT_SPUT (QT_VARGS_ADJUST(sp), i, ((qt_word_t *)vargs)[-i]);
23    }
24#else
25    for (i=nbytes/sizeof(qt_word_t); i>0; --i) {
26      QT_SPUT (QT_VARGS_ADJUST(sp), i-1, ((qt_word_t *)vargs)[i-1]);
27    }
28#endif
29
30  QT_VARGS_MD1 (QT_VADJ(sp));
31  QT_SPUT (QT_VADJ(sp), QT_VARGT_INDEX, pt);
32  QT_SPUT (QT_VADJ(sp), QT_VSTARTUP_INDEX, startup);
33  QT_SPUT (QT_VADJ(sp), QT_VUSERF_INDEX, vuserf);
34  QT_SPUT (QT_VADJ(sp), QT_VCLEANUP_INDEX, cleanup);
35  return ((qt_t *)QT_VADJ(sp));
36}
37#endif /* def QT_VARGS_DEFAULT */
38
39#ifdef __cplusplus
40extern "C"
41#endif
42  void
43qt_null (void)
44{
45}
46
47#ifdef __cplusplus
48extern "C"
49#endif
50  void
51qt_error (void)
52{
53  extern void abort(void);
54
55  abort();
56}
57