0136d7be19c628fb9ba6e1d95f79a13f3d75775d
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c  1) /* BlinkenLib
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/Tools.c         2)    Copyright 2004-2023 Stefan Schuermans <stefan@schuermans.info>
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c  3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
BlinkenLib/Tools.c  4)    a blinkenarea.org project */
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c             5) 
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/Tools.c         6) #include "Tools.h"
src/Tools.c         7) 
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c             8) #include <stdlib.h>
Tools.c             9) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/Tools.c        10) void *BlinkenMalloc1D(int count1, int size) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c 11)   if (count1 < 1)
BlinkenLib/Tools.c 12)     count1 = 1;
BlinkenLib/Tools.c 13)   if (size < 1)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c            14)     return NULL;
Tools.c            15) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c 16)   return malloc(count1 * size);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c            17) }
Tools.c            18) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/Tools.c        19) void **BlinkenMalloc2D(int count1, int count2, int size) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c            20)   int sz, i;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c 21)   char *p;
BlinkenLib/Tools.c 22)   void **ptr;
BlinkenLib/Tools.c 23) 
BlinkenLib/Tools.c 24)   if (count1 < 1)
BlinkenLib/Tools.c 25)     count1 = 1;
BlinkenLib/Tools.c 26)   if (count2 < 1)
BlinkenLib/Tools.c 27)     count2 = 1;
BlinkenLib/Tools.c 28)   if (size < 1)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c            29)     return NULL;
Tools.c            30) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c 31)   sz = count1 * sizeof(void *) + count1 * count2 * size;
BlinkenLib/Tools.c 32)   p = (char *)malloc(sz);
BlinkenLib/Tools.c 33)   if (p == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

Tools.c            34)     return NULL;
Tools.c            35) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/Tools.c 36)   ptr = (void **)p;
BlinkenLib/Tools.c 37)   p += count1 * sizeof(void *);
BlinkenLib/Tools.c 38)   for (i = 0; i < count1; i++) {