super_snoop.c

src/super_snoop.c · 474 B

From the archive Lpmud-CD.03.31beta1.tar.gz

Download the archive   « Back to the archive contents

#include <stdio.h>

volatile int num_super_snooped;
char super_snooped[256][16];
char super_snoopfile[256][32];

void 
read_snoop_file()
{
  FILE *f;
  int i;
  f = fopen("../snoops/snooped","r");
  if (f == NULL)
  {
      num_super_snooped = 0;
      return;
  }
  for (i = 0; fscanf(f, "%s", super_snooped[i]) != EOF && i < 256 ; i++)
  {
      strcpy(super_snoopfile[i], "../snoops/");
      strcat(super_snoopfile[i], super_snooped[i]);
  }
  num_super_snooped = i;
}

Site Stats

Snippets: 1791
Codebases: 571