It is so good when you get a Linux program to compile on a Macintosh.
How to get a parameter passed to a C program and actually use it.
How to get a parameter passed to a C program and actually use it.
A simple C program to print RAM and Swap usage information on Linux.
A very nice C program to open a listening port on Linux and respond to a message.
This simple C program will test whether it is running from a TTY or not. This is a simple test, but it could be quite useful. #include <stdio.h> #include <poll.h> #include <unistd.h> int main(int argc, char* argv[]){ struct pollfd fds[1] = {{.fd = STDIN_FILENO, .events = POLLIN}}; if (!poll(fds, sizeof(fds) / sizeof(struct … Read more
This is an interesting version of my random monster program. I added a simple function to get a random number in milliseconds. randommonster.c1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 … Read more
Here is the source code to the Windows Program Manager, this is the main interface in Windows 3.1 and 3.11. This used program groups to organize various applications like Microsoft Office and accessories. As well as the ability to create your own program groups to organize your favorite applications. Download the source code here: https://mega.nz/file/R1hy1RyS#Dkm0hK8hGmwTx-__9hOQKBWtNDDBCW-ChSneHGSc_RY. … Read more
Here is one of my programs. I wrote this ages ago and it uses the standard ASCII character set. This will print a random fortune by running the fortune app to get a fortune and this selects a category to print from. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <string.h> const char* x[] … Read more
https://github.com/john302/sysinfo. This is my system information program I coded for Linux. This gives a bit of information about your Linux system. Just check out the source and type make to compile. Here is some sample output. 13:21:02 ~/Downloads/sysinfo.kdevelop-1.0 homer@neo $ ./sysinfo 1 –System name – Linux –Nodename – neo.deusexmachina –Release – 3.9.5-301.fc19.x86_64 –Version – #1 … Read more
Not a bad little program, and I got the code to work first time, not bad. Writing code in standard C is better than C++ or C#, the old C language is still the best. The whole Linux kernel is written in C and if it is good enough for that project, it is good … Read more
I think I may have posted this before, but this is a little program I am working on that writes a text string to a file. I have got it to work perfectly and it compiles without errors using gcc -Wall. /* * This program is free software; you can redistribute it and/or modify * … Read more