473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Spelling

Hello c.l.c,

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?
--
gnat.
Nov 14 '05 #1
10 1387
"gnat" <gn**@no.email.please> wrote in message
news:66rZb.41748$Hy3.29354@edtnps89...
Hello c.l.c,

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?


If you put so much text in between quotes that you need a spelling
checker, then you need to re-consider your data structures. What
about, for example, an external text file? That could even be
transformed into a C source. After checking spelling of course ;-)

Peter
Nov 14 '05 #2
On Fri, 20 Feb 2004, gnat wrote:
Hello c.l.c,

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?


This is less about C language about more about development. You need to at
least tell us what operating system you are using. Realistically, the
moment you need to mention the OS you are off topic for c.l.c. You
probably want to ask in a newsgroul that deals with your OS.

--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 14 '05 #3
Peter Pichler wrote:
"gnat" <gn**@no.email.please> wrote in message
news:66rZb.41748$Hy3.29354@edtnps89...
Hello c.l.c,

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?

If you put so much text in between quotes that you need a spelling
checker, then you need to re-consider your data structures. What
about, for example, an external text file? That could even be
transformed into a C source. After checking spelling of course ;-)

Peter


Thats an interesting idea, i think i'll try that.

--
gnat.
Nov 14 '05 #4
Darrell Grainger wrote:
On Fri, 20 Feb 2004, gnat wrote:
Hello c.l.c,
Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?

This is less about C language about more about development.


You may well be right.
You need to at least tell us what operating system you are using.
I was kind of hoping for an open source spell checker with the
capabilities - i run both Windows and Linux, and the target is an
embedded app without an os.
Realistically, the moment you need to mention the OS you are off
topic for c.l.c.
Agreed.
You probably want to ask in a newsgroul that deals with your OS.


I thought for a bit as to whether or not this would be off topic,
and came to the conclusion that it may well be, but as i am using
C i would need a spell checker that could parse C and understand
C at least to the level to understand that strings are to be
checked and that it should ignore anything else. So that was the
thought process, your right though, the post may have been better
placed in comp.software-eng or some other ng that deals with
tools, not language.

--
gnat.
Nov 14 '05 #5
On Fri, 20 Feb 2004, gnat wrote:
Darrell Grainger wrote:
On Fri, 20 Feb 2004, gnat wrote:
Hello c.l.c,
Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?


This is less about C language about more about development.


You may well be right.
You need to at least tell us what operating system you are using.


I was kind of hoping for an open source spell checker with the
capabilities - i run both Windows and Linux, and the target is an
embedded app without an os.


The OS you are using to develop the app would be the place to check. I
could whip something up on Linux easier than Windows. I'm sure people in
UNIX programming newsgroups would have some suggestions. Or it might be
better for something like a Perl or Python newsgroup (I'd use Perl, a
library and some cookbook algorithms to spell check the code).
Realistically, the moment you need to mention the OS you are off
topic for c.l.c.


Agreed.
You probably want to ask in a newsgroul that deals with your OS.


I thought for a bit as to whether or not this would be off topic,
and came to the conclusion that it may well be, but as i am using
C i would need a spell checker that could parse C and understand
C at least to the level to understand that strings are to be
checked and that it should ignore anything else. So that was the
thought process, your right though, the post may have been better
placed in comp.software-eng or some other ng that deals with
tools, not language.


Think multi-tool. Use something like Perl to parse the code then pass the
text to something that can spell check straight text. I would imagine
someone has a parse routine or two you could modify and someone else has
written a library to spell check via Perl.

I like someone else's idea of putting the data into a different file and
then spell checking the file outside of the C environment. I was thinking
more of stuff I work on. Large project developed over many years. The
amount of text in it has grown to a huge amount. Writing a spell checker
to go through the legacy code would be a neat idea. We occassionally spot
a spelling mistake on a dialog or prompt. It would be nice to
systematically find all of them.

Now you got me think about something to do just for the fun of it. 8^)
Won't be in C language though.

--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 14 '05 #6
gnat wrote:
Hello c.l.c,

Are there any spell checkers out that will go through C code and tell me
if i have misspelled anything that is in between quotes (ie. data that
may be shown to the end user)?


