[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_undo.c
User: pcjc2
Date: 07/04/21 18:16:59
Modified: . o_undo.c
Log:
Whitespace and readability fixes, removed some unused code.
Revision Changes Path
1.8 +85 -107 eda/geda/gaf/gschem/src/o_undo.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_undo.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_undo.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- o_undo.c 15 Jul 2006 18:51:41 -0000 1.7
+++ o_undo.c 21 Apr 2007 22:16:59 -0000 1.8
@@ -36,9 +36,6 @@
#include <dmalloc.h>
#endif
-#define GET_PAGE_WIDTH(w) \
- ((w)->page_current->right - (w)->page_current->left)
-
static int undo_file_index=0;
static int prog_pid=0;
@@ -107,8 +104,8 @@
/* 32 is? for max length of pid and index */
- filename = g_malloc(sizeof(char)*(strlen("/gschem.save_.sch")+
- strlen(TMP)+32));
+ filename = g_malloc(sizeof(char)*(strlen("/gschem.save_.sch")
+ + strlen(TMP) + 32));
sprintf(filename, "%s%cgschem.save%d_%d.sch", TMP, G_DIR_SEPARATOR,
prog_pid,
@@ -310,7 +307,6 @@
UNDO *save_tos;
UNDO *save_current;
int save_logging;
- int diff_x;
int find_prev_data=FALSE;
int prev_status;
@@ -345,11 +341,9 @@
find_prev_data = TRUE;
if (w_current->undo_type == UNDO_DISK) {
- u_current->filename =
- o_undo_find_prev_filename(u_current);
+ u_current->filename = o_undo_find_prev_filename(u_current);
} else {
- u_current->object_head =
- o_undo_find_prev_object_head(u_current);
+ u_current->object_head = o_undo_find_prev_object_head(u_current);
}
}
@@ -369,8 +363,7 @@
s_page_delete (w_current, w_current->page_current);
p_new = s_page_new(w_current, u_current->filename);
s_page_goto (w_current, p_new);
- } else if (w_current->undo_type == UNDO_MEMORY &&
- u_current->object_head) {
+ } else if (w_current->undo_type == UNDO_MEMORY && u_current->object_head) {
PAGE *p_new;
s_page_delete (w_current, w_current->page_current);
p_new = s_page_new (w_current, save_filename);
@@ -394,19 +387,16 @@
} else if (w_current->undo_type == UNDO_MEMORY && u_current->object_head) {
- s_delete_list_fromstart(w_current,
- w_current->page_current->object_head);
+ s_delete_list_fromstart(w_current, w_current->page_current->object_head);
- w_current->page_current->object_head =
- s_basic_init_object("object_head");
+ w_current->page_current->object_head = s_basic_init_object("object_head");
w_current->page_current->object_head->type = OBJ_HEAD;
o_list_copy_all(w_current, u_current->object_head->next,
w_current->page_current->object_head,
NORMAL_FLAG);
- w_current->page_current->object_tail = return_tail(
- w_current->page_current->object_head);
+ w_current->page_current->object_tail = return_tail(w_current->page_current->object_head);
x_manual_resize(w_current);
w_current->page_current->page_control = u_current->page_control;
w_current->page_current->up = u_current->up;
@@ -434,18 +424,6 @@
/* w_current->DONT_REDRAW = 0; */
w_current->DONT_REDRAW = prev_status;
- diff_x = GET_PAGE_WIDTH (w_current);
-
-#if 0 /* zoom factor is no longer used */
-#ifdef HAS_RINT
- w_current->page_current->ZOOM_FACTOR= (int) rint(w_current->init_right /
- diff_x);
-#else
- w_current->page_current->ZOOM_FACTOR = (int) (w_current->init_right /
- diff_x);
-#endif
-#endif
-
if (!w_current->DONT_REDRAW) {
o_redraw_all(w_current);
}
@@ -503,8 +481,8 @@
char *filename;
for (i = 0 ; i < undo_file_index; i++) {
- filename = g_strdup_printf("%s%cgschem.save%d_%d.sch", TMP, G_DIR_SEPARATOR,
- prog_pid, i);
+ filename = g_strdup_printf("%s%cgschem.save%d_%d.sch", TMP,
+ G_DIR_SEPARATOR, prog_pid, i);
unlink(filename);
g_free(filename);
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs