Exemplo n.º 1
0
Arquivo: report.c Projeto: veox/pcb
static int
Report (int argc, char **argv, Coord x, Coord y)
{
  if ((argc < 1) || (argc > 2))
    AUSAGE (report);
  else if (strcasecmp (argv[0], "Object") == 0)
    {
      gui->get_coords (_("Click on an object"), &x, &y);
      return ReportDialog (argc - 1, argv + 1, x, y);
    }
  else if (strcasecmp (argv[0], "DrillReport") == 0)
    return ReportDrills (argc - 1, argv + 1, x, y);
  else if (strcasecmp (argv[0], "FoundPins") == 0)
    return ReportFoundPins (argc - 1, argv + 1, x, y);
  else if ((strcasecmp (argv[0], "NetLength") == 0) && (argc == 1))
    return ReportNetLength (argc - 1, argv + 1, x, y);
  else if (strcasecmp (argv[0], "AllNetLengths") == 0)
    return ReportAllNetLengths (argc - 1, argv + 1, x, y);
  else if ((strcasecmp (argv[0], "NetLength") == 0) && (argc == 2))
    return ReportNetLengthByName (argv[1], x, y);
  else if (argc == 2)
    AUSAGE (report);
  else
    AFAIL (report);
  return 1;
}
Exemplo n.º 2
0
Arquivo: report.c Projeto: thequux/pcb
static int
Report (int argc, char **argv, int x, int y)
{
  if (argc < 1)
    AUSAGE (report);
  else if (strcasecmp (argv[0], "Object") == 0)
    {
      gui->get_coords ("Click on an object", &x, &y);
      return ReportDialog (argc - 1, argv + 1, x, y);
    }
  else if (strcasecmp (argv[0], "DrillReport") == 0)
    return ReportDrills (argc - 1, argv + 1, x, y);
  else if (strcasecmp (argv[0], "FoundPins") == 0)
    return ReportFoundPins (argc - 1, argv + 1, x, y);
  else if (strcasecmp (argv[0], "NetLength") == 0)
    return ReportNetLength (argc - 1, argv + 1, x, y);
  else if (strcasecmp (argv[0], "AllNetLengths") == 0)
    return ReportAllNetLengths (argc - 1, argv + 1, x, y);
  else
    AFAIL (report);
  return 1;
}