[tex-k] first steps with libkpathsea

Patrick Gundlach texkml at contextgarden.net
Mon Jun 13 14:55:21 CEST 2005


Hello out there,

I have no idea if I am at the right place to ask. I currently try my
fist steps with libkpathsea and I wonder why I get "not found" in the
following program:

--------------------------------------------------
#include <stdio.h>
#include "kpathsea/config.h"
#include "kpathsea/pathsearch.h"
#include "kpathsea/tex-file.h"

int main (int argc, char *argv[]) {
  char *filename;
  /* kpse_set_program_name("kpsewhich",NULL); */
  kpse_set_program_name(argv[0],NULL);
  filename=kpse_find_file("ec.enc",kpse_enc_format,false);
  if (filename)
    printf("filename=%s\n",filename); 
  else
    printf("not found\n");
  
  return 0;
}
--------------------------------------------------

I can fool libkpathsea by calling kpse_set_program_name with some well
known program name, but this is not the intended behaviour, I guess.
Could anybody enlighten me?

Patrick



More information about the tex-k mailing list