Questions tagged [c99]

C99 is a standard for the C programming language. It replaces the previous C89 standard, and is succeeded by the C11 standard. C99 added inline functions, C++-style comments, allows intermingled declarations and code, as well as multiple other language and library fixes and additions.

Filter by
Sorted by
Tagged with
3 votes
1 answer
78 views

colorprint - An ANSI Escape sequence console writer mini-library

I wrote this a long time ago. I came back to it and decided to clean it up a little. It uses the preprocessor and C99 anon structs to make a flexible python-like ...
Braden Best's user avatar
2 votes
4 answers
916 views

Removing nodes with a given value from a linked list

Is this a good way of removing all the nodes that contains a value x? This function takes as input the head of a list and has to delete all the nodes that contain a given value taken. If there is ...
awwwww's user avatar
  • 53
2 votes
3 answers
71 views

Command line test runner

This is a simple program to run a command-line program with given parameters and verify that it writes the expected output to stdout or stderr. The specification file is passed as the first argument. ...
User319's user avatar
  • 1,132
2 votes
2 answers
122 views

Get the Nth Term in the Fibonacci Sequence

I'm trying out a new editor (CLion) and I decided to try an old well known programming problem. I also decided to try out C99 rather than C89. This program calculates the nth term of the Fibonacci ...
pacmaninbw's user avatar
  • 23.8k
2 votes
2 answers
301 views

IPC using pipes

I have simulated the conversation between a caller and receiver using fork and pipe. The parent process is the receiver and the child process is the caller. Each message is terminated by a newline. ...
In78's user avatar
  • 643
2 votes
2 answers
4k views

A simple logging library in C

I've created a simple logging library in C which I can use in my other projects. I wanted to get started in software development using the C language, and this is my first attempt at writing something ...
Vedant Jadhav's user avatar
2 votes
2 answers
151 views

C99 - An alphanumeric random char generator

I have built a very small program that is a command line utility for generating alphanumeric characters of a certain length (up to a max. length) called randchars. <...
EvenDance's user avatar
2 votes
2 answers
80 views

Parse IP address from a GPRS module reply

I'm writing a parser to get the IP address from a string I get from a GPRS module. Examples of the string I get from the GPRS module: +QIACT: 1,1,1,\"10.162.143.228\"\r\n\r\nOK\r\n +QIACT: 1,1,...
Carlos_47's user avatar
2 votes
2 answers
55 views

Removing nodes from a linked list

This is my second iteration of a function to remove all nodes containing value 'x'. The previous iteration is here. This function takes as input the head of a list and has to delete all the nodes ...
awwwww's user avatar
  • 53
2 votes
1 answer
354 views

Generic insertion sort

I implemented a generic insertion sort routine that can sort an array of any type. It's similar to the qsort function from the standard library. My goal it to optimize the code for readability above ...
Panic's user avatar
  • 287
2 votes
1 answer
1k views

Postfix evaluation using a stack in c

I have written a program to evaluate a postfix expression using a stack. I had my stack implementation using a linked list reviewed here, so I am only including the header file here. I have taken ...
In78's user avatar
  • 643
1 vote
2 answers
151 views

Implementation of Hashtable in C99

I tried implementing a general purpose hashtable in C99. The basic structure is I have a huge array of hashtable entries and each entry is the entry point to a doubly linked list so that in case there ...
Jaysmito Mukherjee's user avatar
1 vote
2 answers
2k views

Function to scan input to string buffer in C

I have written a function that reads standard input, ignores initial whitespace and fills the buffer with that data. I think that it is a bit large and cumbersome, can you please tell me what can be ...
Dvole's user avatar
  • 279
1 vote
2 answers
100 views

Function to remove set of trailing characters from string

I needed the ability to truncate the trailing end of path strings in a routine that builds new search paths as it recursively searches directories. After not finding what I was looking for I created ...
ryyker's user avatar
  • 338
1 vote
1 answer
886 views

Feedback on send/recv functions for non blocking sockets in client side HTTP library

I'm working with TCP sockets in C, specifically only for client side HTTP(S) requests, and would like to get some feedback on my send and recv code. You can make some assumptions regarding my code, as ...
Chase's user avatar
  • 197
0 votes
2 answers
112 views

Find the max of a list using recursion

Hi i needed to find the max int of a list using recursion, I have done it this way I'd like to know if you think is a good way, and I have a couple of questions: ...
awwwww's user avatar
  • 53
0 votes
1 answer
55 views

colorprint - part 2

This is a followup of the last review to comply with meta's rules. In the last, I posted a small library called colorprint and got some helpful pointers from chux ...
Braden Best's user avatar
0 votes
1 answer
39 views

OAuth implementation for Puredata

I am managing an OAuth implementation for Puredata (Pd), which is written in C. OAuth can accept RSA keys, but Pd cannot send messages with newlines, so placing private keys will come as a list of ...
Residuum's user avatar
  • 155

1
2