ebcdic.cc #1

  • //
  • guest/
  • perforce_software/
  • p4/
  • 2014-1/
  • support/
  • ebcdic.cc
  • View
  • Commits
  • Open Download .zip Download (981 B)
/*
 * Copyright 2000 Perforce Software.  All rights reserved.
 *
 * This file is part of Perforce - the FAST SCM System.
 */

/*
 * ebcdic.cc - etoa and atoe for the AS400
 *
 * Thank you Peter Eberlein.
 */

# ifdef OS_AS400

# include <iconv.h>

static iconv_t etoa = iconv_open("IBMCCSID00819\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 
                                 "IBMCCSID000000000100\0\0\0\0\0\0\0\0\0\0\0");
static iconv_t atoe = iconv_open("IBMCCSID00000\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 
                                 "IBMCCSID008190000100\0\0\0\0\0\0\0\0\0\0\0");

void __etoa_l(char *c, unsigned long l)
{
  char *from = c;
  char *to   = c;
  size_t from_size = (size_t)l;
  size_t to_size   = (size_t)l;

  iconv(etoa, &from, &from_size, &to, &to_size);
}

void __atoe_l(char *c, unsigned long l)
{
  char *from = c;
  char *to   = c;
  size_t from_size = (size_t)l;
  size_t to_size   = (size_t)l;

  iconv(atoe, &from, &from_size, &to, &to_size);
}

# endif
# Change User Description Committed
#1 15902 Matt Attaway A second renaming that I will not obliterate as a badge of shame
//guest/perforce_software/p4/2014_1/support/ebcdic.cc
#1 15901 Matt Attaway Clean up code to fit modern Workshop naming standards
//guest/perforce_software/p4/2014.1/support/ebcdic.cc
#1 12188 Matt Attaway Move 'main' p4 into a release specific directory in prep for new releases
//guest/perforce_software/p4/support/ebcdic.cc
#1 9129 Matt Attaway Initial commit of the 2014.1 p4/p4api source code