ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtutil.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtutil.h (file contents):
Revision 1.18 by root, Tue Jan 17 16:06:48 2006 UTC vs.
Revision 1.20 by root, Wed Jan 25 00:42:21 2006 UTC

1#ifndef RXVT_UTIL_H 1#ifndef RXVT_UTIL_H
2#define RXVT_UTIL_H 2#define RXVT_UTIL_H
3 3
4#include <cstdlib>
4#include <cstring> 5#include <cstring>
5 6
6#define PP_CONCAT_(a, b) a ## b 7#define PP_CONCAT_(a, b) a ## b
7#define PP_CONCAT(a, b) PP_CONCAT_(a, b) 8#define PP_CONCAT(a, b) PP_CONCAT_(a, b)
8#define PP_STRINGIFY_(a) #a 9#define PP_STRINGIFY_(a) #a
391struct stringvec : simplevec<char *> 392struct stringvec : simplevec<char *>
392{ 393{
393 ~stringvec () 394 ~stringvec ()
394 { 395 {
395 for (char **c = begin (); c != end (); c++) 396 for (char **c = begin (); c != end (); c++)
396 delete [] *c; 397 free (*c);
397 } 398 }
398}; 399};
399 400
401// return a very temporary (and never deallocated) buffer. keep small.
402void *rxvt_temp_buf (int len);
403
404template<typename T>
405inline T *
406rxvt_temp_buf (int len)
407{
408 return (T *)rxvt_temp_buf (len * sizeof (T));
409}
410
400#endif 411#endif
401 412

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines