473,765 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cross-platform: Coloured text, Networking, Multithreading


I'm currently writing a program and I've got in mind to keep it as
portable as possible. In particular I want it to run on Linux and
Windows, but I'm also keeping an open mind to any machine that has a
screen and is capable of Ethernet networking. The program requires
three things that aren't available in the C Standard:
1) Coloured text (for a console application)
2) Raw socket networking
3) Multithreading

For number 1, I've already written my own tiny little cross-platform
library (it uses ANSI escape sequences for Linux, and Win32 API
functions for Windows).

For number 2, I've again written my own tiny little cross-platform
library (it uses Berkeley Sockets for Linux, and winpcap for Windows
-- I would have used Winsock for Windows but Winsock no longer
supports raw sockets).

For number 3, well I'm just about to delve into it now. I see that
somebody has already ported the "pthreads" library to Win32, so that
looks like a very attractive option. Just before I go down that road
though, I'd like to ask if anyone has a better idea than to use
pthreads?
Nov 12 '08
42 2640
Richard Heathfield <rj*@see.sig.in validwrites:
>comp.lang.c already serves the purpose that you appear to have in mind for
comp.lang.is o-c, making that suggestion redundant.

(not trolling) but the suggestion is *not* redundant.

It comes with the suggestion that the name comp.lang.iso-c would provide a
clearer label for those ill-informed about the current use of comp.lang.c

--
Chris.
Nov 13 '08 #21
On Thu, 13 Nov 2008 03:41:51 +0000, Richard Heathfield
<rj*@see.sig.in validwrote:
>Lorenzo Villari said:
>>
"Kenny McCormack" <ga*****@shell. xmission.comha scritto nel messaggio
news:gf******* **@news.xmissio n.com...
>>>
You will soon learn that this newsgroup is about everything except C.

So split it. comp.lang.c and comp.lang.iso-c :)

Note that Mr McCormack is either lying, incorrect, or making a not very
successful foray into the world of sarcasm.

comp.lang.c already serves the purpose that you appear to have in mind for
comp.lang.is o-c, making that suggestion redundant.

For discussing things that aren't ISO C, we already have over 80,000
newsgroups. Why would we need yet another?
It is arguable that there is no group that is about programming
in C, and even that comp.lang.c used to be that group.
Richard Harter, cr*@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
Save the Earth now!!
It's the only planet with chocolate.
Nov 13 '08 #22
Chris McDonald wrote:
Richard Heathfield <rj*@see.sig.in validwrites:
>comp.lang.c already serves the purpose that you appear to have in mind for
comp.lang.is o-c, making that suggestion redundant.


(not trolling) but the suggestion is *not* redundant.

It comes with the suggestion that the name comp.lang.iso-c would provide a
clearer label for those ill-informed about the current use of comp.lang.c
The groupname field was not designed to be an all encompassing
definition of its purpose.

Take the groups ending in .tv - related to audiovisual entertainment, or
cross-dressing, or the state of Tuvalu, or what? There are alt. groups
that have highly cryptic names on purpose. Do you propose to go through
the entire hierarchy and enforce descriptive names? Won't work. For one
thing, the groupname is too short. For another, defining the group is
the charter or equivalent is for. For a third, if you lurk for a few
days the topicality will be clear. If you still can't figure out the
topicality, you can always ask.

Some servers seem to support a description field, but I suspect few new
users bother to read those.

Nov 13 '08 #23

"Richard Heathfield" <rj*@see.sig.in validwrote in message
news:Iq******** *************** *******@bt.com. ..
>Tomás Ó hÉilidhe wrote:
Yes. He hit my killfile some months ago, for racism, of all things.

I find it surprising that so many people who witnessed that discussion and
should therefore be aware of his racist attitude continue to enter into
further technical discussions with him despite the absence of any apology
or retraction on his behalf. (But then I find many things surprising.)
Well, some people are more tolerant than others.

