Thread: Terminal window with printf/gets support as Mac OS X Library

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    142

    Terminal window with printf/gets support as Mac OS X Library

    Hi guys,

    Is there an open source project or commercial library that I can link to my code that creates a terminal window with basic menus (File, Edit, Windows) so I can have double-clickable application that runs in that faux-terminal.

    On Mac OS X I can create text mode console application, but as such I can only use it from the Terminal application, typing its name in bash prompt. I can not have the application on desktop so I can double-click on it so it starts the terminal and runs in it. Well, at least that is what I know right now.

    Anyway, I have this friend working as developer and he's stuck in the eighties. Yes, I know. He is one of those guys that missed the GUI thing. But what can I do? He'll probably lose his job if I don't help him.

    He knows how to use printf() and gets() to write his applications. And he wrote hundreds of them. Maybe even a few thousand. He works in a company where everybody is trained to use these applications in succession. One application takes input, as I said via gets in console window and produces output in some database files. Then another application takes some more input and produces another file and then those files are fed into next application that produces printouts with reports and so on.

    Now they want to move to OS X and he's in big trouble. He needs to move all those terminal applications to Mac ASAP. We investigated the situation and at some point I said, OK, I can write the terminal window that would open automatically the first time you call printf().

    Well, turns out gets() is a pain to do. It handles all the events, menus, mouse clicks, keystrokes, copy/paste, cursor keys, saving the terminal content into a text file, printing the same content, you name it...

    So I wrote it over the weekend using all the code I wrote since '88 and it works. Sort of. There are a lot of rough edges and now I want to know if someone here wrote anything similar? Is there a library maybe or framework that gives basic functionality of a terminal window on OSX?
    Last edited by idelovski; 07-17-2011 at 05:57 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can C work outside the terminal or CMD window?
    By ryantcb in forum C Programming
    Replies: 2
    Last Post: 07-22-2010, 01:11 PM
  2. terminal window size
    By eight8ball in forum C Programming
    Replies: 5
    Last Post: 01-08-2009, 08:48 AM
  3. Adding C++ support to C thought library?
    By sept in forum C Programming
    Replies: 20
    Last Post: 09-09-2008, 05:06 AM
  4. Writing to/reading from terminal window
    By ac251404 in forum Windows Programming
    Replies: 0
    Last Post: 05-19-2006, 01:06 PM
  5. Replies: 1
    Last Post: 09-25-2003, 08:25 AM