Make appropriate formatting of a DBF value based on type.
Might return untouched input or pointer to static private buffer: use return value right away.
Definition at line 649 of file pgsql2shp-core.c.
650{
651
652
653
654
655
656
657 static char buf[9];
658
659 switch (fieldType)
660 {
661 case FTLogical:
662 buf[0] = toupper(in[0]);
663 buf[1]='\0';
664 return buf;
665 case FTDate:
666 buf[0]=in[0];
667 buf[1]=in[1];
668 buf[2]=in[2];
669 buf[3]=in[3];
670 buf[4]=in[5];
671 buf[5]=in[6];
672 buf[6]=in[8];
673 buf[7]=in[9];
674 buf[8]='\0';
675 return buf;
676 default:
677 return in;
678 }
679}
Referenced by ShpLoaderGenerateShapeRow().