Teen Programmers Unite  
 

 

Return to forum top

Developing a turbo-C like editor 4 unix

Posted by manoj [send private reply] at March 29, 2002, 10:56:06 AM

I'm planning 2 do the above with a friend. Its not my assignment or anything, we've gone mad using comand line 4 c progs and r looking 4 a better interface. I think the problem can be divided into 2 parts: 1)Building an editor
2)Making something to compile,debug and run the progs.
The 1st part is easy but I don't have much info to start working on the 2nd part. I think it requires generating sub processes, which will run the compilation and running commands, and the o/ps will be somehow captured in some variables. Or may be there r some simple functions/sys calls etc to do the job. Plz tell me the right approach and some links to tutorials etc to get the corresponding info

Posted by taubz [send private reply] at March 29, 2002, 12:06:16 PM

For part 2: You'll want to open a "pipe" to those subprocesses so that you can read in the output of those commands. The STDOUT and STDERR of those processes (where they write output to) should be redirected into something that you can read (using the regular file i/o functions).

Aside from interactive debugging (which I know nothing about), Part 1 will be much harder.

- taubz

Posted by Psion [send private reply] at March 29, 2002, 12:33:45 PM

You really just want to get RHIDE and use that.

Posted by manoj [send private reply] at March 29, 2002, 01:46:29 PM

Thanx Taubz, I'm new 2 unix so that redirection n piping stuff looks complex but I hope u gave enough "keywords" to search in books. I'd appreciate if u could tell me some links etc also. But how come part1's so tough?? It takes up some time to code but the approach is rather simple and straightforward (using simple filehandling etc); and ofcourse code is always available 4 reference also(4 simple editors atleast). May be u're talking about some more complex editors. Thanks 4 help.
Hey Psion, as I said I'm new 2 unix so excuse my knowledge but I think RHIDE is some editor. Actually I(and my friend) wanted to sharpen my programming skills too. If RHIDE is some tool then plz tell me more about it.

Posted by Psion [send private reply] at March 29, 2002, 02:09:14 PM

I don't know what the difference between "some editor" and "some tool" is, but if your goal is to have an IDE (integrated development environment) for UNIX, then RHIDE is just that, acting pretty much just like the Turbo IDE's for DOS. If you want to create such a thing for the experience of doing so alone, then that's a different matter entirely, and I don't think I need to say that making anything decent of this type would take a very large amount of work. In the mean time, I'd recommend using something like RHIDE until/if you come up with your own. =)

Posted by manoj [send private reply] at March 29, 2002, 02:29:58 PM

Thanx 4 the suggestion psion[:)] but from where I see it, I just need 2 develope some function 2 do the compiling,running etc(and 2 handle the o/p ofcourse) of an open file. And as Taubz suggested, it can be done via piping and process handling. I know basic filehandling and am learning unix so it doesn't look that complex to write code 4 a crude IDE which will open,compile and run a simple program (and hadle errors etc). I haven't done anything like this before so maybe I know too little to see some other overheads involved. If u can make the matter a litle clearer, I'll be obliged.Thanx

Posted by Psion [send private reply] at March 29, 2002, 02:40:26 PM

Writing a visual debugger is no small task.

Posted by gian [send private reply] at March 29, 2002, 02:44:31 PM

manoj, what Psion has suggested is RHIDE, which is a Turbo C IDE clone (in effect).

Posted by manoj [send private reply] at March 29, 2002, 03:07:07 PM

Well dear Psion I'll atleast try it anyway. I hope I can develope a crude editor.

Gion thanx

Thanx guys u've been very helpful.

Posted by gian [send private reply] at March 29, 2002, 03:10:34 PM

Why is my name so hard to spell?
I should come up with a 14-syllable name, bet you then people would spell it perfectly...

Posted by manoj [send private reply] at March 29, 2002, 03:20:25 PM

That was a typing mistake dear gian, I apologize if I hurt ur feeling in anyway. I didn't intend to be rude or anything, trust me. I really do thank u guys 4 helping me. If u think I should know anything more besides what I told(c,c++,basic filehandling,learning unix) u, plz let me know.

Posted by gian [send private reply] at March 29, 2002, 04:34:28 PM

No, it's just that you are certainly not the first to do it, and i wonder if it is really hard to interpret or something, just wondering really....

Posted by RedX [send private reply] at March 30, 2002, 07:56:45 AM

I think 'iij1ji|jj1iiij1ijii|1ijijij' would be a good nick.
Noone is going to be able to write it correcly or write it wrongly two times in the same way. Not to mention how long it would take for someone to pronouce it correctly.

Or you could ofcourse write a program ( script, or whatever it should be called) to check for all the letter combinations with g,i,a and n and autmaticaly chang it to gian.
&;o)

(The reason I misspel your name is because 'ia' isn't used much in Dutch and 'ai' is.)

RedX

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.