Sigrid Solveig Haflínudóttirremove unused code04522871 year agoHistory
30 lines · 530 B · C
RawDownload
#include "os.h"#include <mp.h>#include "dat.h" #define VLDIGITS (sizeof(vlong)/sizeof(mpdigit)) /* *  this code assumes that a vlong is an integral number of *  mpdigits long. */mpint*vtomp(vlong v, mpint *b){	int s;	uvlong uv; 	if(b == nil){		b = mpnew(VLDIGITS*Dbits);		setmalloctag(b, getcallerpc(&v));	}else		mpbits(b, VLDIGITS*Dbits);	b->sign = (v >> (sizeof(v)*8 - 1)) | 1;	uv = v * b->sign;	for(s = 0; s < VLDIGITS; s++){		b->p[s] = uv;		uv >>= sizeof(mpdigit)*8;	}	b->top = s;	return mpnorm(b);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t