Commit Graph

110 Commits

Author SHA1 Message Date
marcoonthegit
2563a7a072 * Add ptr types for fixed(u)int, fixes #40205
(cherry picked from commit 33071fd179)
2023-04-16 17:39:35 +02:00
marcoonthegit
a97beb3fd5 * add IEquatable<T>, requested on forum.
(cherry picked from commit d38c881828)
2022-06-20 11:00:32 +02:00
marco
e41ddf221c --- Merging r41271 into '.':
U    packages/fpmake_add.inc
U    packages/fpmake_proc.inc
A    packages/libmagic
A    packages/libmagic/Makefile
A    packages/libmagic/Makefile.fpc
A    packages/libmagic/examples
A    packages/libmagic/examples/basic.pp
A    packages/libmagic/fpmake.pp
A    packages/libmagic/src
A    packages/libmagic/src/libmagic.pp
--- Recording mergeinfo for merge of r41271 into '.':
 U   .
--- Merging r41330 into '.':
U    rtl/objpas/sysutils/syssr.inc
U    rtl/objpas/sysutils/sysstr.inc
U    rtl/objpas/sysutils/sysstrh.inc
U    rtl/objpas/sysutils/sysuni.inc
U    rtl/objpas/sysutils/sysunih.inc
U    rtl/objpas/sysutils/syswide.inc
U    rtl/objpas/sysutils/syswideh.inc
--- Recording mergeinfo for merge of r41330 into '.':
 G   .
--- Merging r41336 into '.':
G    rtl/objpas/sysutils/sysstr.inc
G    rtl/objpas/sysutils/sysstrh.inc
U    rtl/win/sysutils.pp
--- Recording mergeinfo for merge of r41336 into '.':
 G   .
--- Merging r41337 into '.':
G    rtl/win/sysutils.pp
--- Recording mergeinfo for merge of r41337 into '.':
 G   .
--- Merging r41342 into '.':
U    rtl/objpas/objpas.pp
--- Recording mergeinfo for merge of r41342 into '.':
 G   .
--- Merging r41343 into '.':
U    packages/rtl-objpas/src/inc/strutils.pp
--- Recording mergeinfo for merge of r41343 into '.':
 G   .
--- Recording mergeinfo for merge of r41400 into '.':
 G   .
--- Merging r41547 into '.':
U    rtl/objpas/sysutils/sysencodingh.inc
--- Recording mergeinfo for merge of r41547 into '.':
 G   .

# revisions: 41271,41330,41336,41337,41342,41343,41400,41547
r41271 | michael | 2019-02-09 20:57:11 +0100 (Sat, 09 Feb 2019) | 1 line
Changed paths:
   M /trunk/packages/fpmake_add.inc
   M /trunk/packages/fpmake_proc.inc
   A /trunk/packages/libmagic
   A /trunk/packages/libmagic/Makefile
   A /trunk/packages/libmagic/Makefile.fpc
   A /trunk/packages/libmagic/examples
   A /trunk/packages/libmagic/examples/basic.pp
   A /trunk/packages/libmagic/fpmake.pp
   A /trunk/packages/libmagic/src
   A /trunk/packages/libmagic/src/libmagic.pp

* libmagic headers by Silvio Clecio
r41330 | michael | 2019-02-16 08:55:26 +0100 (Sat, 16 Feb 2019) | 1 line
Changed paths:
   M /trunk/rtl/objpas/sysutils/syssr.inc
   M /trunk/rtl/objpas/sysutils/sysstr.inc
   M /trunk/rtl/objpas/sysutils/sysstrh.inc
   M /trunk/rtl/objpas/sysutils/sysuni.inc
   M /trunk/rtl/objpas/sysutils/sysunih.inc
   M /trunk/rtl/objpas/sysutils/syswide.inc
   M /trunk/rtl/objpas/sysutils/syswideh.inc

* Add overloaded version of stringreplace with replacement count (ID 23987)
r41336 | michael | 2019-02-16 11:50:31 +0100 (Sat, 16 Feb 2019) | 1 line
Changed paths:
   M /trunk/rtl/objpas/sysutils/sysstr.inc
   M /trunk/rtl/objpas/sysutils/sysstrh.inc
   M /trunk/rtl/win/sysutils.pp

* Complete the implementation of IsLeadChar
r41337 | michael | 2019-02-16 11:52:51 +0100 (Sat, 16 Feb 2019) | 1 line
Changed paths:
   M /trunk/rtl/win/sysutils.pp

* Actually call InitLeadBytes
r41342 | michael | 2019-02-16 13:52:00 +0100 (Sat, 16 Feb 2019) | 1 line
Changed paths:
   M /trunk/rtl/objpas/objpas.pp

* Add overloaded version of AssignFile with codepage. See bug ID #34889
r41343 | michael | 2019-02-16 15:52:17 +0100 (Sat, 16 Feb 2019) | 1 line
Changed paths:
   M /trunk/packages/rtl-objpas/src/inc/strutils.pp

* Fix bug ID #35098 (count param)
r41400 | yury | 2019-02-20 16:11:45 +0100 (Wed, 20 Feb 2019) | 1 line
Changed paths:
   M /trunk/rtl/android/sysandroid.inc
   M /trunk/rtl/linux/system.pp

* android: Fixed stdio redirection for threads.
r41547 | michael | 2019-03-02 11:42:19 +0100 (Sat, 02 Mar 2019) | 1 line
Changed paths:
   M /trunk/rtl/objpas/sysutils/sysencodingh.inc

* Make FreeEncodings protected: they cannot be public, as it causes AVs (see bug ID #34856)

git-svn-id: branches/fixes_3_2@41933 -
2019-04-25 12:40:02 +00:00
florian
7741b495bd - duplicate defintion of TBoundArray removed, resolves #32530
git-svn-id: trunk@37627 -
2017-11-26 21:03:52 +00:00
michael
4f02942b55 * Fix bug #31526, missing FixedInt FixedUInt from Delphi Berlin
git-svn-id: trunk@35560 -
2017-03-11 09:26:57 +00:00
marco
b33da605f3 * move tendian to objpas, alias in sysutils, types. mantis #31150
git-svn-id: trunk@35202 -
2016-12-27 14:30:13 +00:00
svenbarth
947c876ba3 * use the indirect start and end symbols for the resource string table (affects both the compiler and the RTL)
git-svn-id: trunk@34185 -
2016-07-22 16:01:39 +00:00
svenbarth
e3060130a4 Adjustments so that the resource string related tables are provided inside the system unit (both for indirect and direct entry targets).
rtl/inc/system.inc:
  + new variables that hold pointers to the tables
  + new procedure SetupEntryInformation() that should be used in the entry points of indirect entry targets to setup cross target fields
  + for direct entry targets the two resource string tables are imported here and supplied as initialization to the table pointers
objpas/objpas.pp:
  * adjust table declarations so that the pointers provided from the System unit are used
  * adjust usages of the tables as they are now pointers
win32/system.pp:
  * Exe_Entry: use SetupEntryInformation()
win/syswin.inc:
  * Dll_Entry: use SetupEntryInformation()

git-svn-id: trunk@33028 -
2016-01-29 17:19:33 +00:00
Jonas Maebe
0c904e92ff * moved TResourceStringRecord from the objpas to the system unit so it can be
used in the compiler when emitting resourcestrings

git-svn-id: trunk@32208 -
2015-10-30 20:45:19 +00:00
Jonas Maebe
4494565a15 - removed RESSTRSECTIONS-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31687 -
2015-09-15 11:51:32 +00:00
michael
a4502a50d5 * Added TArray generic
git-svn-id: trunk@31462 -
2015-08-31 12:03:55 +00:00
florian
5030ff05b5 * take care of feature defines
git-svn-id: trunk@30377 -
2015-03-29 19:35:42 +00:00
nickysn
a0f08f3d5c * objpas.IntegerArray on 16 and 8-bit CPUs made as large as possible without
causing 'data element too large'

git-svn-id: trunk@27250 -
2014-03-24 00:01:13 +00:00
nickysn
a4ac2a3538 * fixed compilation of unit objpas in i8086 large memory model
git-svn-id: trunk@27249 -
2014-03-23 23:54:15 +00:00
nickysn
fb20791cbe * replaced all the remaining uses of nativeint in the rtl with either sizeint
or objpasint

git-svn-id: trunk@27237 -
2014-03-23 13:38:16 +00:00
nickysn
b6075c59c1 * changed to for loop counters in the resource string helper routines from
nativeint to objpas.integer

git-svn-id: trunk@27099 -
2014-03-11 20:52:09 +00:00
nickysn
f2cf516529 * set objpas.integer = smallint on 16-bit and 8-bit CPUs. Rationale:
1) Delphi 1 compatibility
  2) we reclaim pascal's 'Integer' type to be the integer type (at least 16 bits
     in size) that is the most efficient to work with on the target processor

