PostgreSQL Source Code  git master
compat_informix-charfuncs.c File Reference
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <ecpg_informix.h>
#include <stdio.h>
#include <stdlib.h>
#include <sqltypes.h>
Include dependency graph for compat_informix-charfuncs.c:

Go to the source code of this file.

Macros

#define ECPGdebug(X, Y)   ECPGdebug((X)+100,(Y))
 

Functions

int main (void)
 

Macro Definition Documentation

◆ ECPGdebug

#define ECPGdebug (   X,
 
)    ECPGdebug((X)+100,(Y))

Definition at line 9 of file compat_informix-charfuncs.c.

Function Documentation

◆ main()

int main ( void  )

Definition at line 16 of file compat_informix-charfuncs.c.

References buf, byleng(), ldchar(), printf, and rupshift().

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 }
void ldchar(char *src, int len, char *dest)
Definition: informix.c:973
int byleng(char *str, int len)
Definition: informix.c:966
#define printf(...)
Definition: port.h:198
static char * buf
Definition: pg_test_fsync.c:68
void rupshift(char *str)
Definition: informix.c:957