Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   General Discussions (http://forums.winamp.com/forumdisplay.php?f=1)
-   -   Why is it that gcc give a warning? (http://forums.winamp.com/showthread.php?t=210857)

k_rock923 19th March 2005 17:25

Why is it that gcc give a warning?
 
Why is it that gcc (and perhaps other compilers) give you a warning if you don't have a blank line at the end of a source file?

mark 19th March 2005 18:44

because the blank line makes it all work.

PulseDriver 19th March 2005 19:44

The reason is that you don't have the right linebreak... some windows programs makes the wrong linebreak charcode.. if you have ever opened a document in Notepad or similar and everything in the document is on a single line with black boxes in between the words, that's the correct type of linebreak that shuts up gcc.exe

k_rock923 19th March 2005 21:06

thank you, pulse. no .exe here ;)

PulseDriver 19th March 2005 21:11

Or gcc for other platforms ;)

griffinn 20th March 2005 04:24

Quote:

Originally posted by PulseDriver
The reason is that you don't have the right linebreak... some windows programs makes the wrong linebreak charcode.. if you have ever opened a document in Notepad or similar and everything in the document is on a single line with black boxes in between the words, that's the correct type of linebreak that shuts up gcc.exe
That's not the real reason.

The real reason is that it's conventional to have a blank line at the end of a program source. When most programmers do it and you have a file without the blank line, it's probable that the file was not downloaded completely, or truncated at the wrong position, etc.. gcc is just being nice by reminding you to double-check the file for completeness.

PulseDriver 20th March 2005 05:12

I've tried it, I used notepad for coding.. whining, and I put a "black box" from another document in at the end of the line.. (I did have a line at the end before too), and voilà, no whine.

There are different linebreaks, wordpad converts the ones that notepad don't but I think wordpad makes the same linebreaks as notepad if you press enter... meaning, you get the same whine using wordpad as notepad.

k_rock923 20th March 2005 14:36

kate or kwrite for me. I especially like kwrite because sometimes kate seems to use a lot of resources for a text editor.

mark 20th March 2005 14:40

My mum is not a text editor! :p

PulseDriver 20th March 2005 17:18

Now I use Blodshed Dev-C++ but early stages of regular ANSI C I used notepad...

zootm 20th March 2005 18:06

I use jEdit, since I write many different languages (Java, Javascript, XUL, XBL, generic XML, Java, C, OCaml, Python and a couple of others) for various reasons, and screw getting a seperate IDE for each one. Also, jEdit is cross-platform, meaning I can use the same one on both Windows and Linux. Which is especially handy since I don't really like EMacs, and can't stand using Vim.

drewbar 20th March 2005 18:28

Pretty much every text editor in the world EXCEPT Notepad supports Unix text files.

zootm 20th March 2005 18:56

Do Macs use UNIX text files in OS X? They used to use some other linebreak format...

PulseDriver 20th March 2005 19:17

I belive it's UNIX linebreaks that notepad don't understand. We're talking about win98 notepad here, not the one with XP cause that one is greately improved since win98.

k_rock923 21st March 2005 00:53

It can get very confusing i think when you work on a file in something like kate and you get some lines that are particularly long. Then you open them in gedit or something similar and all of a sudden, word wrap is on!!! wtf?

griffinn 21st March 2005 01:14

Quote:

Originally posted by k_rock923
It can get very confusing i think when you work on a file in something like kate and you get some lines that are particularly long. Then you open them in gedit or something similar and all of a sudden, word wrap is on!!! wtf?
Word wrapping is an optional feature. The defaults for optional features in different programs are understandably different. If you don't like the default, you can customise it.

mark 21st March 2005 10:34

XP notepad also hates UNIX linebreaks.

zootm 21st March 2005 11:14

It's an extremely basic text editor for Windows, it wows me that people think it's gonna deal with UNIX linebreaks...

mark 21st March 2005 11:39

name another text editor that doesnt then.

PulseDriver 21st March 2005 16:44

To convert a charcode isn't much hard work when it's ASCII... even I could make a code for that :P

When it's reading the datastream, everytime it stumbles across a UNIX linebreak, change the charcode to the appropriate one..

OR it could just read both as linebreaks... even saving the old ones as the old charcode..which would make a mess on another text editor that can't read both types... so there are some places where the line breaks and some places it fails.. maybe to much of a mezz when I think of it.

zootm 21st March 2005 17:06

Quote:

Originally posted by nobby™
name another text editor that doesnt then.
Name another text editor with as limited a feature set, which is written for Windows.

PulseDriver 21st March 2005 17:25

Well, since notepad have excisted since the dawn of windows... thinking of edit.com as it's ancestor, there would be a whole lot of wasted time to make such a program wouldn't it? The XP version can at least replace text, it alos have feedback on what line/char the marker is, and it can also save by <ctrl> + <s>

All these features didn't excist in the win3.1/95/98 version of notepad.

Looking away from the fact that it can't convert/create UNIX linebreaks, Notepad clearly is the ASCII editor for the simple minded. Many ppl like it that way, and I can actually say I have used it for a lot of HTML and C. For C/C++ nowadays I use Dev-C++ and for everything else (like MAKI), I use Textpad 4 Evaluation which I got on a CD with one of my Java books. I like it very much, and the only thing I don't like it for, is the lack of coloring certain types of documents, like XML which I automatically set to HTML so I at least get attribute comments and < > filtered with colors.

drewbar 21st March 2005 17:37

I know it's notepad, and susposed to be dead simple and not on top of Mircosoft's development list. But really, how hard would it be to add Unix file support.

zootm 21st March 2005 17:44

How useful would it be? It's designed for taking notes. It would be trivial to add it, but it's support for the format of another OS -- why add it?

A thought though -- maybe services for UNIX adds support?

drewbar 21st March 2005 17:52

Yeah, but it is also the default application for .TXT files. If you want to be the defualt for them you should support all of them.

PulseDriver 21st March 2005 18:37

And if you MUST convert the linebreaks, you can also use the wordpad.. which always have been able to convert linebreaks properly.. or write as it was named under win3x

mark 21st March 2005 22:15

i used to do essays for school in write!

k_rock923 21st March 2005 23:47

<3 edit.com

griffinn 22nd March 2005 02:00

Quote:

Originally posted by PulseDriver
Well, since notepad have excisted since the dawn of windows... thinking of edit.com as it's ancestor, there would be a whole lot of wasted time to make such a program wouldn't it? The XP version can at least replace text, it alos have feedback on what line/char the marker is, and it can also save by <ctrl> + <s>
Comically enough, edit.com does support Unix line breaks. That calls into question whether notepad really descended from edit.com. My theory is that notepad is a high-school programming project that some Microsoft guy/gal stole from his/her son/daughter.

edlin.com anyone?

k_rock923 22nd March 2005 02:03

Wow. I never even noticed that. I think I'm going to write my term paper in edit.com

On a side not. . . http://www.command.com

PulseDriver 22nd March 2005 03:09

No, Notepad doesn't decend from edit.com, but it's what microsoft replaced edit.com with for windows. I belive windows 1.0 still used Edit, but 3.1 you had both.


All times are GMT. The time now is 14:29.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.