strings a.out | grep ' ' | spell

seems to do a reasonable job picking out words in phrases which might be spelled
incorrectly.

/david

--
Andre, a simple peasant, had only one thing on his mind as he crept
along the East wall: 'Andre, creep... Andre, creep... Andre, creep.'
-- unknown
Nov 14 '05 #7
He might even want a special spell checker that will perform spell
checking on C comments.
Nov 14 '05 #8
gnat wrote:

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?


Write yourself a filter that will extract all such strings from a
source file, and outputs them with a preceding line number, as in:

1234: "This is a suspicious string"

and then spell check the resultant file. You can then do the
whole thing with a pipe something like:

filter <source.c | spellcheck

The filter probably wants to absorb \n, \t, %d, etc.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #9
gnat <gn**@no.email.please> wrote in message news:<wqtZb.41875$Hy3.22071@edtnps89>...
Darrell Grainger wrote:
On Fri, 20 Feb 2004, gnat wrote:
Hello c.l.c,
Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?

This is less about C language about more about development.


You may well be right.
You need to at least tell us what operating system you are using.


I was kind of hoping for an open source spell checker with the
capabilities - i run both Windows and Linux, and the target is an
embedded app without an os.
Realistically, the moment you need to mention the OS you are off
topic for c.l.c.


Agreed.
You probably want to ask in a newsgroul that deals with your OS.


I thought for a bit as to whether or not this would be off topic,
and came to the conclusion that it may well be, but as i am using
C i would need a spell checker that could parse C and understand
C at least to the level to understand that strings are to be
checked and that it should ignore anything else. So that was the
thought process, your right though, the post may have been better
placed in comp.software-eng or some other ng that deals with
tools, not language.


There is a command to do this in the GNU Emacs editor:

M-x ispell-comments-and-strings

ask gnu.emacs.help, other editors may do it, ask comp.editors.

Alternatively write a filter to remove all the strings from a C file
and pass them through a command line spell checker such as ispell.
Nov 14 '05 #10
gnat <gn**@no.email.please> wrote in message news:<66rZb.41748$Hy3.29354@edtnps89>...
Hello c.l.c,

Are there any spell checkers out that will go through C code and
tell me if i have misspelled anything that is in between quotes
(ie. data that may be shown to the end user)?

While this is OT, Visual SlickEdit can spell check strings and
comments for any language he has a template for (which does include
C).
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: English Teacher | last post by:
Which would be a more useful language to learn, Smalltalk or Pearl? Learning curves any different? Thanks!
5
by: Joel Rodrigues | last post by:
Hi, I seem to recall once coming across & using functionality in PostgreSQL that allowed for some flexibility in the spelling of a query term. For example, if one meant to look for 'Honda', but...
6
by: Jesse Engle | last post by:
i'm working on two client and server programs that send and recieve files using sockets. i saw a c++ example using csockets, and thought i could use the basic idea of what the code was doing to...
53
by: KraftDiner | last post by:
I've spent hours trying to find a bug that was a simple spelling mistake. in an init method I declare a variable self.someLongName later in a different method of the class I use...
3
by: Peter | last post by:
Hello! I'm trying to implement a method, that checks spelling of a text and suggests corrections. The C# program looks like: ... Word.Application spellApp = new Word.Application();...
8
by: Nick 'The Database Guy' | last post by:
Hi, I am fully aware of the F7 spell check in access, and I am also aware that this can be automated with the statement, SendKeys "{F7}" However when you do this you are presented with a...
4
by: lyle | last post by:
Sometimes before clicking "Post" I copy my message, open Word and paste. Word is excellent, and can suggest synonyms and translations. But it takes a while for Word to open. Recently, I've been...
1
by: zafar | last post by:
Hi, I want to make a personal digital library, For that I need make a search engine, User can search by giving the key words, but the spelling of given key word may be incorrect, so It is needed...
2
by: knkk | last post by:
Hi, I came across this perl script someone wrote for spelling suggestions when someone types a wrong spelling. Can someone please convert it to PHP? It will help a lot of people. I am attaching...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.