~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/gsm/man/bitter.1

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"
2
 
.\" Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3
 
.\" Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
4
 
.\" details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
5
 
.\"
6
 
.PU
7
 
.TH BITTER 1
8
 
.SH NAME
9
 
bitter, sweet \(em code-generators for packing bits
10
 
.SH SYNOPSIS
11
 
bitter < input > output
12
 
.br
13
 
sweet < input > output
14
 
.SH "DESCRIPTION"
15
 
Bitter and sweet are two filters which turn a description of the
16
 
form
17
 
.nf
18
 
        name    number-of-bits
19
 
        name    number-of-bits
20
 
        ...
21
 
.nf
22
 
into code.
23
 
.PP
24
 
Bitter generates code that packs the specified bits from their
25
 
variables into an array of unsigned char referenced by an
26
 
advancing pointer c.
27
 
.PP
28
 
Sweet generates code that unpacks the specified bits from an array
29
 
of unsigned char referenced by a mutable pointer c into the
30
 
named variables.
31
 
.\" .SH OPTIONS
32
 
.\" .SH "RETURN VALUE"
33
 
.\" .SH ERRORS
34
 
.SH EXAMPLES
35
 
.nf
36
 
% cat in
37
 
amaretto 1
38
 
banana 2
39
 
cherry 3
40
 
strawberry 4
41
 
vanilla 15
42
 
walnut 15
43
 
 
44
 
% bitter < in
45
 
        *c++ =   ((amaretto & 0x1) << 7)
46
 
               | ((banana & 0x3) << 5)
47
 
               | ((cherry & 0x7) << 2)
48
 
               | ((strawberry >> 2) & 0x3);
49
 
        *c++ =   ((strawberry & 0x3) << 6)
50
 
               | ((vanilla >> 9) & 0x3F);
51
 
        *c++ =   ((vanilla >> 1) & 0xFF);
52
 
        *c++ =   ((vanilla & 0x1) << 7)
53
 
               | ((walnut >> 8) & 0x7F);
54
 
        *c++ =   walnut & 0xFF;
55
 
 
56
 
% sweet < in
57
 
        amaretto  = (*c >> 7) & 0x1;
58
 
        banana  = (*c >> 5) & 0x3;
59
 
        cherry  = (*c >> 2) & 0x7;
60
 
        strawberry  = (*c++ & 0x3) << 2;
61
 
        strawberry |= (*c >> 6) & 0x3;
62
 
        vanilla  = (*c++ & 0x3F) << 9;
63
 
        vanilla |= (*c++ & 0xFF) << 1;
64
 
        vanilla |= (*c >> 7) & 0x1;
65
 
        walnut  = (*c++ & 0x7F) << 8;
66
 
        walnut |= *c++;
67
 
.SH NOTES
68
 
This is a quick hack for the gsm_encode() and gsm_decode() routines.
69
 
.SH BUGS
70
 
Please direct bug reports to jutta@cs.tu-berlin.de and cabo@cs.tu-berlin.de.