git-svn-id: trunk@27048 -
2014-03-09 16:33:20 +00:00
nickysn
ae28ecd5f8 * changed the for loop counters in the resource string helper routines to be
nativeint instead of longint (generates more efficient code on i8086)

git-svn-id: trunk@26922 -
2014-03-02 13:42:30 +00:00
nickysn
5242ed7864 * changed TResStrInitTable.Count and TWStrInitTablesTable.Count to nativeint
git-svn-id: trunk@26921 -
2014-03-02 13:27:59 +00:00
nickysn
49b65fedd9 * TResourceStringTableList.Count type changed from ptrint to nativeint. Both
types are the same on almost all platforms. The only difference is on i8086,
  where ptrint changes according to the memory model, while nativeint stays
  16-bit. In the compiler, the count is emitted with Tai_const.Create_pint,
  which also stays 16-bit in all memory models, so the correct corresponding
  type in the rtl is nativeint.

git-svn-id: trunk@26920 -
2014-03-02 12:47:32 +00:00
svenbarth
4ea89d01ea Somewhat a fix for Mantis #25025 : added generic variants of the TEnumerable/TEnumerator interfaces. Added to unit ObjPas, because mode ObjFPC does not allow overloading of types with generics (which would be the case in unit System). Also the two interfaces are not completely Delphi compatible on purpose! In Delphi they inherit from corresponding non generic interfaces, but this leads in FPC as well as in Delphi to problems.
rtl/objpas/objpas.pp:
  + add generic interfaces IEnumerator<T> and IEnumerable<T> which are equivalent to TEnumerator and TEnumerable

git-svn-id: trunk@25498 -
2013-09-16 10:15:19 +00:00
Jonas Maebe
acb27f726a * assignfile(ansistring) -> assignfile(rawbytestring)
+ assignfile(unicodestring)

git-svn-id: branches/cpstrrtl@25161 -
2013-07-22 21:45:30 +00:00
Jonas Maebe
d66d15aad3 + added mkdir/chdir/rmdir(rawbytestring) and (unicodestring) to the system unit
* renamed platform-specific pchar versions of those rouines to do_*() and
    changed them to either rawbytestring or unicodestring depending on the
    FPCRTL_FILESYSTEM_SINGLE_BYTE_API/FPCRTL_FILESYSTEM_TWO_BYTE_API setting
  * implemented generic shortstring versions of those routines on top of either
    rawbytestring or unicodestring depending on the API-kind (in case of the
    embedded target, if ansistring are not supported they will map directly
    to shortstring routines instead)
  * all platform-specific *dir() routines with rawbytestring parameters now
    receive their parameters in DefaultFileSystemCodePage
  - removed no longer required ansistring variants from the objpas unit
  - removed no longer required FPC_SYS_MKDIR etc aliases
  * factored out empty string and inoutres<>0 checks from platform-specific
    *dir() routines to generic ones
  o platform-specific notes:
   o amiga/morphos: check new pathconv(rawbytestring) function
   o macos TODO: convert PathArgToFSSpec (and the routines it calls) to
     rawbytestring
   o nativent: added SysUnicodeStringToNtStr() function
   o wii: convert dirio callbacks to use rawbytestring to avoid conversion
  + test for unicode mk/ch/rm/getdir()

git-svn-id: branches/cpstrrtl@25048 -
2013-07-04 22:28:37 +00:00
Jonas Maebe
112fafc6fd + paramstr(longint):unicode string function in uuchar
* optimised objpas.paramstr (let the compiler convert the pchar to
    ansistring instead of using an unoptimised loop)

