1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

- File>Save now saves to a file if a second name is given on the command line,

to stdout if not
- there's no reason anymore to disallow editing the offset in new-style
  measurements
- struct inst_ops is no longer opaque, so we can avoid adding even more silly
  little access functions and open-code straightforward callbacks
- (re)stuctured hover/click/drag logic in gui_tool.c
- added optional debugging output to gui_canvas.c
- don't let a vector's base be dragged onto the vector's own end or onto one
  of its children
- measurements can now be properly changed by dragging



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5414 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-10 13:51:51 +00:00
parent 75d9780131
commit 9c68c0de34
12 changed files with 387 additions and 96 deletions

26
fped.c
View File

@@ -11,6 +11,8 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include "cpp.h"
#include "util.h"
@@ -23,6 +25,8 @@
extern void scan_empty(void);
extern int yyparse(void);
char *save_file = NULL;
static void load_file(const char *name)
{
@@ -32,20 +36,34 @@ static void load_file(const char *name)
}
static void usage(const char *name)
{
fprintf(stderr, "usage: %s [in_file [out_file]]\n", name);
exit(1);
}
int main(int argc, char **argv)
{
const char *name = *argv;
int error;
error = gui_init(&argc, &argv);
if (error)
return error;
if (argc == 1) {
switch (argc) {
case 1:
scan_empty();
(void) yyparse();
} else {
break;
case 3:
save_file = argv[2];
/* fall through */
case 2:
load_file(argv[1]);
argc--;
argv++;
break;
default:
usage(name);
}
if (!part_name)