mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-05 06:29:42 +02:00
605bd52dc9
- columns can now be deleted/undeleted - reset active row if deleting that row - grammar now accepts an empty file - when a non-canvas entry becomes editable, we set the focus to it - when adding the first reference to a frame, make it active - when deleting the active reference to a frame, set the pointer to NULL - measurements didn't have a drag_new action, causing trying to create them to crash fped - offset field of measurements was incorrectly labeled "width" - fixed operator precedence in gridify. Someone needs more sleep :-( git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5398 99fdad57-331a-0410-800a-d7fa5415bdb3
66 lines
1.1 KiB
C
66 lines
1.1 KiB
C
/*
|
|
* fped.c - Footprint editor, main function
|
|
*
|
|
* Written 2009 by Werner Almesberger
|
|
* Copyright 2009 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
|
|
|
|
#include "cpp.h"
|
|
#include "util.h"
|
|
#include "error.h"
|
|
#include "obj.h"
|
|
#include "inst.h"
|
|
#include "gui.h"
|
|
|
|
|
|
extern void scan_empty(void);
|
|
extern int yyparse(void);
|
|
|
|
|
|
static void load_file(const char *name)
|
|
{
|
|
reporter = report_parse_error;
|
|
run_cpp_on_file(name);
|
|
(void) yyparse();
|
|
}
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int error;
|
|
|
|
error = gui_init(&argc, &argv);
|
|
if (error)
|
|
return error;
|
|
if (argc == 1) {
|
|
scan_empty();
|
|
(void) yyparse();
|
|
} else {
|
|
load_file(argv[1]);
|
|
argc--;
|
|
argv++;
|
|
}
|
|
|
|
if (!part_name)
|
|
part_name = stralloc("_");
|
|
|
|
reporter = report_to_stderr;
|
|
if (!instantiate())
|
|
return 1;
|
|
// inst_debug();
|
|
error = gui_main();
|
|
if (error)
|
|
return error;
|
|
|
|
// dump(stdout);
|
|
|
|
return 0;
|
|
}
|