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