forked from NielsLiisberg/Node.RPG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsndpgmmsg.c
39 lines (39 loc) · 1.06 KB
/
sndpgmmsg.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
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "ostypes.h"
#include "sndpgmmsg.h"
void sndpgmmsg(PUCHAR Msgid,PUCHAR Msgf, PUCHAR Type ,PUCHAR Msgdta, ... )
{
APIERR apierr = APIERR_INIT;
va_list arg_ptr;
char temp[4096];
char msgkey [10];
long stackcount=1;
int len;
va_start(arg_ptr, Msgdta);
len = vsprintf(temp, Msgdta , arg_ptr);
va_end(arg_ptr);
QMHSNDPM (Msgid, Msgf, temp , len , Type , "sndpgmmsg " ,
stackcount, msgkey , &apierr);
if (apierr.avail) {
printf ("Api error: %7s - %s" ,apierr.msgid, apierr.msgdta);
}
}
void joblog(PUCHAR text , ... )
{
APIERR apierr = APIERR_INIT;
va_list arg_ptr;
char temp[4096];
char msgkey [10];
long stackcount=1;
int len;
va_start(arg_ptr, text);
len = vsprintf(temp, text, arg_ptr);
va_end(arg_ptr);
QMHSNDPM ("CPF9898", QCPFMSG , temp , len , INFO , "joblog " ,
stackcount, msgkey , &apierr);
if (apierr.avail) {
printf ("Api error: %7s - %s" ,apierr.msgid, apierr.msgdta);
}
}