Back to index

tetex-bin  3.0
Functions
kps.c File Reference
#include "web2c.h"

Go to the source code of this file.

Functions

string uppercasify P1C (const_string, s)
FILE *xfopen P2C (const_string, filename, const_string, mode)
void xfclose P2C (FILE *, f, const_string, filename)

Function Documentation

string uppercasify P1C ( const_string  ,
s   
)

Definition at line 32 of file kps.c.

{
  string target;
  string ret = malloc (strlen(s) + 1);

  target = ret;
  while (*s) {
      *target = toupper(*s);
      target++;
      s++;
  }
  *target = '\0';
  
  return ret;
}

Here is the call graph for this function:

FILE* xfopen P2C ( const_string  ,
filename  ,
const_string  ,
mode   
)

Definition at line 52 of file kps.c.

{
  FILE *f;

  assert (filename && mode);

  f = fopen (filename, mode);
  if (f == NULL) {
    perror(filename);
    exit(EXIT_FAILURE);
  }

  return f;
}

Here is the call graph for this function:

void xfclose P2C ( FILE ,
f  ,
const_string  ,
filename   
)

Definition at line 69 of file kps.c.

{
  assert (f);

  if (fclose (f) == EOF) {
    perror(filename);
    exit(EXIT_FAILURE);
  }
}

Here is the call graph for this function: