Old 19th March 2005, 17:25   #1
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to k_rock923
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?

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 19th March 2005, 18:44   #2
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
because the blank line makes it all work.
mark is offline   Reply With Quote
Old 19th March 2005, 19:44   #3
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 19th March 2005, 21:06   #4
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to k_rock923
thank you, pulse. no .exe here

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 19th March 2005, 21:11   #5
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
Or gcc for other platforms

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 20th March 2005, 04:24   #6
griffinn
Court Jester
(Forum King)
 
griffinn's Avatar
 
Join Date: May 2000
Location: Your local toystore
Posts: 3,501
Send a message via ICQ to griffinn
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.

The smiley slot machine! | Quotable Blog
griffinn is offline   Reply With Quote
Old 20th March 2005, 05:12   #7
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 20th March 2005, 14:36   #8
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to k_rock923
kate or kwrite for me. I especially like kwrite because sometimes kate seems to use a lot of resources for a text editor.

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 20th March 2005, 14:40   #9
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
My mum is not a text editor!
mark is offline   Reply With Quote
Old 20th March 2005, 17:18   #10
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
Now I use Blodshed Dev-C++ but early stages of regular ANSI C I used notepad...

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 20th March 2005, 18:06   #11
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
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.

zootm is offline   Reply With Quote
Old 20th March 2005, 18:28   #12
drewbar
Sawg 2.0
Major Dude
 
Join Date: Mar 2004
Posts: 5,916
Pretty much every text editor in the world EXCEPT Notepad supports Unix text files.

Count with us!
Jan 1st, 12AM (PST, GMT -8) 2010 - 282,246
drewbar is offline   Reply With Quote
Old 20th March 2005, 18:56   #13
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
Do Macs use UNIX text files in OS X? They used to use some other linebreak format...

zootm is offline   Reply With Quote
Old 20th March 2005, 19:17   #14
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 21st March 2005, 00:53   #15
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to 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?

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 21st March 2005, 01:14   #16
griffinn
Court Jester
(Forum King)
 
griffinn's Avatar
 
Join Date: May 2000
Location: Your local toystore
Posts: 3,501
Send a message via ICQ to griffinn
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.

The smiley slot machine! | Quotable Blog
griffinn is offline   Reply With Quote
Old 21st March 2005, 10:34   #17
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
XP notepad also hates UNIX linebreaks.
mark is offline   Reply With Quote
Old 21st March 2005, 11:14   #18
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
It's an extremely basic text editor for Windows, it wows me that people think it's gonna deal with UNIX linebreaks...

zootm is offline   Reply With Quote
Old 21st March 2005, 11:39   #19
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
name another text editor that doesnt then.
mark is offline   Reply With Quote
Old 21st March 2005, 16:44   #20
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 21st March 2005, 17:06   #21
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
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.

zootm is offline   Reply With Quote
Old 21st March 2005, 17:25   #22
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 21st March 2005, 17:37   #23
drewbar
Sawg 2.0
Major Dude
 
Join Date: Mar 2004
Posts: 5,916
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.

Count with us!
Jan 1st, 12AM (PST, GMT -8) 2010 - 282,246
drewbar is offline   Reply With Quote
Old 21st March 2005, 17:44   #24
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
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?

zootm is offline   Reply With Quote
Old 21st March 2005, 17:52   #25
drewbar
Sawg 2.0
Major Dude
 
Join Date: Mar 2004
Posts: 5,916
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.

Count with us!
Jan 1st, 12AM (PST, GMT -8) 2010 - 282,246
drewbar is offline   Reply With Quote
Old 21st March 2005, 18:37   #26
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 21st March 2005, 22:15   #27
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
i used to do essays for school in write!
mark is offline   Reply With Quote
Old 21st March 2005, 23:47   #28
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to k_rock923
<3 edit.com

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 22nd March 2005, 02:00   #29
griffinn
Court Jester
(Forum King)
 
griffinn's Avatar
 
Join Date: May 2000
Location: Your local toystore
Posts: 3,501
Send a message via ICQ to griffinn
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?

The smiley slot machine! | Quotable Blog
griffinn is offline   Reply With Quote
Old 22nd March 2005, 02:03   #30
k_rock923
\m/
(Forum King)
 
k_rock923's Avatar
 
Join Date: Jul 2003
Location: /bin/bash
Posts: 7,850
Send a message via AIM to k_rock923
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

Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
k_rock923 is offline   Reply With Quote
Old 22nd March 2005, 03:09   #31
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
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.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump