Back to index

tetex-bin  3.0
Functions | Variables
flisearch.c File Reference
#include <stdio.h>
#include <string.h>
#include "basics.h"
#include "filenames.h"
#include "psearch.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
int matching (char *font, int size)

Variables

char * fontname
int dpi
int margin = 0

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 16 of file flisearch.c.

                                 {
   char *path, *file, *fn;
   int matching(char *, int);

   /* get path and file arguments */
   if (argc != 4) fatal("Usage: psearch path fontname dpi\n");
   path = argv[1]; fontname = argv[2]; dpi = atoi(argv[3]);

   /* find <file> in <path> */
   fn = search_flipath(path, matching);
   if (fn == NULL) msg("%s at %d dpi not found\n", fontname, dpi);
   else msg("%s: %s at %d dpi found\n", fn, fontname, dpi);
   exit(0);
}

Here is the call graph for this function:

int matching ( char *  font,
int  size 
)

Definition at line 34 of file flisearch.c.

                                   {

   if ((strcmp(font, fontname) == 0) && (size == dpi ||
      (size >= dpi - margin && size <= dpi+margin))) 
      return 1;
   else
      return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 14 of file flisearch.c.

char* fontname

Definition at line 14 of file flisearch.c.

int margin = 0

Definition at line 14 of file flisearch.c.