-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_function_skels.c
executable file
·48 lines (35 loc) · 1.1 KB
/
server_function_skels.c
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 "server_functions.h"
#include <stdio.h>
#include <string.h>
int f0_Skel(int *argTypes, void **args) {
*(int *)args[0] = f0(*(int *)args[1], *(int *)args[2]);
return 0;
}
int f1_Skel(int *argTypes, void **args) {
*((long *)*args) = f1( *((char *)(*(args + 1))),
*((short *)(*(args + 2))),
*((int *)(*(args + 3))),
*((long *)(*(args + 4))) );
return 0;
}
int f2_Skel(int *argTypes, void **args) {
/* (char *)*args = f2( *((float *)(*(args + 1))), *((double *)(*(args + 2))) ); */
*args = f2( *((float *)(*(args + 1))), *((double *)(*(args + 2))) );
return 0;
}
int f3_Skel(int *argTypes, void **args) {
f3((long *)(*args));
return 0;
}
/*
* this skeleton doesn't do anything except returns
* a negative value to mimic an error during the
* server function execution, i.e. file not exist
*/
int f4_Skel(int *argTypes, void **args) {
return -1; /* can not print the file */
}
int g5_Skel(int *argTypes, void **args) {
*(int *)args[0] = g5(*(int *)args[1], *(int *)args[2]);
return 0;
}