Discuss Text editor in C in the C Programming forum on Dev Shed. Text editor in C C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
Posts: 56
Time spent in forums: 21 m 25 sec
Reputation Power: 8
Hi!
You need an editor or you have to write one?? If you want a simple text editor written in C, just grab pico, nano or something like that. If you're the one to write it, just try doing it and post here again when you have coding problems.
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
macar: I need to write one, but I have no ida how to do this. I'm just a begginner but I need this text editor's source very much...
P.S. Sorry for my english...
Location: Central New York. Texan via Arizona, out of his element!
Posts: 8,472
Time spent in forums: 4 Weeks 6 h 37 m 17 sec
Warnings Level: 20
Number of bans: 3
Reputation Power: 3242
The thing is, we don't generally serve as a free-code-on-demand software store. Being cruel creatures, we extract our price in sweat and anguish by normally making the requestor produce some code with which we then offer help. Particularly in those cases where the product is the person's homework or job.
__________________
Functionality rules and clarity matters; if you can work a little elegance in there, you're stylin'.
If you can't spell "u", "ur", and "ne1", why would I hire you? 300 baud modem? Forget I mentioned it. DaWei on PointersPolitically Incorrect.
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
DaWei_M: I don't know if I understood correctly, but I realy need this editor just to get graduate (sorry again for my english)
I could help other people in their problems in matlab or other languages, but I definitely don't know anything about C.
Macar: It's DOS or Linux - one of those.
Sorry for problems caused by my request, but You are my last chance...
Posts: 56
Time spent in forums: 21 m 25 sec
Reputation Power: 8
Quote:
Originally Posted by MaKLeR
Macar: It's DOS or Linux - one of those.
Well, make up your mind before you start the work!
As regards DOS, I know nothing (expept one useful function called gotoxy()...).
As regards Linux, look for a Ncurses tutorial - Ncurses is a widget set, but unlike GTK+ and Qt it works on console. This will be helpful in designing the interface for your editor.
Also, download source code of a simple text editor and try to analyse it. I might prove very helpful, although sometimes very difficult .
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
I'm just trying to analize the JOE's Editor - and it's too difficult to me. I just want something like joe, but I want it to be simple to write... I mean it doesn't have to be so much functions...
Posts: 144
Time spent in forums: 7 h 48 m 6 sec
Reputation Power: 8
Writing a working editor is never easy
No matter which platform you choose an editor is a hard task. It will probably require a couple of thousand lines of well structured code to have an editor that can be reasonably usable. I think you should check out exactly what you are expected to do. I seriously doubt that you have to write a fully fledged editor.
If you have a lot of freedom on what platform, operating system and you have access to Visual Studio at school you could always write a simple notepad look-alike in MSVC++ or MSVB. Writing a editor from scratch is not for the faint of heart.
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
This text editor is too much for me. I'll try to write simple code which should be written in C (console programme which may be compiled under linux - using gcc compiler), should get text from keyboard (let's say 2000 charakters) and after each line of text should print this line and ask if it's ok or not.
If ok - then write it to file (name of file as a parameter of programme) and continue with next line of text.
If not ok - than read the line of text again...
If nothing promped in (I mean "enter") - should end.
I still don't know how to do this... Can anyone help me with this task?
I know I mess too much on this forum and cause problems - sorry for that but I count on Yours unerstanding.
Posts: 136
Time spent in forums: < 1 sec
Reputation Power: 8
Think how you would do it if you were to use your memory or a piece of paper as a file. First you would get the information into your brain (hint: scanf() or gets()). Then, you would see if the maximum line width (80) has been reached. Then, if the user presses enter (ascii 10, if im not mistaken), save the line to file. After, repeat the whole thing over again until only an enter is entered.
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 8,978
Time spent in forums: 1 Month 2 Weeks 6 Days 22 h 11 m 29 sec
Reputation Power: 3561
Probably easiest to write code for Windows or X-Windows environment (using Kylix/C++ Builder). You can easily bang out a Notepad clone (or better) in less than 1/2 hour. As for writing a text editor in DOS, you might want to look around for the right tools -- Borland used to supply a library called Turbo Vision that may have had a text editor class built in. Then again, these are in C++, not C.
I did write a text editor in C a long time ago. However, that was using Turbo C 1.5 and I don't have that code on me right now.
__________________ Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne Diary of a first time dog owner <-- my cousin's blog
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
super_serge: Exactly - i know how to write headers, how to get started with the main function, how to scan string, but I don't know nothing about file operations. I don't know how to write string to file (I mean something like ">>" in linux's bash) and how to pass the argument (the name of file to write text to) to the main function. I'm total lame...
Location: Central New York. Texan via Arizona, out of his element!
Posts: 8,472
Time spent in forums: 4 Weeks 6 h 37 m 17 sec
Warnings Level: 20
Number of bans: 3
Reputation Power: 3242
You say that it is very important and urgent that you have a simple text editor, and that YOU need to write it. Your frustration at your inability to do so is quite palpable. I have the feeling you need this to show that you are qualified for something, say a job. You should think very carefully about that, should it be the case, for it would be a short and unhappy stint for all concerned. If I'm wide of the mark, I apologize; if I'm not, you really do need to hear it.