Programa de hoja de calculo

Páginas: 26 (6418 palabras) Publicado: 29 de junio de 2010
// ================================================================================
// Chroma v1.0 Spreadsheet
// Copyright (C) Julio Saucedo. (julio@quanter.com)
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU Library General Public License as published
// by the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.

// This library 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 Library General Public
// License for more details.

// You should have received a copy of the GNU Library General Public License
// along withthis program; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ================================================================================

// This program use the math expression evaluator made by Rainer Huebenthal

// julio@quanter.com
// julio@quantico-software.com#include <graphics.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
#include <string.h>
#include <ctype.h>
#include <math.h>

#define COL_CELDA 1
#define FILAS 26
#define COLUM 8
#define TAMAN 80

const int TRUE = 1;
const int FALSE = 0;

int modificado = FALSE;
int guardado = FALSE;

enumenumbotones {bcancelar, bsi, bno, bok, bnuevo, bguardar,
baceptar, babrir, bsalir, bcreditos };

const char msgbotones[10][20] = {"Cancelar", "S¡", "No", "Ok",
"Nuevo","Guardar", "Aceptar",
"Abrir", "Salir", "Cr‚ditos"};
int col=43, fil=74;
char nombrehoja[20] = "";

enum enummsgs {mfx, mterminar, mguardarcambios,
medivcero, mesint, mesobreflujo, mguardarh,mabrirh,
mconfirme, meguardar,meabrir,mnull,mnuevahoja, msep,
mext, mnombreprogr , mversion};

const char msgs[17][40] = {"Ÿx:",
"¨Desea terminar el programa?",
"¨Desea guardar los cambios?",
"ERROR DIV 0",
"SINT ERROR",
"SOBREFLUJO",
"Guardar hoja",
"Abrir hoja",
"Confirme",
"Error al guardar la hoja",
"Error al abrir la hoja",
"",
"Nuevahoja.hja",
" - ",
".HJA",
"CHROMA",
"1.04"
};

enum direccion {arriba, abajo, derecha, izquierda};
enum pnlstyle {raised, lowered};

typedef struct {int col, fil; } celda;

celda celda_act;

char buffer[TAMAN]="_";
char hoja_a[FILAS][COLUM][TAMAN]; // operaciones
double hoja_b[FILAS][COLUM]; // resultados

/* interrupciones para el rat¢n *//*//////////////////////////////*/
void quitarraton(void);
void verraton(void);
void leexyraton(int *x,int *y,int *boton);
void llevarraton(int x, int y);
/*//////////////////////////////*/

/* dibuja un bot¢n con caption centrado */
void boton(int x1,int y1,
int x2, int y2,
int fill,
int color,
const char *caption,
int colorcaption);

/* dibuja un bot¢n presionado */
voidpresionado(int x1,int y1,
int x2, int y2,
int fill,
int color,
const char *caption,
int colorcaption);

/* inicializa los gr ficos, return(1: sin errores, 0: error) */
int iniciagraf();

void dibujapantalla(void);

/*dibuja una ventana con caption en el centro */
void ventana(int x1, int y1,
int x2, int y2,
const char *caption,
int colorborde,
int color,int fontsize);

/* dibuja las filas y columnas*/
void dibujaceldas(int titulos);

/* dibuja una l¡nea con estilo y color*/
void linea(int x1, int y1,
int x2, int y2,
int color, int linestyle);

/* dibuja una barra con relleno y color*/
void barra(int x1, int y1, int x2, int y2, int fill, int color);

/* outtextxy con color */
void mensajexy(int x, int y, const char...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programa hoja de calculo
  • 5 programas e hojas de calculo
  • Hojas de calculo
  • Hojas De Calculo
  • hoja calculo
  • Hoja de calculo
  • hoja de calculo
  • Hojas de calculo

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS