Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > C programming problem

Reply
Thread Tools

C programming problem

 
 
Heinrich Wolf
Guest
Posts: n/a
 
      05-18-2013
ok.

I know strupr() from my good old Turbo C 2.0 . My Borland C++ Builder 5 also
has it and for portability it lists Win32 supported; UNIX, ANSI C, ANSI C++
not supported. My linux gcc has no strupr().

I am sorry having contributed it.

Heiner

 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      05-18-2013
On Saturday, May 18, 2013 1:43:57 AM UTC+1, Jorgen Grahn wrote:
> On Fri, 2013-05-17, Malcolm McLean wrote:
>
>
> Or skip that part for now and read from stdin, write to stdout.
>
> I don't quite understand why exercises like these always want you to
> "prompt the user". In real non-GUI programs you try to avoid that
> since it prevents automation, doesn't allow for filename completion
> etc.
>
>

A real Unix program would read from stdin and write to stdout by
default, so it could be used as a filter in a Unixy pipe system. It
would also have an option to pass a filename on the commandline.

It is possible to drive programs through stdin from a master under
Unix, but it is a real grief. You have to create what is called a
pseudo-terminal to fool the system into thinking it is talking to
a human and prevent it buffering the input.
 
Reply With Quote
 
 
 
 
Rob
Guest
Posts: n/a
 
      05-22-2013
On Sat, 18 May 2013 11:36:38 +0200, Heinrich Wolf wrote:

> My linux gcc has no strupr().
>
> I am sorry having contributed it.
>
> Heiner


You may be interested in gconio.h. This includes strupr() and strlwr()
among other things, such as gotoxy().

It's a standalone header file implemented using ANSI escape sequences. It
works fine on my Linux GCC (Kubuntu 12.04 AMD64).

The homepage is here:

http://www.wence.vandermeersch.org/gconio/

Regards,

Rob.
 
Reply With Quote
 
Heinrich Wolf
Guest
Posts: n/a
 
      05-22-2013

"Rob" <(E-Mail Removed)> schrieb im Newsbeitrag
news:knibaq$nkf$(E-Mail Removed)...
....
> You may be interested in gconio.h. This includes strupr() and strlwr()
> among other things, such as gotoxy().
>
> It's a standalone header file implemented using ANSI escape sequences. It
> works fine on my Linux GCC (Kubuntu 12.04 AMD64).
>
> The homepage is here:
>
> http://www.wence.vandermeersch.org/gconio/
>
> Regards,
>
> Rob.


Thank you very much. I don't miss strupr() on my Linux. It is easy to
implement using toupper().
And if I need gotoxy(), I take curses.h

Heiner

 
Reply With Quote
 
BruceS
Guest
Posts: n/a
 
      05-22-2013
On 05/16/2013 05:26 PM, Keith Thompson wrote:
> BruceS <(E-Mail Removed)> writes:
>> On 05/16/2013 03:40 PM, James Kuyper wrote:

> [...]
>>> The key insight is that you'll need to use the toupper() function.

>>
>> Not the macro?

>
> What macro?
>
> Like any function in the standard library, toupper() may additionally be
> implemented as a macro, but the standard describes it as a function.
>
> The implementation I'm using (gcc and glibc) just provides the function,
> not a macro.


That's interesting, and I've once again learned something. I had
believed the macro to be defined by the standard. Thank you for the
correction. I looked through my copy (always a skeptic), and of course
you are right.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C (functional programming) VS C++ (object oriented programming) Joe Mayo C Programming 168 10-22-2007 01:00 AM
Can Your Programming Language Do This? Joel on functional programming and briefly on anonymous functions! Casey Hawthorne Python 4 08-04-2006 05:23 AM
a problem about VHDL programming puzzles me hezhang VHDL 5 02-16-2006 08:40 PM
Programming problem Ralf VHDL 2 02-24-2005 04:01 PM
systems programming versus application programming Matt Java 35 07-22-2004 08:10 AM



Advertisments