PostgreSQL Source Code
git master
Loading...
Searching...
No Matches
compat_informix-charfuncs.c
Go to the documentation of this file.
1
/* Processed by ecpg (regression mode) */
2
/* These include files are added by the preprocessor */
3
#include <
ecpglib.h
>
4
#include <
ecpgerrno.h
>
5
#include <
sqlca.h
>
6
/* Needed for informix compatibility */
7
#include <
ecpg_informix.h
>
8
/* End of automatic include section */
9
#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
10
11
#line 1 "charfuncs.pgc"
12
#include <stdio.h>
13
#include <stdlib.h>
14
#include <
sqltypes.h
>
15
16
int
main
(
void
)
17
{
18
char
t1
[] =
"abc def ghi "
;
19
/* 123456789012345 */
20
char
buf
[50];
21
int
k;
22
23
printf
(
"t1: _%s_\n"
,
t1
);
24
rupshift
(
t1
);
25
printf
(
"t1: _%s_\n"
,
t1
);
26
27
k = 2;
28
ldchar
(
t1
, k,
buf
);
29
printf
(
"byleng(t1, %d): %d, ldchar: _%s_\n"
, k,
byleng
(
t1
, k),
buf
);
30
k = 5;
31
ldchar
(
t1
, k,
buf
);
32
printf
(
"byleng(t1, %d): %d, ldchar: _%s_\n"
, k,
byleng
(
t1
, k),
buf
);
33
k = 9;
34
ldchar
(
t1
, k,
buf
);
35
printf
(
"byleng(t1, %d): %d, ldchar: _%s_\n"
, k,
byleng
(
t1
, k),
buf
);
36
k = 15;
37
ldchar
(
t1
, k,
buf
);
38
printf
(
"byleng(t1, %d): %d, ldchar: _%s_\n"
, k,
byleng
(
t1
, k),
buf
);
39
40
41
return
0;
42
}
main
int main(void)
Definition
compat_informix-charfuncs.c:16
ecpg_informix.h
ecpgerrno.h
ecpglib.h
ldchar
void ldchar(char *src, int len, char *dest)
Definition
informix.c:979
rupshift
void rupshift(char *str)
Definition
informix.c:964
byleng
int byleng(char *str, int len)
Definition
informix.c:972
buf
static char buf[DEFAULT_XLOG_SEG_SIZE]
Definition
pg_test_fsync.c:71
printf
#define printf(...)
Definition
port.h:266
fb
static int fb(int x)
Definition
preproc-init.c:92
sqlca.h
sqltypes.h
src
interfaces
ecpg
test
expected
compat_informix-charfuncs.c
Generated on Thu Jan 29 2026 06:13:17 for PostgreSQL Source Code by
1.9.8