children.c~

MudOSa4DGD/mudlib/dgd/lib/sys/efun/children.c~ · 516 B

From the archive MudOSa4DGD-30.06.98.tar.gz

Download the archive   « Back to the archive contents

/*
 * children.c
 *
 * Get a list of objects sharing a source_file_name
 * NB! This function is slow. Do not overuse!
 *
 * (C) Frank Schmidt, Jesus@NorseMUD
 *
 */

#include <objects.h>

static object *children(string file) {
  object *obs, *childs;
  int i;
  /* search through objects() for similar source-filenames */
  file = source_file_name(file);
  childs = ({ });
  for (i=::sizeof(obs=objects()); --i >= 0; ) {
    if (file == source_file_name(obs[i]))
      childs += ({ obs[i] });
  }
  return childs;
}

Site Stats

Snippets: 1791
Codebases: 571