static int info (int argc, char **argv, Coord x, Coord y) { int i, j; int top_group, bottom_group; if (!PCB || !PCB->Data || !PCB->Filename) { printf("No PCB loaded.\n"); return 0; } printf("Filename: %s\n", PCB->Filename); pcb_printf("Size: %ml x %ml mils, %mm x %mm mm\n", PCB->MaxWidth, PCB->MaxHeight, PCB->MaxWidth, PCB->MaxHeight); top_group = GetLayerGroupNumberBySide (TOP_SIDE); bottom_group = GetLayerGroupNumberBySide (BOTTOM_SIDE); for (i=0; i<MAX_LAYER; i++) { int lg = GetLayerGroupNumberByNumber (i); for (j = 0; j < MAX_GROUP; j++) putchar(j==lg ? '#' : '-'); printf(" %c %s\n", lg == top_group ? 'c' : lg == bottom_group ? 's' : '-', PCB->Data->Layer[i].Name); } return 0; }
static int info (int argc, char **argv, Coord x, Coord y) { int i, j; int cg, sg; if (!PCB || !PCB->Data || !PCB->Filename) { printf("No PCB loaded.\n"); return 0; } printf("Filename: %s\n", PCB->Filename); pcb_printf("Size: %ml x %ml mils, %mm x %mm mm\n", PCB->MaxWidth, PCB->MaxHeight, PCB->MaxWidth, PCB->MaxHeight); cg = GetLayerGroupNumberByNumber (component_silk_layer); sg = GetLayerGroupNumberByNumber (solder_silk_layer); for (i=0; i<MAX_LAYER; i++) { int lg = GetLayerGroupNumberByNumber (i); for (j=0; j<MAX_LAYER; j++) putchar(j==lg ? '#' : '-'); printf(" %c %s\n", lg==cg ? 'c' : lg==sg ? 's' : '-', PCB->Data->Layer[i].Name); } return 0; }
static int Debug (int argc, char **argv, Coord x, Coord y) { int i; printf ("Debug:"); for (i = 0; i < argc; i++) printf (" [%d] `%s'", i, argv[i]); pcb_printf (" x,y %$mD\n", x, y); for (i = 0; i < max_copper_layer + SILK_LAYER; i++) { printf("0x%08x %s (%s)\n", PCB->Data->Layer[i].Type, PCB->Data->Layer[i].Name, layertype_to_string (PCB->Data->Layer[i].Type)); } return 0; }