git-svn-id: branches/cpstrrtl@24958 -
2013-06-24 09:39:54 +00:00
florian
feed492568 * fixes to compile objpas i8086
git-svn-id: branches/i8086@23972 -
2013-03-23 18:27:46 +00:00
florian
0215f00490 * fix compilation of objpas if ansistrings are disabled as requested by Michael Ring on fpc-devel
git-svn-id: trunk@23256 -
2012-12-31 14:26:48 +00:00
sergei
186cbaaf18 * Ansistring versions of MkDir,ChDir,RmDir: make a full copy of argument string. This is necessary because underlying implementations can modify directory separators in argument, causing crash if argument resides in read-only memory. This is also consistent with shortstring variants of same procedures.
git-svn-id: trunk@23000 -
2012-11-16 18:27:55 +00:00
sergei
3b904943e7 * Moved ExceptObjProc from objpas to system, because it is going to be called from system. Also added ExceptClsProc variable.
* Fixed SExceptionErrorMessage, it was missing format placeholder.

git-svn-id: trunk@19787 -
2011-12-09 14:52:26 +00:00
sergei
0c3c8a8745 * Cast HashValue to Longint, otherwise empty strings (which have hash=$FFFFFFFF) cause range check error when RTL is compiled with -Cr.
git-svn-id: trunk@19034 -
2011-09-08 19:15:34 +00:00
sergei
689d4b3ecc + Mantis #19651: Generate table of typed string constants which are initialized with resourcestrings, so they are updated when SetResourceStrings or SetUnitResourceStrings is called.
git-svn-id: trunk@18968 -
2011-09-04 16:01:26 +00:00
florian
63403e5199 * *Dir(<ansistring>) functions need to check io result as well, resolves #19977
git-svn-id: trunk@18209 -
2011-08-14 19:00:07 +00:00
florian
5f06130095 * fixed objpas compilation for CPUs with 16 Bit addresses
git-svn-id: branches/avr@17104 -
2011-03-09 19:41:36 +00:00
florian
138c5d1570 + feature switch RESOURCES
* use of feature switches in objpas updated
+ build unit objpas for embedded targets

git-svn-id: trunk@15473 -
2010-06-22 12:37:41 +00:00
marco
4104d9f481 * More pluggability of the RTL. Mantis 15124
git-svn-id: trunk@14212 -
2009-11-18 21:16:12 +00:00
marco
17062d667c * ansistring versions of mk/rm/chdir in objpas, Mantis 15010. The os-dependant routines of *nix/os2/win/dos have been converted
git-svn-id: trunk@14211 -
2009-11-18 18:04:51 +00:00
Jonas Maebe
ee69d00bec - unconditionally enabled {$ifdef PARAOUTFILE}-code (that define was
decomissioned quite a while ago, but this file was forgotten in
    that process)

git-svn-id: trunk@13181 -
2009-05-21 09:57:45 +00:00
Almindor
920660c460 * fix AssignFile to use "out" if the PARAMOUT define is defined (fixes 9275)
git-svn-id: trunk@8080 -
2007-07-16 21:47:31 +00:00
michael
07fdede9b8 * Defined ExceptionClass and ExceptObjProc for Delphi compatibility (bug 8459)
git-svn-id: trunk@7850 -
2007-06-29 20:16:44 +00:00
daniel
ecf9363211 - Do not initialize/finalize resourcestrings in objpas.
+ Finalize resourcestrings in gettext.

git-svn-id: trunk@5640 -
2006-12-18 22:05:32 +00:00
marco
fe43dc6266 * iocheck for closefile
git-svn-id: trunk@3946 -
2006-06-25 18:36:12 +00:00
marco
0f53f299f1 * fix for oldbugid 4365 new id 6279
closefile no longer under {dollar I-}

git-svn-id: trunk@3937 -
2006-06-25 11:17:18 +00:00
peter
096113d370 * support setting translations per unit
* store unitname as the first entry in the resourcestring table

git-svn-id: trunk@2987 -
2006-03-20 12:07:29 +00:00
peter
ddfa0bd1dd * use resourcstring table again
git-svn-id: trunk@2979 -
2006-03-19 21:16:32 +00:00
peter
9d96f32bdc * remove resourcestring tables
git-svn-id: trunk@2835 -
2006-03-10 15:20:35 +00:00
florian
f5b9130b98 * deallocation of translated resourcestrings
* load heaptrc before objpas

git-svn-id: trunk@549 -
2005-06-30 19:07:45 +00:00
michael
23ad0ae1ec + Removed HASINTF and VER1_0 defines
git-svn-id: trunk@239 -
2005-06-07 20:30:03 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
8be342c36b * pinteger in non-delphi/objfpc mode is psmallint 2005-01-24 18:03:19 +00:00