mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fix misc compiler warnings, add copyrights, license info
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@658 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5faee3bde1
commit
7196e69163
@ -42,7 +42,7 @@ static void qfInsertTextRec( QuickFill *qf, const char * text, int depth );
|
||||
* of the internals of QuickFill into one file. *
|
||||
\********************************************************************/
|
||||
|
||||
int
|
||||
static int
|
||||
CHAR_TO_INDEX( char c )
|
||||
{
|
||||
c = toupper(c)-0x40;
|
||||
|
@ -66,4 +66,4 @@ void xaccAddCell (CellBlock *, BasicCell *, int row, int col);
|
||||
void xaccNextRight (CellBlock *, int row, int col,
|
||||
int next_row, int next_col);
|
||||
|
||||
#endif __XACC_CELL_BLOCK_H__
|
||||
#endif /* __XACC_CELL_BLOCK_H__ */
|
||||
|
@ -1,8 +1,36 @@
|
||||
/*
|
||||
* FILE:
|
||||
* combocell.c
|
||||
*
|
||||
* FUNCTION:
|
||||
* implement motif portions of a pull-down combo widget
|
||||
* embedded in a table cell.
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) 1998 Linas Vepstas
|
||||
*/
|
||||
/********************************************************************\
|
||||
* 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. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <ComboBox.h>
|
||||
#include <Xbae/Matrix.h>
|
||||
|
||||
#include "combocell.h"
|
||||
|
||||
|
@ -1,12 +1,38 @@
|
||||
|
||||
/*
|
||||
* FILE:
|
||||
* datecell.c
|
||||
*
|
||||
* FUNCTION:
|
||||
* implements a gui-independent date handling cell.
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (C) 1997 Robin D. Clark
|
||||
* Copyright (c) 1998 Linas Vepstas
|
||||
*/
|
||||
/********************************************************************\
|
||||
* 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. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
* *
|
||||
* Author: Rob Clark *
|
||||
* Internet: rclark@cs.hmc.edu *
|
||||
* Address: 609 8th Street *
|
||||
* Huntington Beach, CA 92648-4632 *
|
||||
\********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util.h"
|
||||
@ -33,7 +34,6 @@
|
||||
#include "pricecell.h"
|
||||
|
||||
static void PriceSetValue (struct _BasicCell *, const char *);
|
||||
static void Set (BasicCell *, const char *);
|
||||
|
||||
#define DECIMAL_PT '.'
|
||||
|
||||
|
@ -1,4 +1,31 @@
|
||||
/*
|
||||
* FILE:
|
||||
* quickfillcell.c
|
||||
*
|
||||
* FUNCTION:
|
||||
* Implements a text cell with automatic typed-phrase
|
||||
* completion.
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) 1988 Linas Vepstas
|
||||
*/
|
||||
/********************************************************************\
|
||||
* 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. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "basiccell.h"
|
||||
|
@ -1,4 +1,31 @@
|
||||
/*
|
||||
* FILE:
|
||||
* recncell.c
|
||||
*
|
||||
* FUNCTION:
|
||||
* Implements a mouse-click cell that allows a series
|
||||
* of values to be clicked through.
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) Linas Vepstas
|
||||
*/
|
||||
/********************************************************************\
|
||||
* 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. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "messages.h"
|
||||
#include "register.h"
|
||||
|
||||
@ -161,8 +163,10 @@ configLayout (BasicRegister *reg, int type)
|
||||
SET (VALU_CELL, 8, 0, 10, VALUE_STR);
|
||||
SET (SHRS_CELL, 9, 0, 10, TOT_SHRS_STR);
|
||||
SET (BALN_CELL, 10, 0, 12, BALN_STR);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* setup custom labels for the debit/credit columns */
|
||||
@ -202,7 +206,9 @@ configLayout (BasicRegister *reg, int type)
|
||||
case STOCK_LEDGER:
|
||||
reg->labels [DEBT_CELL] = SOLD_STR;
|
||||
reg->labels [CRED_CELL] = BOUGHT_STR;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@ -268,15 +274,15 @@ BasicRegister * xaccMallocBasicRegister (int type)
|
||||
/* HDR is a utility to set up the header row */
|
||||
#define HDR(NAME) \
|
||||
{ \
|
||||
BasicCell *cell; \
|
||||
cell = xaccMallocTextCell(); \
|
||||
cell->width = NAME##_CELL_W; \
|
||||
BasicCell *hcell; \
|
||||
hcell = xaccMallocTextCell(); \
|
||||
hcell->width = NAME##_CELL_W; \
|
||||
if (1 == reg->num_header_rows) { \
|
||||
xaccAddCell (header, cell, 0, NAME##_CELL_C); \
|
||||
xaccAddCell (header, hcell, 0, NAME##_CELL_C); \
|
||||
} else { \
|
||||
xaccAddCell (header, cell, NAME##_CELL_R, NAME##_CELL_C); \
|
||||
xaccAddCell (header, hcell, NAME##_CELL_R, NAME##_CELL_C); \
|
||||
} \
|
||||
xaccSetBasicCellValue (cell, reg->labels[NAME##_CELL]); \
|
||||
xaccSetBasicCellValue (hcell, reg->labels[NAME##_CELL]); \
|
||||
}
|
||||
|
||||
/* BASIC & FANCY macros initialize cells in the register */
|
||||
@ -298,7 +304,6 @@ void xaccInitBasicRegister (BasicRegister *reg, int type)
|
||||
{
|
||||
Table * table;
|
||||
CellBlock *curs, *header;
|
||||
BasicCell *cell;
|
||||
|
||||
/* --------------------------- */
|
||||
configLayout (reg, type);
|
||||
|
@ -118,6 +118,6 @@ void xaccInitBasicRegister (BasicRegister *, int type);
|
||||
/* returns non-zero value if updates have been made to data */
|
||||
unsigned int xaccGetChangeFlag (BasicRegister *);
|
||||
|
||||
#endif __XACC_REGISTER_H__
|
||||
#endif /* __XACC_REGISTER_H__ */
|
||||
|
||||
/* ============ END OF FILE ===================== */
|
||||
|
@ -27,6 +27,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
@ -63,11 +64,6 @@ xaccMallocTable (void)
|
||||
void
|
||||
xaccInitTable (Table * table)
|
||||
{
|
||||
int num_header_rows;
|
||||
int num_phys_rows;
|
||||
int num_phys_cols;
|
||||
int i,j;
|
||||
|
||||
table->table_widget = 0;
|
||||
table->next_tab_group = 0;
|
||||
|
||||
@ -632,6 +628,8 @@ cellCB (Widget mw, XtPointer cd, XtPointer cb)
|
||||
lcbs->doit = True;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -652,6 +650,8 @@ cellCB (Widget mw, XtPointer cd, XtPointer cb)
|
||||
leaveCB (mw, cd, cb);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1060,7 +1060,7 @@ xaccCreateTable (Table *table, Widget parent, char * name)
|
||||
void
|
||||
xaccRefreshTableGUI (Table * table)
|
||||
{
|
||||
{int i,j;
|
||||
{int i;
|
||||
printf (" refresh %d %d \n", table->num_phys_rows,table->num_phys_cols);
|
||||
for (i=0; i<table->num_phys_rows; i++) {
|
||||
printf ("cell %d %s \n", i, table->entries[i][3]);
|
||||
|
@ -107,5 +107,5 @@ void xaccMoveCursorGUI (Table *, int virt_row, int virt_col);
|
||||
/* copy text in the cursor cells to the table */
|
||||
void xaccCommitCursor (Table *);
|
||||
|
||||
#endif __XACC_TABLE_H__
|
||||
#endif /* __XACC_TABLE_H__ */
|
||||
/* ================== end of file ======================= */
|
||||
|
@ -1,4 +1,30 @@
|
||||
/*
|
||||
* FILE:
|
||||
* textcell.c
|
||||
*
|
||||
* FUNCTION:
|
||||
* implements the simplest possible cell -- a text cell
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) 1988 Linas Vepstas
|
||||
*/
|
||||
/********************************************************************\
|
||||
* 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. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
\********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "basiccell.h"
|
||||
|
Loading…
Reference in New Issue
Block a user