Added SILC Thread Queue API
[silc.git] / lib / silcmath / mp_tfm.c
index 1abbf5078fc5ec0f52a6711b4313c5a521958390..b3b1e73beb89bc8bf6cb22b43bcded5575019ef1 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 Pekka Riikonen
+  Copyright (C) 2005 - 2006 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 */
 /* $Id$ */
 
-#include "silcincludes.h"
+#include "silc.h"
 #include "mp_tfm.h"
 
 void silc_mp_init(SilcMPInt *mp)
@@ -67,8 +67,8 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base)
 
 SilcUInt32 silc_mp_get_ui(SilcMPInt *mp)
 {
-  SILC_NOT_IMPLEMENTED("silc_mp_get_ui");
-  assert(FALSE);
+  fp_int *tmp = mp;
+  return tmp->used > 0 ? tmp->dp[0] : 0;
 }
 
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base)