Header And Logo

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

compat_informix-charfuncs.c

Go to the documentation of this file.
00001 /* Processed by ecpg (regression mode) */
00002 /* These include files are added by the preprocessor */
00003 #include <ecpglib.h>
00004 #include <ecpgerrno.h>
00005 #include <sqlca.h>
00006 /* Needed for informix compatibility */
00007 #include <ecpg_informix.h>
00008 /* End of automatic include section */
00009 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
00010 
00011 #line 1 "charfuncs.pgc"
00012 #include <stdio.h>
00013 #include <stdlib.h>
00014 #include <sqltypes.h>
00015 
00016 int main(void)
00017 {
00018     char t1[] = "abc  def  ghi  ";
00019               /* 123456789012345 */
00020     char buf[50];
00021     int k;
00022 
00023     printf("t1: _%s_\n", t1);
00024     rupshift(t1);
00025     printf("t1: _%s_\n", t1);
00026 
00027     k = 2;
00028     ldchar(t1, k, buf);
00029     printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
00030     k = 5;
00031     ldchar(t1, k, buf);
00032     printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
00033     k = 9;
00034     ldchar(t1, k, buf);
00035     printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
00036     k = 15;
00037     ldchar(t1, k, buf);
00038     printf("byleng(t1, %d): %d, ldchar: _%s_\n", k, byleng(t1, k), buf);
00039 
00040 
00041     return 0;
00042 }