mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
0ad9f559ea
sprintf, vsprintf and strlen now in rua_strings, and strlen now returns int like it should.
28 lines
335 B
R
28 lines
335 B
R
#include "Number.h"
|
|
#include "legacy_string.h"
|
|
#include "string.h"
|
|
|
|
@implementation Number
|
|
|
|
+ (id) newFromInt: (int) i
|
|
{
|
|
return [[self alloc] initWithInt: i];
|
|
}
|
|
|
|
- (id) initWithInt: (int) i
|
|
{
|
|
value = i;
|
|
return [super init];
|
|
}
|
|
|
|
- (int) intValue
|
|
{
|
|
return value;
|
|
}
|
|
|
|
- (string) printForm
|
|
{
|
|
return itos (value);
|
|
}
|
|
|
|
@end
|