delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/03/03:45:36

From: "Finland" <pekkaka AT dlc DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: writing text editor..
Date: 1 Aug 1998 14:23:05 GMT
Organization: Scifi Communications International, http://www.sci.fi/, helpdesk AT sci DOT fi, +358 3 2899111
Lines: 59
Message-ID: <01bdbd4c$48051a20$LocalHost@default>
NNTP-Posting-Host: cccxcviii.kdyn.saunalahti.fi
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Well HELLo!.

i know that the world is full with text editors but still , i guess it wont
do any bad.
just few questions.

lets imagine that the user is writing the first line and then he presses
enter (what should change line). So how can it be programmed?.

I know that all the written data will be stored in large buffer maybe in
typedef structure,
does it create overflow errors if i do it like this?.

ex.

#define max_line 65000

typedef struct
{
int line;  /* does this have to be in here? */
char max[65000];
} data

can i use following line -> data[max] ?

because if i program the writing procedure like this...

int i;
for ( i=0; i<max_line; i++)
  {
  gets(data[i].lines)  I just found an error !, this dont work because
,maybe, the gets() just takes one line.
                             how should i program this?. somethings to
notice it must change line or go back.

If somebody has enough time for those problems, then thanks in advance!.

This is my another problem. My program is called MWAV.EXE, i've been kind
of frustrated with this.
Because i cant seem to ad a new function to it. Some history, it displays
information about wavfiles.
i got 2 problems with it.

1.the printf or cprintf are not very accurate of displaying correct size or
samples, did i do something 
  wrong?, the line looks like this "printf(" there are %1d samples in
file.\r\n, wav.samples);
  JUST maybe the fread() dont read the whole file..possible?.

2.This i want to get working!, i have trying to get the program converting
the file if user wants to.
   like how many bits the file has , or whats the khz.Is there any
information about this anywhere?.
   i suppose that i have to use math functions but im more than confused.So
if anyone who knows please       PLEASE let me know, and i owe you one. Is
PCGPE worth of checking out?.is it possible to download       this?.

 email to me at pekkaka AT dlc DOT fi

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019