code: 9ferno

ref: 3521573f2f6de16d6063b870c338e5c42fbab3a6
dir: /libkern/abs.c/

View raw version
#include <lib9.h>

int
abs(int a)
{
	if(a < 0)
		return -a;
	return a;
}

long
labs(long a)
{
	if(a < 0)
		return -a;
	return a;
}