Re: What can I do??????????

Search this archive.

From: P.Aubry (paubry@weinfelden.ch)
Date: Sun 14 Jan 2001 - 18:54:49 IST


Marco Melo wrote:

> Hi, i compiled this program and when i run it it said
> that the core is dumped what is the problem?? can you
> help me please?
>
>





//---------------------------------------------------------------------------
//  visi.c  == Marco Melo's Visiong.c  modified by Pierre Aubry
//---------------------------------------------------------------------------
// Dear Marco the following program should work. But you really should try
// to get Jay Link's book I mentioned in my e-mail
//---------------------------------------------------------------------------
#include <stdlib.h>
#include <unistd.h>              // needed if you really want to use sleep();
#include <vga.h>
#include <vgagl.h> 
void font8x8init(int color);       // 8x8 = the only font included in SVGAlib
/*********************** main **********************************************/
int main()                                      // gcc just wants main as int
{
  vga_init();
  vga_setmode(G320x200x256); 
  //  vga_setcolor(10);
  gl_setcontextvga(G320x200x256);    
  font8x8init(10);
  gl_write(10, 10, "Hello, Marco !\0"); 
  //sleep(5);
  vga_getch();                            // you can wait as long as you want    
  vga_setmode(TEXT);
  //return EXIT_SUCCESS;     
  exit(0);                                                 // less to write !
}
/********************** functions ******************************************/
void font8x8init(int color)
{
  //#define FONT_WIDTH 8  //#define FONT_HEIGHT 8
  //void *f8x8 = malloc(256 * FONT_WIDTH * FONT_HEIGHT * BYTESPERPIXEL);
  void *f8x8 = malloc(256 * 8 * 8 * 1);                       
  gl_expandfont(8, 8, color, gl_font8x8, f8x8);
  gl_setfont(8, 8, f8x8);
}
/*********************** eof ***********************************************/
ÿ


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST