Jim Hall

Authored Content

Parsing data with strtok in C

The strtok function is a handy way to read and interpret data from strings. Use it in your next project to simplify how you read data into your program.

(Correspondent)
April 30, 2022

How the C programming language has grown

Here's my interview with Brian Kernighan, co-author (with Dennis Ritchie) of The C Programming Language book, to discuss the C programming language and its 50-year history.

(Correspondent)
April 15, 2022

Contributed Content

Authored Cheat Sheets and Downloads

A guide to using FreeDOS

Puzzle pieces coming together to form a computer screen

FreeDOS is an open source operating system which is compatible with MS-DOS and applications designed for this older operating environment. If you've got a legacy application

C getopt cheat sheet

Blender Hotkey Cheat Sheet

This two-page cheat sheet provides gentle reminders on the syntax and structure of getopt() and getopt_long(). One page demonstrates short options, and the other side

C programming cheat sheet

Blender Hotkey Cheat Sheet

C is a straightforward compiled programming language. Other programming languages borrow concepts from C, which makes C a great starting point if you want to learn programming

Authored Comments

I've been using Linux since 1993 and I didn't realize until your article that you could change a link without deleting it first. I've always used 'rm' then another 'ln -s'

Thanks for sharing!

Hi David - glad you liked the article! I agree, TheDraw was a great DOS program for drawing ASCII art. As you mentioned, you can output the file to see it in full color. Use TYPE on FreeDOS, or 'cat' on Linux. You'll need to load an ANSI driver on FreeDOS, like the open source NANSI.SYS driver. Linux terminals are modified color ANSI terminals, so should display ANSI escapes by default.

Another way to write this program for DOS is to copy the array directly to video memory. But I thought showing it "character by character" using _setbkcolor and _settextcolor would help others to make their own programs with color text. :-)