*/
#include "gsint.h"
+#include<langinfo.h>
/*
* Types and definitions.
if (token2 == NULL) \
CFG_FATAL ((stderr, _("missing argument: %s"), token));
+void search_and_replace(char *str, char *search, char *replace) {
+ char *pos;
+ int search_len = strlen(search);
+ int replace_len = strlen(replace);
+
+ while ((pos = strstr(str, search)) != NULL) {
+ char tmp[strlen(str) + 1];
+ strcpy(tmp, pos + search_len);
+ strcpy(pos, replace);
+ strcpy(pos + replace_len, tmp);
+ str = pos + replace_len;
+ }
+}
int
read_config (char *path, char *file)
{
{
token2 = GET_TOKEN (NULL);
CHECK_TOKEN ();
+ search_and_replace(token2,"$HOME",getenv("HOME"));
xfree (afm_path);
afm_path = xstrdup (token2);
}
(void **) &cp2))
{
/* Not it is not, we must include this resource. */
+#include<langinfo.h>
fprintf (ofp, "%%%%IncludeResource: font %s\n", cp);
/*
enc_flags);
break;
+ case ENC_ISO_8859_15:
+ (void) afm_font_encoding (font, AFM_ENCODING_ISO_8859_15,
+ enc_flags);
+ break;
+
case ENC_ASCII:
(void) afm_font_encoding (font, AFM_ENCODING_ASCII, enc_flags);
break;