~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/RDP/client/doc/HACKING

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
Code style / indentation
3
 
------------------------
4
 
The file indent-all.sh contains information about the current code
5
 
style.  Run this script before commits.
6
 
 
7
 
 
8
 
Variable argument macros
9
 
------------------------
10
 
Variable argument macros are non-portable in general, and should be
11
 
avoided.  Either use a second set of parentheses like DEBUG, or create
12
 
a variable argument function like error.
13
 
 
14
 
 
15
 
Structure
16
 
---------
17
 
The core protocol stack should be system-independent (i.e. ANSI C89
18
 
only) so that it is easy to port. This currently applies to the
19
 
following files:
20
 
 
21
 
bitmap.c licence.c orders.c rdp.c rdp5.c cache.c iso.c mcs.c
22
 
secure.c mppc.c channels.c
23
 
rdesktop.c
24
 
 
25
 
 
26
 
Compiler support
27
 
----------------
28
 
 
29
 
The source code should be compatible with ANSI C89. One exception is
30
 
the SeamlessRDP ServerEXE and ClientDLL, which should be compatible
31
 
with ANSI C99.
32
 
 
33
 
 
34
 
RDP resources
35
 
-------------
36
 
http://dev.remotenetworktechnology.com/refdata.htm
37
 
 
38
 
 
39
 
Checking for out of memory conditions
40
 
-------------------------------------
41
 
Try to handle out of memory conditions gracefully. Use the xmalloc
42
 
routines from rdesktop.c, instead of calling malloc manually. Also,
43
 
remember that several Xlib functions can return NULL. This includes
44
 
XGetImage. Use exit_if_null to verify returned pointers. 
45