473,789 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

nrand48 source code looks weird ?

This is the source code for nrand48 from gnuwin32 libgw32c

long int nrand48 (xsubi) unsigned short int xsubi[3];
{
long int result;

(void) __nrand48_r (xsubi, &__libc_drand48 _data, &result);

return result;
}

// long int nrand48 (xsubi) unsigned short int xsubi[3];

What does the 'unsigned short int xsubi[3];' part mean after '(xsubi)' ?

The prototype in stdlib.h from the binaries is: (for some reason stdlib.h
was not in source distribution ?)

extern long int nrand48 (unsigned short int __xsubi[3]) __THROW;

So at first sight I would guess it has to do with throwing exceptions... but
now that I look at it again it I think it's the type for xsubi.

The original looks really weird:

1. long int nrand48 (xsubi) unsigned short int xsubi[3];

Isn't that supposed to look like this:

2. long int nrand48 (unsigned short int xsubi[3] );

Why did they write it as 1. ?

Is that just their preferred way of writing it down... or does it have some
sort of functionality ?

The prototype then again looks like 2. !? huh ?! :)

Euhm... Could this be a case of wacky c programmers ? eh.

Bye,
Skybuck.
Nov 14 '05
10 2167
On Thu, 8 Jul 2004, Orhan Kavrakoglu wrote:

OK>On Wed, 7 Jul 2004 15:15:44 +0200, "Skybuck Flying"
OK><no****@hotm ail.com> wrote:
OK>
OK>>
OK>><Je******** ***@physik.fu-berlin.de> wrote in message
OK>>news:2l**** ********@uni-berlin.de...
OK>>> Skybuck Flying <no****@hotmail .com> wrote:
OK>
OK>>Thx for the description... Lol... it must be painfull to code in C :D
OK>>
OK>
OK>We're all sadists in this manner :)

And he probably hasn't see Intercal yet.

harti
Nov 14 '05 #11

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

Similar topics

3
1706
by: Andy | last post by:
I use Netbeans to write all my code and I've noticed that if I do it wrong and the program throws an (unexpected) exception, it becomes possible to see the source code for the all the classes used leading up to the exception. I presume it must be possible therefore to somehow view the source code for all the classes in sun's library (e.g. Swing, awt, sql). I reckon this would be a pretty good way of learning how to write good java.
9
3895
by: Michael Dekson | last post by:
Hello, Can I exe file made in Microsoft Visual C++ decompile into source code. If it is possibly please tell me how. Thanks
7
2280
by: harish.mallipeddi | last post by:
Hi all, This might sound a bit weird but anyways here I go. Recently after witnessing the popularity of AJAX/DHTML, and after enjoying Gmail's fairly cool UI, I'm left wondering...is there going to be a point in the future when Javascript developers would like to hide their sourcecode from prying eyes because they think they'd put in enough efforts into coding and they wouldn't want to give up the commercial value in their code for...
46
2497
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is working, you'll comment it.
8
1923
by: G Patel | last post by:
Can people please comment on the layout/style of my problem? The major issue I had was the layout. I ended up having to put a relatively large switch statement, inside an if statement, which is inside a while loop. If someone can tell me how I can rearrange these elements a little to make it cleaner, I would appreciate that. I've tested it on the command line, and it works *well*, but the source code layout is bugging me. I'd also...
1
1886
by: rahul8143 | last post by:
hello, In kernel source code there is ip_fragment.c file my question is regarding pointer function and casting for that look at required snippet from that file There is structure defined for queueing ip fragments as struct ipq { struct ipq *next; /* linked list pointers */ struct list_head lru_list; /* lru list member */ u32 user; u32 saddr;
66
7476
by: Jon Skeet [C# MVP] | last post by:
I'm sure the net will be buzzing with this news fairly soon, but just in case anyone hasn't seen it yet: Microsoft are going to make the source code for the .NET framework (parts of it, including the BCL, ASP.NET and LINQ) available both for viewing and debugging into. I won't go into all the details here, as they're covered on Scott Guthrie's blog:
10
1671
by: Jani Järvinen [MVP] | last post by:
Hello, for your information in case you didn't yet notice the news: Microsoft has announced plans to give developers the ability to view .NET class library source code. This is announced here: http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx Says the blog:
21
3590
by: mikhal80 | last post by:
Is it possible to write a program which would print out it's own source code, using C++?
0
9666
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
9511
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
10408
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
10139
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
9983
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
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
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...
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
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.