PostgreSQL Source Code
git master
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:977
rupshift
void rupshift(char *str)
Definition:
informix.c:962
byleng
int byleng(char *str, int len)
Definition:
informix.c:970
buf
static char * buf
Definition:
pg_test_fsync.c:73
printf
#define printf(...)
Definition:
port.h:244
sqlca.h
sqltypes.h
src
interfaces
ecpg
test
expected
compat_informix-charfuncs.c
Generated on Thu Oct 10 2024 00:13:26 for PostgreSQL Source Code by
1.9.1