File: qt.c

package info (click to toggle)
guile-core 1%3A1.3.4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,348 kB
  • ctags: 5,474
  • sloc: ansic: 45,175; lisp: 9,030; sh: 7,720; asm: 1,580; makefile: 483; awk: 162; csh: 50
file content (48 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "copyright.h"
#include "qt.h"

#ifdef QT_VARGS_DEFAULT

/* If the stack grows down, `vargs' is a pointer to the lowest
   address in the block of arguments.  If the stack grows up, it is a
   pointer to the highest address in the block. */

  qt_t *
qt_vargs (qt_t *sp, int nbytes, void *vargs,
	  void *pt, qt_startup_t *startup,
	  qt_vuserf_t *vuserf, qt_cleanup_t *cleanup)
{
  int i;

  sp = QT_VARGS_MD0 (sp, nbytes);
#ifdef QT_GROW_UP
    for (i=nbytes/sizeof(qt_word_t); i>0; --i) {
      QT_SPUT (QT_VARGS_ADJUST(sp), i, ((qt_word_t *)vargs)[-i]);
    }
#else
    for (i=nbytes/sizeof(qt_word_t); i>0; --i) {
      QT_SPUT (QT_VARGS_ADJUST(sp), i-1, ((qt_word_t *)vargs)[i-1]);
    }
#endif

  QT_VARGS_MD1 (QT_VADJ(sp));
  QT_SPUT (QT_VADJ(sp), QT_VARGT_INDEX, pt);
  QT_SPUT (QT_VADJ(sp), QT_VSTARTUP_INDEX, startup);
  QT_SPUT (QT_VADJ(sp), QT_VUSERF_INDEX, vuserf);
  QT_SPUT (QT_VADJ(sp), QT_VCLEANUP_INDEX, cleanup);
  return ((qt_t *)QT_VADJ(sp));
}
#endif /* def QT_VARGS_DEFAULT */

  void
qt_null (void)
{
}

  void
qt_error (void)
{
  extern void abort(void);

  abort();
}