Back to index

tetex-bin  3.0
Functions
input2int.c File Reference
#include "config.h"

Go to the source code of this file.

Functions

void zinput2ints P2C (integer *, a, integer *, b)
void zinput3ints P3C (integer *, a, integer *, b, integer *, c)

Function Documentation

void zinput2ints P2C ( integer ,
a  ,
integer ,
b   
)

Definition at line 10 of file input2int.c.

{
  int ch;

  while (scanf ("%ld %ld", a, b) != 2)
    {
      while ((ch = getchar ()) != EOF && ch != '\n');
      if (ch == EOF) return;
      (void) fprintf (stderr, "Please enter two integers.\n");
    }

  while ((ch = getchar ()) != EOF && ch != '\n');
}

Here is the call graph for this function:

void zinput3ints P3C ( integer ,
a  ,
integer ,
b  ,
integer ,
c   
)

Definition at line 28 of file input2int.c.

{
  int ch;

  while (scanf ("%ld %ld %ld", a, b, c) != 3)
    {
      while ((ch = getchar ()) != EOF && ch != '\n');
      if (ch == EOF) return;
      (void) fprintf (stderr, "Please enter three integers.\n");
    }

  while ((ch = getchar ()) != EOF && ch != '\n');
}

Here is the call graph for this function: