git: 9front

Download patch

ref: b78a777e254c9aa818e77ee57afdcf034ecd9a92
parent: 364b23227fc36636b91b7d85f8cb74ebe7d3a28e
author: glenda <glenda@cirno.localdomain>
date: Thu Aug 27 09:34:02 EDT 2015

mp.h: define mpnrand

--- a/sys/include/mp.h
+++ b/sys/include/mp.h
@@ -38,6 +38,8 @@
 
 /* random bits */
 mpint*	mprand(int bits, void (*gen)(uchar*, int), mpint *b);
+/* return uniform random [0..n-1] */
+mmpint*	mpnrand(mpint *n, void (*gen)(uchar*, int), mpint *b)
 
 /* conversion */
 mpint*	strtomp(char*, char**, int, mpint*);	/* ascii */
--