"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/ctype/man/man3ctype/ctio.3ctype" (7 Feb 2017, 8265 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 '\" te
    2 .\" Copyright (c) 2011, Robert Mustacchi.  All Rights Reserved.
    3 .\" Copyright (c) 2011, Joyent, Inc.  All Rights Reserved.
    4 .\"
    5 .\" Permission is hereby granted, free of charge, to any person obtaining a copy
    6 .\" of this software and associated documentation files (the "Software"), to
    7 .\" deal in the Software without restriction, including without limitation the
    8 .\" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    9 .\" sell copies of the Software, and to permit persons to whom the Software is
   10 .\" furnished to do so, subject to the following conditions:
   11 .\"
   12 .\" The above copyright notice and this permission notice shall be included in
   13 .\" all copies or substantial portions of the Software.
   14 .\" 
   15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   18 .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   19 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   20 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   21 .\" IN THE SOFTWARE.
   22 .TH CTIO 3CTYPE "December 12, 2011"
   23 .SH NAME
   24 ctio, ruint8, ruint16, ruint32, ruint64, wuint8, wuint16, wuint32, wuint64,
   25 rsint8, rsint16, rsint32, rsint64, wsint8, wsint16, wsint32, wsint64, rfloat,
   26 rdouble, wfloat, wdouble \- integer and float operations
   27 .SH SYNOPSIS
   28 .LP
   29 .nf
   30 var mod_ctype = require('ctype');
   31 
   32 \fBNumber\fR \fBmod_ctype.ruint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   33 .fi
   34 
   35 .LP
   36 .nf
   37 \fBNumber\fR \fBmod_ctype.ruint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   38 .fi
   39 
   40 .LP
   41 .nf
   42 \fBNumber\fR \fBmod_ctype.ruint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   43 .fi
   44 
   45 .LP
   46 .nf
   47 \fBNumber[2]\fR \fBmod_ctype.ruint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   48 .fi
   49 
   50 .LP
   51 .nf
   52 \fBNumber\fR \fBmod_ctype.rsint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   53 .fi
   54 
   55 .LP
   56 .nf
   57 \fBNumber\fR \fBmod_ctype.rsint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   58 .fi
   59 
   60 .LP
   61 .nf
   62 \fBNumber\fR \fBmod_ctype.rsint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   63 .fi
   64 
   65 .LP
   66 .nf
   67 \fBNumber[2]\fR \fBmod_ctype.rsint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   68 .fi
   69 
   70 .LP
   71 .nf
   72 \fBNumber\fR \fBmod_ctype.rfloat\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   73 .fi
   74 
   75 .LP
   76 .nf
   77 \fBNumber\fR \fBmod_ctype.rdouble\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR);
   78 .fi
   79 
   80 .LP
   81 .nf
   82 \fBvoid\fR \fBmod_ctype.wuint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
   83 .fi
   84 
   85 .LP
   86 .nf
   87 \fBvoid\fR \fBmod_ctype.wuint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
   88 .fi
   89 
   90 .LP
   91 .nf
   92 \fBvoid\fR \fBmod_ctype.wuint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
   93 .fi
   94 
   95 .LP
   96 .nf
   97 \fBvoid\fR \fBmod_ctype.wuint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
   98 .fi
   99 
  100 .LP
  101 .nf
  102 \fBvoid\fR \fBmod_ctype.wsint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  103 .fi
  104 
  105 .LP
  106 .nf
  107 \fBvoid\fR \fBmod_ctype.wsint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  108 .fi
  109 
  110 .LP
  111 .nf
  112 \fBvoid\fR \fBmod_ctype.wsint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  113 .fi
  114 
  115 .LP
  116 .nf
  117 \fBvoid\fR \fBmod_ctype.wsint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  118 .fi
  119 
  120 .LP
  121 .nf
  122 \fBvoid\fR \fBmod_ctype.wfloat\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  123 .fi
  124 
  125 .LP
  126 .nf
  127 \fBvoid\fR \fBmod_ctype.wdouble\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR);
  128 .fi
  129 
  130 .SH DESCRIPTION
  131 .sp
  132 .LP
  133 The argument \fIbuf\fR refers to a valid buffer (from calling new Buffer()). The
  134 argument \fIendian\fR is either the string 'big' or 'little' and controls
  135 whether the data in the buffer is interpreted as big or little endian. The argument
  136 \fIoffset\fR indicates the starting index into the buffer to read or write. All
  137 functions ensure that starting at \fIoffset\fR does not overflow the end of the
  138 buffer. The argument \fIvalue\fR is a Number that is the valid type for the
  139 specific function. All functions that take \fIvalue\fR as an argument, verify
  140 that the passed value is valid.
  141 
  142 .SS "\fBruint8()\fR, \fBruint16()\fR, \fBruint32()\fR"
  143 .sp
  144 .LP
  145 The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions read an 8,
  146 16, and 32-bit unsigned value from \fIbuf\fR and return it. The value read is
  147 influenced by the values of \fIoffset\fR and \fRendian\fI.
  148 
  149 
  150 .SS "\fBrsint8()\fR, \fBrsint16()\fR, \fBrsint32()\fR"
  151 .sp
  152 .LP
  153 The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions work just as
  154 \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR, except they return signed
  155 integers.
  156 
  157 .SS "\fBruint64()\fR, \fBrsint64()\fR"
  158 .sp
  159 .LP
  160 The \fBruint64()\fR and \fBrsint64()\fR functions read unsigned and signed 64
  161 bit integers respectively from \fBbuf\fR. Due to the limitations of ECMAScript's
  162 \fBNumber\fR type, they cannot be stored as one value without a loss of
  163 precision. Instead of returning the values as a single \fBNumber\fR, the
  164 functions return an array of two numbers. The first entry always contains the
  165 upper 32-bits and the second value contains the lower 32-bits. The lossy
  166 transformation into a number would be \fIres[0]*Math.pow(2,32)+res[1]\fR.
  167 Note that, unless an entry is zero, both array entries are guaranteed to have
  168 the same sign.
  169 
  170 .SS "\fBwuint8()\fR, \fBwuint16()\fR, \fBwuint32()\fR"
  171 .sp
  172 .LP
  173 The functions \fBwuint8()\fR, \fBwuint16()\fR, and \fBwuint32()\fR modify the
  174 contents of \fBbuf\fR by writing an 8, 16, and 32-bit unsigned integer
  175 respectively to \fBbuf\fR. It is illegal to pass a number that is not an integer
  176 within the domain of the integer size, for example, for \fBwuint8()\fR the valid
  177 range is \fB[0, 255]\fR. The value will be written in either big or little
  178 endian format based upon the value of \fBendian\fR.
  179 
  180 
  181 .SS "\fBwsint8()\fR, \fBwsint16()\fR, \fBwsint32()\fR"
  182 .sp
  183 .LP
  184 The functions \fBwsint8()\fR, \fBwsint16()\fR, and \fBwsint32()\fR function
  185 identically to the functions \fBwuint8()\fR, \fBwuint16()\fR, and
  186 \fBwuint32()\fR except that they the valid domain for \fBvalue\fR is that of a
  187 signed number instead of an unsigned number. For example the \fBwsint8()\fR has
  188 a domain of \fB[-128, 127]\fR.
  189 
  190 .SS "\fBwuint64()\fR, \fBwsint64()\fR"
  191 .sp
  192 .LP
  193 The functions \fBwuint64()\fR and \fBswint64()\fR write out 64-bit unsigned and
  194 signed integers to \fBbuf\fR. The \fBvalue\fR argument must be in the same
  195 format as described in \fBruint64()\fR and \fBrsint64()\fR.
  196 
  197 .SS "\fBrfloat()\fR, \fBrdouble()\fR"
  198 .sp
  199 .LP
  200 The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other read
  201 functions, except that they read a single precision and double precision
  202 IEEE-754 floating point value instead.
  203 
  204 .SS "\fBwfloat()\fR, \fBwdouble()\fR"
  205 .sp
  206 .LP
  207 The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other write 
  208 functions, except that the domain for a float is that of a single precision 4
  209 byte value. The domain for a double is any \fBNumber\fR in ECMAScript, which is
  210 defined to be represented by a double.
  211 
  212 .SH ATTRIBUTES
  213 .sp
  214 .LP
  215 See \fBattributes\fR(5) for descriptions of the following attributes:
  216 .sp
  217 
  218 .sp
  219 .TS
  220 box;
  221 c | c
  222 l | l .
  223 ATTRIBUTE TYPE	ATTRIBUTE VALUE
  224 _
  225 Interface Stability	Committed
  226 _
  227 MT-Level	See below.
  228 _
  229 Standard	Not standardized.
  230 .TE
  231 
  232 .sp
  233 .LP
  234 
  235 All functions are MT-safe in so far as there aren't shared memory MT concerns in
  236 most node programs. If one where to concoct such an environment, these functions
  237 wouldn't be MT-safe.
  238 
  239 .SH SEE ALSO
  240 .sp
  241 .LP