Browse Source

* PChar -> PAnsiChar

Michaël Van Canneyt 2 years ago
parent
commit
64e41e4419

+ 4 - 4
packages/xforms/examples/boxtype.pp

@@ -10,7 +10,7 @@ const border = FL_TRANSIENT;
 
 type TVN_Struct = record
      theval : longint;
-     name : pchar;
+     name : PAnsiChar;
      end;
 
 const gmode : array[0..5] of TVN_Struct =
@@ -170,7 +170,7 @@ end;
 
 {************** Main Routine **********************}
 
-const browserlines : array [0..21] of pchar = (
+const browserlines : array [0..21] of PAnsiChar = (
    ' ', '@C1@c@l@bObjects Demo',   ' ',
    'This demo shows you all',      'objects that currently',
    'exist in the Forms Library.',  ' ',
@@ -186,7 +186,7 @@ const browserlines : array [0..21] of pchar = (
 var
   ob : PFL_OBJECT;
   c : TFL_COLOR;
-  p : ppchar;
+  p : PPAnsiChar;
   vn : ^TVN_struct;
   i : longint;
 
@@ -194,7 +194,7 @@ begin
   c := FL_BLACK;
   fl_initialize(@argc, argv, 'FormDemo', nil, 0);
   create_the_forms ();
-  fl_set_bitmap_data (tobj[2], sorceress_width, sorceress_height, pchar(@sorceress_bits));
+  fl_set_bitmap_data (tobj[2], sorceress_width, sorceress_height, PAnsiChar(@sorceress_bits));
   fl_add_chart_value (tobj[3], 15, 'item 1', c);inc(c);
   fl_add_chart_value (tobj[3], 5, 'item 2', c);inc(c);
   fl_add_chart_value (tobj[3], -10, 'item 3', c);inc(c);

+ 2 - 2
packages/xforms/examples/browserall.pp

@@ -10,7 +10,7 @@ exitobj, readout : PFL_OBJECT;
 
 
 const
-bnames : array[0..3] of pchar =
+bnames : array[0..3] of PAnsiChar =
 (
     'NORMAL_BROWSER', 'SELECT_BROWSER', 'HOLD_BROWSER', 'MULTI_BROWSER'
 );
@@ -45,7 +45,7 @@ procedure br_callback(ob : PFL_OBJECT; arg : longint);cdecl;
 var
     buf : string[255];
 const
-    mb : array[0..3] of pchar = ('','left','middle','right');
+    mb : array[0..3] of PAnsiChar = ('','left','middle','right');
 
 var i,b : longint;
 

+ 1 - 1
packages/xforms/examples/colbrowser.pp

@@ -184,7 +184,7 @@ end;
 { change database }
 procedure db_cb(ob : PFL_OBJECT; q : longint);cdecl;
 
-var p: pchar;
+var p: PAnsiChar;
     buf : string;
 
 begin

+ 1 - 1
packages/xforms/examples/cursor.pp

@@ -31,7 +31,7 @@ procedure setbitmapcursor_cb(ob : PFL_OBJECT ; data : Longint);cdecl;
 
 begin
   if bitmapcur<>0 then
-     bitmapcur := longint(fl_create_bitmap_cursor(Pchar(@bm1_bits), Pchar(@bm2_bits),
+     bitmapcur := longint(fl_create_bitmap_cursor(PAnsiChar(@bm1_bits), PAnsiChar(@bm2_bits),
                   16, 16, 8 ,8 ));
                   {bm1_width, bm1_height,  bm1_width/2, bm1_height/2);}
   fl_set_cursor(FL_ObjWin(ob), bitmapcur);

+ 1 - 1
packages/xforms/examples/fbrowse.pp

@@ -10,7 +10,7 @@ br : PFL_OBJECT;
 
 procedure load_file(ob : PFL_OBJECT; arg : longint);cdecl;
 var
-  fname : pchar;
+  fname : PAnsiChar;
 
 begin
   fname := fl_show_fselector ('File To Load','','*.*','');

+ 1 - 1
packages/xforms/examples/fonts.pp

@@ -41,7 +41,7 @@ begin
   end;
 end;
 
-procedure addit(st : pchar);
+procedure addit(st : PAnsiChar);
 begin
    fl_add_browser_line(ui^.fontobj,st);
 end;

+ 1 - 1
packages/xforms/examples/goodies.pp

@@ -10,7 +10,7 @@ uses xforms,strings;
 var
   choice : Longint;
   str1,str2 : string[100];
-  s : pchar;
+  s : PAnsiChar;
 
 begin
   fl_initialize(@argc, argv, 'FormDemo', nil, 0);

+ 3 - 3
packages/xforms/examples/group.pp

@@ -46,7 +46,7 @@ procedure init_gui(fd : PFD_objsform);
 const
     x : array[0..5] of real = ( 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 );
     y : array[0..5] of real = ( 5.5, 4.0, 4.5, 3.8, 4.0, 5.0 );
-    labels: array[0..5] of pchar = ('Mon','Tue','Wed', 'Thur','Fri','Sat');
+    labels: array[0..5] of PAnsiChar = ('Mon','Tue','Wed', 'Thur','Fri','Sat');
 
 var
     i : integer;
@@ -57,8 +57,8 @@ begin
 
     fl_set_pixmapbutton_data(fd^.pixbutton,porsche);
     fl_set_pixmap_data(fd^.pix, porsche);
-    fl_set_bitmapbutton_data(fd^.bitbutton, bm1_width, bm1_height,pchar(@bm1_bits));
-    fl_set_bitmap_data(fd^.bit, nomail_width, nomail_height, pchar(@nomail_bits));
+    fl_set_bitmapbutton_data(fd^.bitbutton, bm1_width, bm1_height,PAnsiChar(@bm1_bits));
+    fl_set_bitmap_data(fd^.bit, nomail_width, nomail_height, PAnsiChar(@nomail_bits));
 
     fl_set_browser_fontsize(fd^.browser,FL_NORMAL_SIZE);
     fl_addto_browser(fd^.browser,'browser line 1'#10'browser line 2');

+ 3 - 3
packages/xforms/examples/longlabel.pp

@@ -4,13 +4,13 @@ program longlabel;
 uses xforms;
 
 Const
-label1 : pchar = 'This demo shows the use of some very'#10+
+label1 : PAnsiChar = 'This demo shows the use of some very'#10+
               'long labels. The dynamic storage allocation'#10+
               'for such long labels should guarantee that'#10+
               'all of this works without any problem.';
 { This shows a funny bug in FPK 0.9.1 :) MVC.}
 
-label2 : pchar ='This is the second string that should again'#10+
+label2 : PAnsiChar ='This is the second string that should again'#10+
              'be a bit larger such that a new, larger amount'#10+
              'of storage has to be allocated for the label.'#10+
              'This is of course no problem. By the way,'#10+
@@ -20,7 +20,7 @@ label2 : pchar ='This is the second string that should again'#10+
              'allocated for it in the previous version of'#10+
              'the Forms Library';
 
-label3 : pchar ='And now back to the first one:'#10#10+
+label3 : PAnsiChar ='And now back to the first one:'#10#10+
              'This demo shows the use of some very'#10+
              'long labels. The dynamic storage allocation'#10+
              'for such long labels should guarantee that'#10+

+ 2 - 2
packages/xforms/examples/newbutton.pp

@@ -66,7 +66,7 @@ end;
 
 
 { creation }
-function fl_create_crossbutton(Thetype : Longint; x,y,w,h : TFL_Coord; thelabel : Pchar) : PFL_OBJECT;
+function fl_create_crossbutton(Thetype : Longint; x,y,w,h : TFL_Coord; thelabel : PAnsiChar) : PFL_OBJECT;
 
 var ob : PFL_OBJECT;
 
@@ -79,7 +79,7 @@ begin
      fl_create_crossbutton:=ob;
 end;
 
-function fl_add_crossbutton(Thetype : longint; x,y,w,h : TFL_COORD; thelabel : pchar): PFL_OBJECT;
+function fl_add_crossbutton(Thetype : longint; x,y,w,h : TFL_COORD; thelabel : PAnsiChar): PFL_OBJECT;
 
 var ob : PFL_OBJECT;
     theform : PFL_FORM;

+ 5 - 5
packages/xforms/examples/objreturn.pp

@@ -26,7 +26,7 @@ fd_form0 : PFD_form;
 procedure return_cb(ob : PFL_OBJECT; data : longint); cdecl;
 
 begin
-    fl_addto_browser(fd_form0^.br, pchar(data));
+    fl_addto_browser(fd_form0^.br, PAnsiChar(data));
 end;
 
 procedure set_when( n : longint);
@@ -56,10 +56,10 @@ end;
 
 Function create_form_form0 : PFD_FORM;
 
-Const Preturn : pchar = 'slider returned';
-      Pcounter : pchar = 'counter returned';
-      Pinput : pchar = 'input2 returned';
-      Pinput1 : Pchar =  'input1 returned';
+Const Preturn : PAnsiChar = 'slider returned';
+      Pcounter : PAnsiChar = 'counter returned';
+      Pinput : PAnsiChar = 'input2 returned';
+      Pinput1 : PAnsiChar =  'input1 returned';
 
 var
   obj : PFL_OBJECT;

+ 1 - 1
packages/xforms/src/fd2pascal.pp

@@ -160,7 +160,7 @@ Function BaseName(const s:ansistring;suf:ansistring):ansistring;
 begin
   BaseName:=extractfilename(s);
   if '.'+suf=extractfileext(s) then
-    BaseName:=changefileext(s,'');  
+    BaseName:=changefileext(s,ansistring(''));  
 end;
 
 Procedure EmitError (Const s : String);

File diff suppressed because it is too large
+ 198 - 198
packages/xforms/src/xforms.pp


Some files were not shown because too many files changed in this diff