File: avcall-libapi.c

package info (click to toggle)
ffcall 2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,024 kB
  • sloc: asm: 100,607; ansic: 50,932; sh: 5,630; makefile: 1,588; cpp: 2
file content (89 lines) | stat: -rw-r--r-- 2,648 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * Copyright 2017-2021 Bruno Haible <bruno@clisp.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#include "config.h"

#include "avcall-internal.h"

/* This is the implementation of the library API.
   The symbols that the linker sees are all prefixed with 'avcall_',
   to avoid potential collisions with other libraries. */

int avcall_overflown (av_alist* list)
{
  return _av_overflown(AV_LIST_INNER(list));
}

void avcall_start (av_alist* list, __avword* list_args, __avword* list_args_end, __avrword(*func)(), void* raddr, int rettype, int flags)
{
  __av_start(AV_LIST_INNER(list),list_args,list_args_end,func,raddr,rettype,flags);
}

void avcall_start_struct (av_alist* list, __avword* list_args, __avword* list_args_end, __avrword(*func)(), size_t type_size, int type_splittable, void* raddr, int flags)
{
  __av_start_struct(AV_LIST_INNER(list),list_args,list_args_end,func,type_size,type_splittable,raddr,flags);
}

int avcall_arg_int (av_alist* list, int val)
{
  return __av_int(AV_LIST_INNER(list),val);
}

int avcall_arg_uint (av_alist* list, unsigned int val)
{
  return __av_uint(AV_LIST_INNER(list),val);
}

int avcall_arg_long (av_alist* list, long val)
{
  return __av_long(AV_LIST_INNER(list),val);
}

int avcall_arg_ulong (av_alist* list, unsigned long val)
{
  return __av_ulong(AV_LIST_INNER(list),val);
}

int avcall_arg_ptr (av_alist* list, void* val)
{
  return __av_ptr(AV_LIST_INNER(list),val);
}

int avcall_arg_longlong (av_alist* list, long long val)
{
  return __av_longlong(AV_LIST_INNER(list),val);
}

int avcall_arg_ulonglong (av_alist* list, unsigned long long val)
{
  return __av_ulonglong(AV_LIST_INNER(list),val);
}

int avcall_arg_float (av_alist* list, float val)
{
  return _av_float(AV_LIST_INNER(list),val);
}

int avcall_arg_double (av_alist* list, double val)
{
  return _av_double(AV_LIST_INNER(list),val);
}

int avcall_arg_struct (av_alist* list, size_t type_size, size_t type_align, const void* val_addr)
{
  return __av_struct(AV_LIST_INNER(list),type_size,type_align,val_addr);
}