/* file s_encode.c */

#if !defined(COMPILE_ENVIRONMENT)
#include <gp/stdcenvf.h> /* std compile environment for functions */
#endif

#if !defined(LEX_COMPILE_ENVIRONMENT)
#include <plex/stdcenvf.h> /* phonlex compile environment for functions */
#endif

void str_encode(char *s, char *sx, char *sy)
/*************************************************************/
/* Does cypher encoding on s, mapping sx chars to sy chars.  */
/*************************************************************/
                
{char *p; int i;
 for (p = s; *p != '\0'; p++)
   {for (i=0; i <= strlen(sx); i++) if (*p == sx[i]) *p = sy[i];
   }
 return;
}
