* \r\n on Bconputs()

* natfeat support code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23550 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-01-16 03:32:40 +00:00
parent 15f1e19781
commit 267428a36a
+21 -2
View File
@@ -214,9 +214,11 @@ static inline int Bconputs(int16 handle, const char *string)
int i, err;
for (i = 0; string[i]; i++) {
err = Bconout(handle, string[i]);
if (err)
return i;
if (err < 0)
break;
}
Bconout(handle, '\r');
Bconout(handle, '\n');
return i;
}
@@ -400,6 +402,23 @@ static inline NatFeatCookie *nat_features(void)
return NULL;
}
static inline int32 nat_feat_getid(const char *name)
{
NatFeatCookie *c = nat_features();
if (!c)
return 0;
return c->nfGetID(name);
}
#define nat_feat_call(id, code, a...) \
({ \
int32 ret; \
NatFeatCookie *c = nat_features(); \
if (!c) \
return -1; \
ret = c->nfCall(id | code, a##...); \
ret; \
})
/* XHDI NatFeat */