/*
 * mpegcmd/mpegcmd.c:
 *
 * Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id: mpeglist.c,v 1.1 2001/10/12 13:51:20 root Exp root $";

/*
 * $Log: mpeglist.c,v $
 * Revision 1.1  2001/10/12 13:51:20  root
 * #
 *
 */

#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <signal.h>

#include <endian.h>

#include "libfiles.h"

int
main (int argc, char *argv[])
{
  Eweid e;
  Files f = files_user_init ();
  int n = files_num_works ();
  int i;
  char *a;
  char *b;


  for (i = 0; i < n; ++i)
    {
      e = files_work_by_num (i);
      if (e)
        {
          a = eweidtoa (e);
          b = eweid_to_text (e);

          printf ("%s\t(%d:%s)\n",  b,i,a);

          free (b);
          free (a);
          Obj_Delete (e);
        }
      else
        {
          printf ("\t\t(%d:???)\n", i);
        }
    }

  files_close (f);

  return 0;
}
