The Safe-C Programming Language

The Safe-C programming language was created in 2011. It is the result of an effort to modernize the C language so that it can be used to write reliable software.

In particular, array indices and pointers are checked to ensure that they cannot access memory outside the language's rules.

Safe-C is very similar to C (95% of the syntax is identical), so a C programmer will have no difficulty switching to Safe-C.

A Safe-C compiler for Windows is available at this link.

Safe-C was used to develop the client and server software for the multi-user 3D virtual world

The following tutorials are available :

The standard Safe-C library includes the following components :

aesAES cryption
arithmsimple arithmetic (abs, min, max)
base64base64 encoding
bintreebalanced binary trees (AVL)
consolewriting/reading on the dos console box
crcmd5, sha2, adler and crc checksums
dbdatabase (insert/delete/update/retrieve, transations on .db files - documentation)
desDES cryption
directxlayer for using DirectX 10 & 11
drawdraw in a memory buffer (line, circle, text, image)
exceptionexception handling
filestext and binary files, directories, disk.
ftpfile transfer protocol (ftp) - client and server
guigraphic user interface (windows, listboxes, etc ..) with a main window using component directx
hashhash table, dictionary (key to value)
httpinternet client and serveur (login, virtual html pages, ..)
imagecompression and decompression (jpg, gif, png, ..), image treatment
inifilereading of .ini files
integeroperations on large unsigned integers
linear_algebraoperations on vectors and matrices
mathmath functions (sin, cos, ..)
netcardinformation about network cards (windows-specific)
odbcinterface to sql databases using odbc 3.0
opusaudio codec (see
pdfcreate PDF files
randomgeneration of random numbers
registryread/write a key from registry (windows-specific)
rsaasymmetric encryption
serviceWindows Services - background processes (windows-specific)
shortcutprogram installation, create a shortcut on desktop
smtpsending e-mails using protocol smtp
sortingsorting of arrays (bubblesort, heapsort, quicksort)
soundmicrophone and speaker
stringscharacters and strings (strcpy, sprintf, ..)
systemsystem information (PC name, memory, nb of CPUs)
tcpipnetwork connection by tcpip (ipv4 and ipv6)
textstorage of a text composed of lines
threadparallel threads, synchronisation, timers
tracingtrace files
urlinternet url
utfconversion between ascii, utf-8 and utf-16
vpegvideo compression for nearly static images
webcaminterface for video source
winuser interface to create windows, buttons, listboxes, ..
xmlxml reader
zipdata compression : zip, unzip

as well as the following Windows API components :

win/windowslow-level interface with Windows
win/directx11low-level interface with DirectX 11
win/direct_showlow-level interface with DirectShow

The "Safe-C Reference Manual" is a normative description of the Safe-C language for people who wish to develop a Safe-C compiler.

The Windows compiler is available here. The source code of the compiler and source libraries is available here.

If you have questions or need technical support :