QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pr_strings.c File Reference

Macros

#define FMT_ADDBLANK   (1<<4)
 
#define FMT_ADDSIGN   (1<<3)
 
#define FMT_ALTFORM   (1<<0)
 
#define FMT_HEX   (1<<5)
 
#define FMT_LJUSTIFY   (1<<1)
 
#define FMT_ZEROPAD   (1<<2)
 
#define P_var(p, n, t)   (args[n]->t##_var)
 
#define PRINT(t)
 

Typedefs

typedef struct fmt_item_s fmt_item_t
 

Enumerations

enum  str_e {
  str_free, str_static, str_dynamic, str_mutable,
  str_temp, str_return
}
 

Functions

string_t PR_CatStrings (progs_t *pr, const char *a, const char *b)
 Make a temporary progs string that is the concatenation of two C strings. More...
 
void PR_ClearReturnStrings (progs_t *pr)
 Clear all of the return string slots. More...
 
void PR_FreeString (progs_t *pr, string_t str)
 Destroy a mutable, dynamic or temporary string. More...
 
void PR_FreeTempStrings (progs_t *pr)
 Free all the temporary strings allocated in the current stack frame. More...
 
dstring_tPR_GetMutableString (progs_t *pr, string_t num)
 Retrieve the dstring_t associated with a mutable string. More...
 
const char * PR_GetString (progs_t *pr, string_t num)
 Convert a string index to a C string. More...
 
int PR_LoadStrings (progs_t *pr)
 Initialize the string tables using the strings supplied by the progs. More...
 
void PR_MakeTempString (progs_t *pr, string_t str)
 Convert a mutable string to a temporary string. More...
 
string_t PR_NewMutableString (progs_t *pr)
 Create a new mutable string. More...
 
string_t PR_SetDynamicString (progs_t *pr, const char *s)
 Make a dynamic progs string from the given C string. More...
 
string_t PR_SetReturnString (progs_t *pr, const char *s)
 Make a temporary progs string that will survive across function returns. More...
 
string_t PR_SetString (progs_t *pr, const char *s)
 Make a permanent progs string from the given C string. More...
 
string_t PR_SetTempString (progs_t *pr, const char *s)
 Make a temporary progs string that will be freed when the current progs stack frame is exited. More...
 
void PR_Sprintf (progs_t *pr, dstring_t *result, const char *name, const char *format, int count, pr_type_t **args)
 Formatted printing similar to C's vsprintf, but using QC types. More...
 
qboolean PR_StringValid (progs_t *pr, string_t num)
 Check the validity of a string index. More...
 

Macro Definition Documentation

#define FMT_ADDBLANK   (1<<4)
#define FMT_ADDSIGN   (1<<3)
#define FMT_ALTFORM   (1<<0)
#define FMT_HEX   (1<<5)
#define FMT_LJUSTIFY   (1<<1)
#define FMT_ZEROPAD   (1<<2)
#define P_var (   p,
  n,
 
)    (args[n]->t##_var)
#define PRINT (   t)
Value:
switch ((doWidth << 1) | doPrecision) { \
case 3: \
dasprintf (result, tmp->str, current->minFieldWidth, \
current->precision, current->data.t##_var); \
break; \
case 2: \
dasprintf (result, tmp->str, current->minFieldWidth, \
current->data.t##_var); \
break; \
case 1: \
dasprintf (result, tmp->str, current->precision, \
current->data.t##_var); \
break; \
case 0: \
dasprintf (result, tmp->str, current->data.t##_var); \
break; \
}
int dasprintf(dstring_t *dstr, const char *fmt,...)
Definition: dstring.c:375

Typedef Documentation

typedef struct fmt_item_s fmt_item_t

Enumeration Type Documentation

enum str_e
Enumerator
str_free 
str_static 
str_dynamic 
str_mutable 
str_temp 
str_return