Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

fmtlib.c File Reference

#include "f2c.h"

Go to the source code of this file.


Defines

#define MAXINTLENGTH   23
#define longint   long
#define ulongint   unsigned long

Functions

char * f__icvt (longint value, int *ndigit, int *sign, int base)

Define Documentation

#define longint   long
 

Definition at line 7 of file fmtlib.c.

Referenced by f__icvt().

#define MAXINTLENGTH   23
 

Definition at line 2 of file fmtlib.c.

Referenced by f__icvt().

#define ulongint   unsigned long
 

Definition at line 9 of file fmtlib.c.

Referenced by f__icvt(), qbit_bits(), and qbit_cshift().


Function Documentation

char* f__icvt longint    value,
int *    ndigit,
int *    sign,
int    base
 

Definition at line 16 of file fmtlib.c.

References base, i, longint, MAXINTLENGTH, and ulongint.

Referenced by lwrt_I(), wrt_I(), and wrt_IM().

00018 {
00019         static char buf[MAXINTLENGTH+1];
00020         register int i;
00021         ulongint uvalue;
00022 
00023         if(value > 0) {
00024                 uvalue = value;
00025                 *sign = 0;
00026                 }
00027         else if (value < 0) {
00028                 uvalue = -value;
00029                 *sign = 1;
00030                 }
00031         else {
00032                 *sign = 0;
00033                 *ndigit = 1;
00034                 buf[MAXINTLENGTH-1] = '0';
00035                 return &buf[MAXINTLENGTH-1];
00036                 }
00037         i = MAXINTLENGTH;
00038         do {
00039                 buf[--i] = (uvalue%base) + '0';
00040                 uvalue /= base;
00041                 }
00042                 while(uvalue > 0);
00043         *ndigit = MAXINTLENGTH - i;
00044         return &buf[i];
00045         }
 

Powered by Plone

This site conforms to the following standards: