Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Text Editor in C (Univ assignment)

Name: Anonymous 2011-01-12 4:39

So hey guys :3

I've got this paper that I have to do, and I need to make a text editor. Please assist me and offer tips as I'm currently trying to think this thing through before I get to the actual coding.

•I'm going to be saving everything in a 20x80 matrix, or a string[1601] so I can use every individual character written, is this correct? (I'm declaring the maximum number of chars on screen to 20 lines with 80 columns, fuck anything more, this is a first semester assignment, hence the matric and string lengths)

•How on earth does I shot cursor? I mean, I'm supposed to have the cursor move up and down so the user can write at different parts of his text. Now, I can think of a way to shove the characters of the string "left" or "right" by making an individual proc, but how would one actually go and make the cursor move? Any ideas would be welcome.

•I'm unfamiliar with C extracting anything in .txt format, derp, will google later. Everything we've worked so far is hurrr command prompt calculations.

•In general, any ideas from you experienced coders, feedback, tips, anything, will be bloody welcome. Although I've worked with BYOND and Space Station 13 (/tg/station13) before so I'm familiar with reading Spaghetti code or structured coding using and calling procs() (oh hey I can probably go look at the code there and gather ideas and code formations) I think I'm at a stage where, being confused, I don't even know what QUESTIONS to ask to myself before I start solving the problem.

Just for the record, im studying CS at AUTH university, greece.

Name: Anonymous 2011-01-12 15:03

this thread sucks.

Name: Anonymous 2011-01-12 15:45


@echo off
echo This is MY editor, i made it....
pause
edit %1 %2

Name: Anonymous 2011-01-12 16:35

>>42
time ttwo bust out THE EDITing porgram....
lets EDIT this......
where making this happen......

Name: Anonymous 2011-01-13 1:29

>>39

Aye, got it. Got the C Bible through univ book distribution, I believe it's the same.

also, the lack of that knowledge is only temporary, as it's most probably second semester teaching material.
Due to a lot of students being here through Philosophical schools (as we have them in greece) they haven't worked with programming before, so we have to re-take the entire thing from the start, from a basic indented if to how to include libraries.

Name: Anonymous 2011-01-13 1:34

>>44
If the publisher was deranged enough to rename the K&R to anything involving the word ``Bible'', I'd ditch it and get the real thing. They're dirt-cheap now, you could rob a homeless man and buy the book with his one day's earnings.

Name: Anonymous 2011-01-13 4:55

I concur gentlemen here. Do a line editor.  We don't need yet another clone of edit.exe.
We need more clones of ed. Don't forget about regexes.

Name: Anonymous 2011-01-13 5:04

>>46
We need more clones of ed.

ed(1) is already perfect.

Name: Anonymous 2011-01-13 9:30

ed has too many commands, it needs to be streamlined

Name: Anonymous 2011-01-13 9:33

#include <stdlib.h>

int main(void)
{
    return system(getenv("EDITOR"));
}

Name: Anonymous 2011-01-13 11:31

>>47
Ed is a little sucky, actually. If it didn't take four extra characters to type sam -d I wouldn't use ed at all.

Name: Anonymous 2011-01-13 11:45

>>50
Go back to cat-v.org

Name: Anonymous 2011-01-13 11:52

>>47
Keep telling yourself that. DeNile it's not just a large body of water on the north coast of Africa.

Name: Anonymous 2011-01-13 12:12

Name: Anonymous 2011-01-13 13:12

This message was typed on a CHERRY G80-3000

Name: Anonymous 2011-01-13 13:18

This message was typed on Emacs using Conkeror's edit-current-field-in-external-editor, bind to C-i

Name: Anonymous 2011-01-13 14:48

[hide]kill yourself[/hide]

Name: Anonymous 2011-01-13 14:48

<hide>kill yourself</hide>

Name: Anonymous 2011-01-13 14:54

\hide{kill yourself}

Name: Anonymous 2011-01-13 15:04

>>58
Back to your basement, old man. Get to writing volume six!

Name: Anonymous 2011-01-13 17:06

>>58
Did you seriously just try using LATEX to do [o][u][i][b]BBCode's job?

Name: Anonymous 2011-01-13 17:06

>>60
FUCK

Name: Anonymous 2011-01-13 17:11

>>60,61
Learn to BBCode

Name: Anonymous 2011-01-13 18:49

>>60
It was a viable SexpCode alternative at one point.

Name: Anonymous 2011-01-14 6:30

2^6 GET

Name: Back to /b/, !uaVa00FkCs 2011-01-14 6:33

>>64
Back to /b/, ``please''.

Name: Anonymous 2011-01-14 6:40

>>65
Fuck off, ``faggot''.

Name: Back to /b/, !uaVa00FkCs 2011-01-14 6:42

>>66
Back to /b/, ``please''.

Name: Fuck off, !Ep8pui8Vw2 2011-01-14 6:44

>>67
Fuck off, ``faggot''.

Name: Back to /b/, !uaVa00FkCs 2011-01-14 6:46

>>68
Back to /b/, ``please''.

Name: Fuck off, !Ep8pui8Vw2 2011-01-14 6:47

>>69
Fuck off, ``faggot''.

Name: Back to /b/, !uaVa00FkCs 2011-01-14 6:47

>>70
Back to /b/, ``please''.

Name: Fuck off, !Ep8pui8Vw2 2011-01-14 6:48

>>71
Fuck off, ``faggot''.

inb4 back to /b/

Name: Back to /b/, !uaVa00FkCs 2011-01-14 6:49

>>72
Back to /b/, ``please''.

anon delivers

Name: Anonymous 2011-01-14 6:53

>>65-73
ONE WORD: HAX MY ANUS

Name: Anonymous 2011-01-14 8:16

I agree with >>73.

Name: Anonymous 2011-01-14 12:30

>>73
fuck off faggot

Name: Anonymous 2011-01-14 12:49

sage for >>76's faggotry

Name: Anonymous 2011-01-14 13:34

>>77
bump for >>77's faggotry

Name: Anonymous 2011-01-14 13:38

>>78
noko for >>78's faggotry

Name: Anonymous 2011-01-14 13:50

>>79
Noko doesn't work on a text board,``faggot''.
Away with ye; and heigh thyself back to /b/, sodomite.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List