Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ trigraph?? whats that??
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jack
(1 post) Bio
|
Date
| Sat 07 Dec 2002 10:17 PM (UTC) |
Message
| im a beginner in starting a mud, please someone help me figure this out.
interp.c:187:14: warning: multi-line string literals are deprecated
interp.c:1243:49: warning: trigraph ??' ignored
interp.c:1244:49: warning: trigraph ??' ignored
interp.c:1245:54: warning: trigraph ??' ignored
interp.c:1246:55: warning: trigraph ??' ignored
interp.c:1247:55: warning: trigraph ??' ignored
interp.c:4122: stray '\10' in program | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 08 Dec 2002 07:31 PM (UTC) |
Message
| A trigraph is a throwback to the old days when people didn't have keyboards with lots of symbols.
eg.
??= is #
??( is [
??/ is \
??) is ]
and so on.
However in your case they are almost certainly caused by lines with incorrect line-endings. (eg. Unix lines on a DOS machine or vice-versa).
There are programs in the Utility area of the downloads section of this site to convert such files (unix2dos, dos2unix) that will fix up the line-endings.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Kilshatarr
(3 posts) Bio
|
Date
| Reply #2 on Sat 22 Mar 2003 07:40 AM (UTC) |
Message
| I have run into a similar problem, although I only have 3 trigraphs. One in act_move.c, one in act_wiz.c, and one in player.c These aren't really a big issue, since the MUD seems to work just fine, but I was wondering what I could do to get them out of the code for a cleaner compile. As suggested, I already tried changing from DOS to UNIX, but the errors remained. I did the conversion using Editpad.
Any help you could give would be great :)
Thanks for your time,
Kilsh | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sat 22 Mar 2003 09:53 PM (UTC) |
Message
| Look closely at the line number that has the reported trigraph. If you can't spot it post the line(s) in question here. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Kilshatarr
(3 posts) Bio
|
Date
| Reply #4 on Sun 23 Mar 2003 02:48 AM (UTC) |
Message
| These are the warnings I get when I compile:
act_move.c:393:14: warning: trigraph ??> ignored
act_wiz.c:1666:49: warning: trigraph ??! ignored
player.c:1024:18: warning: trigraph ??) ignored
In act_move the problem is at the end of
char *rev_exit( sh_int vdir )
This is the line:
return "<???>";
In player.c, lines 1023 and 1024 are as follows:
bug("Affect_location_name: unknown location %d.", location);
return "(???)";
And the line in act_wiz is just a carriage return as far I can tell, its in void do_rstat.
I know I'm fairly new to programing, and this is the first trigraph warnings I've encountered, so I'm at a loss for what to do about them. It'd be great if you could help me out.
-Kilsh
| Top |
|
Posted by
| Dave
Australia (93 posts) Bio
|
Date
| Reply #5 on Sun 23 Mar 2003 02:55 AM (UTC) |
Message
| Try:andBasically you need to escape the last ? so that it doesn't pick up the trigraph ??> or ??).
HTH,
Dave | Top |
|
Posted by
| Kilshatarr
(3 posts) Bio
|
Date
| Reply #6 on Tue 25 Mar 2003 03:18 AM (UTC) |
Message
| Changing the returns did clear up the errors :) Thanks for all the help!
-Kilsh | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Wed 26 Mar 2003 12:56 AM (UTC) |
Message
| Some relevant parts from the gcc man page are:
-trigraphs
Process trigraph sequences. These are three-character
sequences, all starting with ??, that are defined by
ISO C to stand for single characters. For example,
??/ stands for \, so '??/n' is a character constant
for a newline. By default, GCC ignores trigraphs, but
in standard-conforming modes it converts them. See
the -std and -ansi options.
The nine trigraphs and their replacements are
Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??-
Replacement: [ ] { } # \ ^ | ~
-Wtrigraphs
Warn if any trigraphs are encountered. This option
used to take effect only if -trigraphs was also speci-
fied, but now works independently. Warnings are not
given for trigraphs within comments, as they do not
affect the meaning of the program.
-ansi
In C mode, support all ISO C89 programs. In C++ mode,
remove GNU extensions that conflict with ISO C++.
This turns off certain features of GCC that are incom-
patible with ISO C89 (when compiling C code), or of
standard C++ (when compiling C++ code), such as the
"asm" and "typeof" keywords, and predefined macros
such as "unix" and "vax" that identify the type of
system you are using. It also enables the undesirable
and rarely used ISO trigraph feature. For the C com-
piler, it disables recognition of C++ style // com-
ments as well as the "inline" keyword.
In summary, if you have -ansi mode on the compiler will process trigraphs, however whether or not you have that option set, you will be warned about them if the -Wtrigraphs warning is active.
You could suppress that by using the -Wno-trigraphs command-line option.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
22,220 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top