I have very little experience with gcc compilation under different environments, so please bear with me. I carried over 20 years old project into Ubuntu 18.04, it has old style K&R parameters, no function declarations to speak of, many functions without return are not declared void, and on and on...
I did a bit of cleanup and I realized that if I use -ansi then my compilation is almost 100% clean. But one simple routine complains about fdopen when I specify -ansi, without -ansi there is no complains.
Here is the code:
Here is my compilation attempt:
I'd appreciate suggestions on what would be reasonable set of compiler flags. A simple C standards documentation covering those flags and those __USE_ macros would be much appreciated
Last edited by migurus; 10-13-2018 at 09:21 PM..
Reason: cut/paste did not work in Linux/Firefox, had to boot windows and make it readable in Chrome
To anyone that can answer this:
Are the differences great between the ANSI and K&R standard? What are some of the major differences between them??
-REM (1 Reply)
Dear All,
I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
hi , I came acroos two functions fdopen() and freopen().
what is the difference between these two functions and where can they be used. Is it that fdopen() is used to write freopen().
Advance Thanks for your co-operation.
:) (1 Reply)
Good Day
I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC)
Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty.
Detailed Errors are as follows
Internal... (3 Replies)
I am a student. And need help on following program. I want to make a c program.
I have to scan a sentence and I have to interchange a word from that sentence.
Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Hi,
I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this?
Thanks,
Sunil (0 Replies)
I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry?
Only print out:
Thread ID: 0 START!
Thread ID: 0 END!
Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies
LEARN ABOUT SUSE
ansi_cmacros
term::ansi::code::macros(n) Terminal control term::ansi::code::macros(n)
__________________________________________________________________________________________________________________________________________________NAME
term::ansi::code::macros - Macro sequences
SYNOPSIS
package require Tcl 8.4
package require textutil::repeat
package require textutil::tabify
package require term::ansi::code::macros ?0.1?
::term::ansi::code::macros::names
::term::ansi::code::macros::import ?ns? ?arg...?
::term::ansi::code::macros::menu menu
::term::ansi::code::macros::frame string
_________________________________________________________________DESCRIPTION
This package provides higher level control sequences for more complex shapes.
API
INTROSPECTION
::term::ansi::code::macros::names
This command is for introspection. It returns as its result a list containing the names of all attribute commands.
::term::ansi::code::macros::import ?ns? ?arg...?
This command imports some or all attribute commands into the namespace ns. This is by default the namespace macros. Note that this
is relative namespace name, placing the imported command into a child of the current namespace. By default all commands are
imported, this can howver be restricted by listing the names of the wanted commands after the namespace argument.
SEQUENCES
::term::ansi::code::macros::menu menu
The description of a menu is converted into a formatted rectangular block of text, with the menu command characters highlighted
using bold red text. The result is returned as the result of the command.
The description, menu, is a dictionary mapping from menu label to command character.
::term::ansi::code::macros::frame string
The paragraph of text contained in the string is padded with spaces at the right margin, after normalizing internal tabs, and then
put into a frame made of box-graphics. The result is returned as the result of the command.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category term of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
ansi, control, frame, menu, terminal
COPYRIGHT
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
term 0.1 term::ansi::code::macros(n)