Back to index

glibc  2.9
Defines | Functions | Variables
tsp_common.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <errno.h>
#include <signal.h>
#include "tst_types.h"
#include "tgn_locdef.h"

Go to the source code of this file.


#define _TST_FUNCTION_CALL(func)   tst ##_## func
#define MAX_RESULT_REC   132


int main (int argc, char *argv[])
int result (FILE *fp, char res, const char *func, const char *loc, int rec_no, int seq_no, int case_no, const char *msg)


char result_rec [MAX_RESULT_REC]

Define Documentation

#define _TST_FUNCTION_CALL (   func)    tst ##_## func

Definition at line 8 of file tsp_common.c.

#define MAX_RESULT_REC   132

Definition at line 38 of file tsp_common.c.

Definition at line 7 of file tsp_common.c.

Function Documentation

int main ( int  argc,
char *  argv[] 

Definition at line 22 of file tsp_common.c.

  int ret;
  int debug;

  debug = argc > 1 ? atoi (argv[1]) : 0;

  if (debug)
      fprintf (stdout, "\nTST_MBWC ===> %s ...\n", argv[0]);
  ret = TST_FUNCTION_CALL (TST_FUNCTION) (stdout, debug);

  return (ret != 0);

Here is the call graph for this function:

int result ( FILE fp,
char  res,
const char *  func,
const char *  loc,
int  rec_no,
int  seq_no,
int  case_no,
const char *  msg 

Definition at line 43 of file tsp_common.c.

  if (fp == NULL
      || strlen (func) + strlen (loc) + strlen (msg) + 32 > MAX_RESULT_REC)
      fprintf (stderr,
              "Warning: result(): can't write the result: %s:%s:%d:%d:%s\n",
              func, loc, rec_no, case_no, msg);
      return 0;

  sprintf (result_rec, "%s:%s:%d:%d:%d:%c:%s\n", func, loc, rec_no, seq_no,
          case_no, res, msg);

  if (fputs (result_rec, fp) == EOF)
      return 0;

  return 1;

Here is the call graph for this function:

Variable Documentation

Definition at line 39 of file tsp_common.c.