Header And Logo

PostgreSQL
| The world's most advanced open source database.

Defines | Functions

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.

Defines

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

Functions

int main (void)

Define Documentation

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

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

Referenced by main(), and test().


Function Documentation

int main ( void   ) 

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

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

{
    char t1[] = "abc  def  ghi  ";
              /* 123456789012345 */
    char buf[50];
    int k;

    printf("t1: _%s_\n", t1);
    rupshift(t1);
    printf("t1: _%s_\n", t1);

    k = 2;
    ldchar(t1, k, buf);
    printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
    k = 5;
    ldchar(t1, k, buf);
    printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
    k = 9;
    ldchar(t1, k, buf);
    printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
    k = 15;
    ldchar(t1, k, buf);
    printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);


    return 0;
}