"Richard Heathfield" <rj*@see.sig.in validwrote in message
news:Iq******** *************** *******@bt.com. ..
Lorenzo Villari said:
>So split it. comp.lang.c and comp.lang.iso-c :)
comp.lang.c already serves the purpose that you appear to have in mind for
comp.lang.iso-c, making that suggestion redundant.
There is already c.l.c.moderated , which could serve the purpose of the
..iso-c suggestion.

I don't have a problem with c.l.c being wider-ranging, especially as it's
not very active at the minute.
--
Bartc

Nov 13 '08 #24
On 13 Nov, 03:46, Richard Heathfield <r...@see.sig.i nvalidwrote:
Martin Ambuhl said:
Tomás Ó hÉilidhe wrote:
On Nov 12, 11:39 pm, vipps...@gmail. com wrote:
I find it surprising that so many people who witnessed that discussion and
should therefore be aware of [Tomás Ó hÉilidhe's] racist attitude continue
to enter into
further technical discussions with him despite the absence of any apology
or retraction on his behalf. (But then I find many things surprising.)
unfortunatly my killfile is stored in memory (my memory!) and is
hence unreliable

--
Nick Keighley

Nov 13 '08 #25
Mark McIntyre <ma**********@T ROUSERSspamcop. netwrites:
>Chris McDonald wrote:
>Richard Heathfield <rj*@see.sig.in validwrites:
>>comp.lang.c already serves the purpose that you appear to have in mind for
comp.lang.i so-c, making that suggestion redundant.


(not trolling) but the suggestion is *not* redundant.

It comes with the suggestion that the name comp.lang.iso-c would provide a
clearer label for those ill-informed about the current use of comp.lang.c
>The groupname field was not designed to be an all encompassing
definition of its purpose.
>Take the groups ending in .tv - related to audiovisual entertainment, or
cross-dressing, or the state of Tuvalu, or what? There are alt. groups
that have highly cryptic names on purpose. Do you propose to go through
the entire hierarchy and enforce descriptive names? Won't work. For one
thing, the groupname is too short. For another, defining the group is
the charter or equivalent is for. For a third, if you lurk for a few
days the topicality will be clear. If you still can't figure out the
topicality, you can always ask.
>Some servers seem to support a description field, but I suspect few new
users bother to read those.

All true, but no-one proposed reviewing and changing all group names.
My comment was simply that the original suggestion was not redundant.

Not even the most staunch of c.l.c. regulars could deny that the name
comp.lang.iso-c would be a name better reflecting the desired discussion
of greatest interest to those same regulars.

It's also less likely that first-time posters wanting help with basic C
would choose comp.lang.iso-c over c.l.c.

--
Chris.
Nov 13 '08 #26
Chris McDonald wrote:
[...]
Not even the most staunch of c.l.c. regulars could deny that the name
comp.lang.iso-c would be a name better reflecting the desired discussion
of greatest interest to those same regulars.
Since C is *defined* by various generations of ISO documents,
a better proposal would be comp.lang.c and comp.lang.pidgi n-c or
comp.lang.c-variants or comp.lang.c-ish.
It's also less likely that first-time posters wanting help with basic C
would choose comp.lang.iso-c over c.l.c.
The first-time posters are not the problem. The trouble is
with the repeat offenders, those who know better but choose worse.

--
Er*********@sun .com

Nov 13 '08 #27
Eric Sosman <Er*********@su n.comwrites:
Chris McDonald wrote:
>[...]
Not even the most staunch of c.l.c. regulars could deny that the name
comp.lang.is o-c would be a name better reflecting the desired discussion
of greatest interest to those same regulars.

Since C is *defined* by various generations of ISO documents,
a better proposal would be comp.lang.c and comp.lang.pidgi n-c or
comp.lang.c-variants or comp.lang.c-ish.
>It's also less likely that first-time posters wanting help with basic C
would choose comp.lang.iso-c over c.l.c.

The first-time posters are not the problem. The trouble is
with the repeat offenders, those who know better but choose worse.
In fact, I have no real problem with first-timers posting off-topic
questions. This isn't a good place to get detailed information about,
say, Win32 or POSIX, but we do tend to be pretty good at advising
people where find the actual experts on what they're asking about.

The idea that redirecting a poster to a more appropriate newsgroup is
somehow rude is, of course, absurd. I'm sure there are examples of
people doing it in a rude manner, but in my experience they're the
exception.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Nov 13 '08 #28
On 13 Nov 2008 at 20:55, Chris McDonald wrote:
Not even the most staunch of c.l.c. regulars could deny that the name
comp.lang.iso-c would be a name better reflecting the desired
discussion of greatest interest to those same regulars.
True - but of course, their particular view on "desirable discussions"
carries no more weight than the next man's. This is not a moderated
group, and there is no charter - each person must decide for themselves
what to post. There is no absolute topicality, no matter how often and
how loudly and how aggressively Heathfield & friends say there is.
It's also less likely that first-time posters wanting help with basic
C would choose comp.lang.iso-c over c.l.c.
Exactly. Very few people care about the minutiae of ISO C, whereas lots
and lots of people want to learn C. The "regs" would never support a
name change, because they know that c.l.iso-c would become a ghetto,
while clc would be an active forum for exchange of expertise.

They're perfectly happy with the status quo, where they can fuel their
egos by trying to bully newbies into accepting *their* definition of
"topicality ".

Nov 13 '08 #29
Chris McDonald wrote:
Not even the most staunch of c.l.c. regulars could deny that the name
comp.lang.iso-c would be a name better reflecting the desired discussion
of greatest interest to those same regulars.
K&R C is on topic here too.

--
pete
Nov 13 '08 #30

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

Similar topics

0
2054
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
12
3879
by: * ProteanThread * | last post by:
but depends upon the clique: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=954drf%24oca%241%40agate.berkeley.edu&rnum=2&prev=/groups%3Fq%3D%2522cross%2Bposting%2Bversus%2Bmulti%2Bposting%2522%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den ...
0
1893
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
4
5584
by: David Peach | last post by:
Hello, hope somebody here can help me... I have a query that lists defects recorded in a user defined date range. That query is then used as the source for a Cross Tab query that cross-tabs count of defect type by calendar month. Defect types are stored in one table, defect transactions in another along with date etc. When I cross-tab the results, defect types that have no defects recorded against them appear as a blank (null) value. That...
23
6543
by: Jeff Rodriguez | last post by:
Here's what I want do: Have a main daemon which starts up several threads in a Boss-Queue structure. From those threads, I want them all to sit and watch a queue. Once an entry goes into the queue, grab it and run a system command. Now I want to make sure that system command doesn't hang forever, so I need some way to kill the command and have the worker thread go back to work waiting for another queue entry.
0
2059
by: Web Science | last post by:
Site and Features: http://www.eigensearch.com Search engine, eigenMethod, eigenvector, mathematical, manifolds, science, technical, search tools, eigenmath, Jacobian, quantum, mechanics, manifolds, science, physics, chemistry, law, legal, government, home, office, business, domain lookup, medical, travel, food, university students, searching, searchers, surfing, advanced search, search tools Chemistry, mathematics, physical sciences,...
1
2765
by: Rob Woodworth | last post by:
Hi, I'm having serious problems getting my report to work. I need to generate a timesheet report which will contain info for one employee between certain dates (one week's worth of dates). I have a table containing records for each job done, the records contain date, employee name, job done (a code representing the type of job), cost code (another code), regular hours, and overtime hours. The tricky part is that more than one job can...
6
8635
by: Simon | last post by:
Hi All, An experiment i'm doing requires requires a synchronous cross-domain request, without using a proxy. I wondered if anyone had any ideas to help me achieve this. Below is what I have tried, including my conclusions/assumptions (which i'll happily be corrected on if it solves my problem!): The requirement not to use a proxy means I can't use the synchronous
6
5482
by: Bart Van der Donck | last post by:
Hello, I'm presenting my new library 'AJAX Cross Domain' - a javascript extension that allows to perform cross-domain AJAX requests. http://www.ajax-cross-domain.com/ Any comments or suggestions are welcome. --
6
3991
by: ampo | last post by:
Hello. Can anyone help with cross-domain problem? I have HTML page from server1 that send xmlHTTPRequest to server2. How can I do it? Thanks.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.