/+junk/c_sdl_joypad_ducktape

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad_ducktape

« back to all changes in this revision

Viewing changes to src/utils.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-09-02 20:15:48 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140902201548-h1kss1wdocqhs8df
* Fixed Makefile
* Changed all void * to _pointer in DynamicArray.[h,c].
* Fixed GameObject to work with the new base-type.
* Made the Object stuffs...
* added string_new_printf utility function in utils.[h,c]

* Derp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __H_UTILS__
 
2
#define __H_UTILS__
 
3
 
 
4
#include "defs.h"
 
5
 
 
6
/** @file
 
7
 * Utils, a collection of utility functions that are not directly relaned to
 
8
 * the game.
 
9
 *
 
10
 * For game utility functions see <tt>game_utils.h</tt>
 
11
 */
 
12
 
 
13
BEGIN_DECLS
 
14
 
 
15
/**
 
16
 * We assume that this is the maximum size that any string that is created at
 
17
 * runtime will ever be.
 
18
 */
 
19
#define _STR_MAX_LEN 2048
 
20
 
 
21
/**
 
22
 * Create a new string with just enough space.
 
23
 *
 
24
 * @param format A printf-format string.
 
25
 * @param ... The variables.
 
26
 *
 
27
 * @returns A C String on succses
 
28
 * @returns NULL on fail.
 
29
 */
 
30
char * string_new_printf (char * format, ...);
 
31
 
 
32
END_DECLS
 
33
 
 
34
#endif /*__H_UTILS__*/