Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

10 lines
191 B

#include "safemult.h"
int imult16(int16 a,int16 b,int16* c) {
int neg=(a<0);
if (neg) a=-a;
if (b<0) { neg^=1; b=-b; }
if (umult16(a,b,c)) return 0;
if (neg) *c=-*c;
return 1;
}