~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to utils/h2pas/options.pas

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: options.pas,v 1.2 2002/09/07 15:40:34 peter Exp $
 
2
    $Id: options.pas,v 1.6 2005/02/20 11:09:41 florian Exp $
3
3
    Copyright (c) 1998-2000 by Florian Klaempfl
4
4
 
5
5
    This program is free software; you can redistribute it and/or modify
21
21
interface
22
22
 
23
23
const
24
 
   version = '0.99.15';
 
24
   version = '0.99.16';
25
25
 
26
26
var
27
27
   inputfilename, outputfilename : string; { Filenames }
35
35
   Win32headers,              { allows dec_specifier }
36
36
   stripcomment,              { strip comments from inputfile }
37
37
   PrependTypes,              { Print T in front of type names ?   }
 
38
   createdynlib,              { creates a unit which loads dynamically the imports to proc vars }
38
39
   RemoveUnderscore : Boolean;
39
40
   usevarparas : boolean;     { generate var parameters, when a pointer }
40
41
                              { is passed                               }
41
42
   includefile : boolean;     { creates an include file instead of a unit }
42
43
   palmpilot : boolean;       { handling of PalmOS SYS_CALLs }
 
44
   packrecords: boolean;      { All records should be packed in the file }
43
45
 
44
46
{ Helpers }
45
47
Function ForceExtension(Const HStr,ext:String):String;
107
109
  writeln ('        -l libname         Specify the library name for external');
108
110
  writeln ('        -o outputfilename  Specify the outputfilename');
109
111
  writeln ('        -p                 Use "P" instead of "^" for pointers');
 
112
  writeln ('        -pr                Pack all records (1 byte alignment)');
 
113
  writeln ('        -P                 use proc. vars for imports');
110
114
  writeln ('        -s                 strip comments from inputfile');
111
115
  writeln ('        -S                 strip comments and don''t write info to outputfile.');
112
116
  writeln ('        -t                 Prepend typedef type names with T');
156
160
  usevarparas:=false;
157
161
  palmpilot:=false;
158
162
  includefile:=false;
 
163
  packrecords:=false;
 
164
  createdynlib:=false;
159
165
  i:=1;
160
166
  while i<=paramcount do
161
167
   begin
173
179
         'i' : includefile:=true;
174
180
         'l' : LibFileName:=GetNextParam ('l','libname');
175
181
         'o' : outputfilename:=GetNextParam('o','outputfilename');
176
 
         'p' : UsePPointers:=true;
 
182
         'P' : createdynlib:=true;
 
183
         'p' : begin
 
184
                  if (cp[3] = 'r') then
 
185
                     begin
 
186
                        PackRecords := true;
 
187
                     end
 
188
                  else
 
189
                      UsePPointers:=true;
 
190
               end;
177
191
         's' : stripcomment:=true;
178
192
         'S' : begin
179
193
                 stripcomment:=true;
226
240
end.
227
241
{
228
242
   $Log: options.pas,v $
 
243
   Revision 1.6  2005/02/20 11:09:41  florian
 
244
     + added -P:
 
245
       allows to generate headers which load proc. dyn. from libs
 
246
 
 
247
   Revision 1.5  2005/02/14 17:13:39  peter
 
248
     * truncate log
 
249
 
 
250
   Revision 1.4  2004/09/08 22:21:41  carl
 
251
     + support for creating packed records
 
252
     * var parameter bugfixes
 
253
 
 
254
   Revision 1.3  2004/08/13 02:35:30  carl
 
255
     + bugfixes with C++ comments, they are now placed above the definition
 
256
     * some bugfixes with the _label reserved word.
 
257
 
229
258
   Revision 1.2  2002/09/07 15:40:34  peter
230
259
     * old logs removed and tabs fixed
231
260