Browse Source

* PChar -> PAnsiChar

Michaël Van Canneyt 2 years ago
parent
commit
7a23cfb2c8

+ 4 - 4
packages/libmicrohttpd/examples/cutils.pas

@@ -53,7 +53,7 @@ function _daylight: clong; cdecl; external LIB_NAME name '__daylight';
 {$IFDEF UNIX}
 function sscanf(s: Pcchar; format: Pcchar): cint; cdecl; varargs; external LIB_NAME name 'sscanf';
 function lseek(fd: cint; offset: __off_t; whence: cint): __off_t; cdecl; external LIB_NAME name 'lseek';
-function isprint(p: Char): cint; cdecl; external LIB_NAME name 'isprint';
+function isprint(p: AnsiChar): cint; cdecl; external LIB_NAME name 'isprint';
 function strdup(para1: Pcchar): Pcchar; cdecl; external LIB_NAME name 'strdup';
 function strchr(para1: Pcchar; para2: cint): Pcchar; cdecl; external LIB_NAME name 'strchr';
 function strstr(haystack: Pcchar; needle: Pcchar): Pcchar; cdecl; external LIB_NAME name 'strstr';
@@ -64,9 +64,9 @@ function errno: PInteger; cdecl; external LIB_NAME name '__errno_location';
 function memset(s: pointer; c: longint; n: size_t): pointer; cdecl; external LIB_NAME name 'memset';
 function snprintf(str: Pcchar; size: size_t; format: Pcchar): cint; cdecl; varargs; external LIB_NAME Name {$IFDEF MSWINDOWS}'_snprintf'{$ELSE}'snprintf'{$ENDIF};
 function rand: cint; cdecl; external LIB_NAME name 'rand';
-function strerror(errnum: cint): Pchar; cdecl; external LIB_NAME name 'strerror';
-function strncat(a, b: Pcchar; sz: size_t): Pchar; cdecl; external LIB_NAME name 'strncat';
-function strcpy(a, b: Pcchar): Pchar; cdecl; external LIB_NAME name 'strcpy';
+function strerror(errnum: cint): PAnsiChar; cdecl; external LIB_NAME name 'strerror';
+function strncat(a, b: Pcchar; sz: size_t): PAnsiChar; cdecl; external LIB_NAME name 'strncat';
+function strcpy(a, b: Pcchar): PAnsiChar; cdecl; external LIB_NAME name 'strcpy';
 function strncmp(a, b: Pcchar; sz: size_t): cint; cdecl;  external LIB_NAME name 'strncmp';
 function signal(sig: cint; func: signal_func): signal_func; cdecl; external LIB_NAME Name 'signal';
 

+ 1 - 1
packages/libmicrohttpd/examples/event_and_thread.pp

@@ -123,7 +123,7 @@ type
     busy_page: Pcchar = '<html><body>The server is busy. :-(</body></html>';
 {$ENDIF}
   var
-    s: string;
+    s: ansistring;
     ret: cint;
     thr: TThread;
     response: PMHD_Response;

+ 1 - 1
packages/libmicrohttpd/examples/fileserver_example_dirs.pp

@@ -106,7 +106,7 @@ const
       &file := nil;
     if &file = nil then
     begin
-      dir := FpOpendir(PChar('.'));
+      dir := FpOpendir(PAnsiChar('.'));
       if dir = nil then
       begin
         (* most likely cause: more concurrent requests than

+ 4 - 4
packages/libmicrohttpd/examples/post_example.pp

@@ -79,7 +79,7 @@ type
     (**
      * Unique ID for this session.
      *)
-    sid: array[0..33] of Char;
+    sid: array[0..33] of AnsiChar;
 
     (**
      * Reference counter giving the number of connections
@@ -95,12 +95,12 @@ type
     (**
      * String submitted via form.
      *)
-    value_1: array[0..64] of Char;
+    value_1: array[0..64] of AnsiChar;
 
     (**
      * Another value submitted via form.
      *)
-    value_2: array[0..64] of Char;
+    value_2: array[0..64] of AnsiChar;
   end;
 
   (**
@@ -225,7 +225,7 @@ type
    *)
   procedure add_session_cookie(session: PSession; response: PMHD_Response);
   var
-    cstr: array[0..256] of Char;
+    cstr: array[0..256] of AnsiChar;
   begin
     snprintf(cstr, SizeOf(cstr), '%s=%s', COOKIE_NAME, session^.sid);
     if MHD_NO =

+ 4 - 4
packages/libmicrohttpd/examples/sessions.pp

@@ -60,7 +60,7 @@ type
     (**
      * Unique ID for this session.
      *)
-    sid: array[0..33] of Char;
+    sid: array[0..33] of AnsiChar;
 
     (**
      * Reference counter giving the number of connections
@@ -76,12 +76,12 @@ type
     (**
      * String submitted via form.
      *)
-    value_1: array[0..64] of Char;
+    value_1: array[0..64] of AnsiChar;
 
     (**
      * Another value submitted via form.
      *)
-    value_2: array[0..64] of Char;
+    value_2: array[0..64] of AnsiChar;
   end;
 
   (**
@@ -209,7 +209,7 @@ type
    *)
   procedure add_session_cookie(session: PSession; response: PMHD_Response);
   var
-    cstr: array[0..256] of Char;
+    cstr: array[0..256] of AnsiChar;
   begin
     snprintf(cstr, SizeOf(cstr), '%s=%s', COOKIE_NAME, session^.sid);
     if MHD_NO =