Compare commits

...

1060 Commits

Author SHA1 Message Date
Gunnar Dalsnes
eb74a3a209 mostly naming changes
svn path=/branches/win32k rewrite attempt/; revision=17607
2005-09-02 20:45:56 +00:00
Gunnar Dalsnes
4db821ae05 forgot to commit thisone
svn path=/branches/win32k rewrite attempt/; revision=17599
2005-08-31 14:46:04 +00:00
Gunnar Dalsnes
2ee898e30b mostly structural changes (reorg). nothing really fixed and hopefully nothing broken
svn path=/branches/win32k rewrite attempt/; revision=17590
2005-08-29 14:24:38 +00:00
Gunnar Dalsnes
e24caf21d0 -merge from head 16828-17390
-misc

svn path=/branches/win32k rewrite attempt/; revision=17409
2005-08-16 00:27:39 +00:00
Gunnar Dalsnes
183d1f7277 -revert some prev. changes (using wthread instead of queue) bcause filip didnt like it
-misc queue/thread-input changes

svn path=/branches/win32k rewrite attempt/; revision=17392
2005-08-15 01:19:24 +00:00
Gunnar Dalsnes
867aca0d44 change proto
svn path=/branches/win32k rewrite attempt/; revision=17391
2005-08-15 01:16:58 +00:00
Gunnar Dalsnes
138d39eb35 more stuff
svn path=/branches/win32k rewrite attempt/; revision=17267
2005-08-10 19:52:35 +00:00
Gunnar Dalsnes
691d82883f some stuff
svn path=/branches/win32k rewrite attempt/; revision=17266
2005-08-10 19:52:19 +00:00
Filip Navara
16e21ce809 Fix NULL pointer dereference when clicking on desktop window.
svn path=/branches/win32k rewrite attempt/; revision=17168
2005-08-07 15:16:52 +00:00
Filip Navara
18c80f7c64 Fix queuing of mouse move messages.
svn path=/branches/win32k rewrite attempt/; revision=17163
2005-08-07 12:10:54 +00:00
Filip Navara
a2b6189197 Fix translation of extended keys.
svn path=/branches/win32k rewrite attempt/; revision=17161
2005-08-07 11:52:27 +00:00
Filip Navara
3952a38f5e Fix a wrong size calculation.
svn path=/branches/win32k rewrite attempt/; revision=17052
2005-08-05 01:25:43 +00:00
Filip Navara
f01e0acb02 You would think that two commits are enough for fixing formulations in the document, but I can easily prove you wrong...
svn path=/branches/win32k rewrite attempt/; revision=17047
2005-08-04 18:11:03 +00:00
Filip Navara
1bfb63e65a Fix grammar...
svn path=/branches/win32k rewrite attempt/; revision=17046
2005-08-04 18:01:47 +00:00
Filip Navara
9da5d63bb5 Update comments.
svn path=/branches/win32k rewrite attempt/; revision=17045
2005-08-04 17:49:53 +00:00
Gunnar Dalsnes
ba7a31ef38 -fix timerbug (abiword splash)
-misc

Somewhat works now (thanks to filip), but closing gui consoles makes ros go 100% cpu

svn path=/branches/win32k rewrite attempt/; revision=17044
2005-08-04 16:32:18 +00:00
Filip Navara
b291c417ec Deliver timers only to corresponding message queues.
svn path=/branches/win32k rewrite attempt/; revision=17032
2005-08-03 21:18:24 +00:00
Filip Navara
2eca87b88b Return correct error value in NtUserDestroyCursorIcon.
svn path=/branches/win32k rewrite attempt/; revision=16996
2005-08-03 13:45:18 +00:00
Filip Navara
10fa6dfc70 - Add comment explaining the primitive message queue and fix IntTranslateKbdMessage to work with it.
- Fix one windows locking case in IntPeekMessage.
- Zero memory allocated for HOOKs, MENU_OBJECTs and MONITORs to avoid accessing uninitialized variables.
- Add check for hWnd == NULL to IntGetWindowObject. We mustn't access the window station in that case (it can happen to be call from the primitive message queue thread).

svn path=/branches/win32k rewrite attempt/; revision=16995
2005-08-03 12:42:50 +00:00
Filip Navara
8c8176f951 Use mapped sections for fonts instead of paged pool memory.
svn path=/branches/win32k rewrite attempt/; revision=16978
2005-08-02 20:34:51 +00:00
Filip Navara
3727f7f579 Change comment.
svn path=/branches/win32k rewrite attempt/; revision=16880
2005-07-29 20:24:48 +00:00
Gunnar Dalsnes
754d1c86a3 merge from trunk 16686-16827
misc stuff
still crash often due to referencing problems/freed message queue

svn path=/branches/win32k rewrite attempt/; revision=16829
2005-07-28 13:40:52 +00:00
Gunnar Dalsnes
faed506038 delete stuff (will this ever end?)
svn path=/branches/win32k rewrite attempt/; revision=16821
2005-07-27 21:31:15 +00:00
Gunnar Dalsnes
b653367d15 move stuff, again
svn path=/branches/win32k rewrite attempt/; revision=16820
2005-07-27 21:30:22 +00:00
Gunnar Dalsnes
625b89ccf4 hardon cant svn
svn path=/branches/win32k rewrite attempt/; revision=16819
2005-07-27 21:23:31 +00:00
Gunnar Dalsnes
51e354bbfa move stuff:-|
svn path=/branches/win32k rewrite attempt/; revision=16818
2005-07-27 21:22:26 +00:00
Gunnar Dalsnes
95e0fa9313 give better name
svn path=/branches/hardons1stbranch/; revision=16817
2005-07-27 21:09:08 +00:00
Gunnar Dalsnes
9ace89631d give better name
svn path=/branches/win32k rewrite attempt/; revision=16817
2005-07-27 21:09:08 +00:00
Gunnar Dalsnes
2cf308079f explorer starts but crash due to missing/lost winsta (ref/deref problem?)
svn path=/branches/hardons1stbranch/; revision=16799
2005-07-27 13:18:11 +00:00
Gunnar Dalsnes
b0b68753ff fix compile
svn path=/branches/hardons1stbranch/; revision=16798
2005-07-27 12:01:05 +00:00
Gunnar Dalsnes
5d915742e5 move stuff
svn path=/branches/hardons1stbranch/; revision=16795
2005-07-27 11:33:49 +00:00
Gunnar Dalsnes
98dd342a5e my 1st
svn path=/branches/hardons1stbranch/; revision=16794
2005-07-27 11:08:35 +00:00
Gunnar Dalsnes
9c6c715330 my 1st
svn path=/branches/hardons1stbranch/; revision=16793
2005-07-27 11:06:08 +00:00
Magnus Olsen
58f5ef812e fix a small bug, write out time like HH:MM:SS,ms as ms cmd does.
svn path=/trunk/; revision=16681
2005-07-21 16:28:20 +00:00
Hartmut Birr
0d62ee8f06 Set MmUserProbeAddress and MmHighestUserAddress according to the system range start.
svn path=/trunk/; revision=16680
2005-07-21 15:46:07 +00:00
Magnus Olsen
4ecc4b94c9 Fix copy /B filename + , , bug (touch) and fix whitespace for copy /B file + file + file2
by Brandon Turner

svn path=/trunk/; revision=16679
2005-07-21 14:15:42 +00:00
Magnus Olsen
c4341bddc3 Update with right reactos logo by mf
svn path=/trunk/; revision=16678
2005-07-21 13:55:36 +00:00
Thomas Bluemel
409e9165aa removed the ros-specific (and unused) functions ExRosDumpPagedPoolByTag, ExRosQueryPagedPoolTag and ExRosQueryPoolTag
svn path=/trunk/; revision=16677
2005-07-21 10:31:29 +00:00
Magnus Olsen
0da3627c3b add touch to copy by Brandon Turner
svn path=/trunk/; revision=16676
2005-07-21 10:03:01 +00:00
Alex Ionescu
c6262e3b0f - Freetype Update to 2.1.10. Reduces memory usage, increases speed and fixes drawing bugs.
- Enable Bytecode. Weird_W's fonts finally look humanly readable.

Thanks to Waxdragon for testing.
 
<http://www.freetype.org>

LATEST CHANGES BETWEEN 2.1.10 and 2.1.9

  I. IMPORTANT BUG FIXES

    - The size comparison for BDF and PCF files could fail sometimes.

    - Some  CFF files  were still not  loaded  correctly.   Patch from
      Derek Noonburg.

    - The stroker still had some serious bugs.

    - Boris  Letocha  fixed a  bug in  the  TrueType interpreter:  The
      NPUSHW instruction wasn't skipped correctly in IF clauses.  Some
      fonts like `Helvetica 75 Bold' failed.

    - Another  serious  bug  in  handling  TrueType hints  caused many
      distortions.  It has been introduced in version 2.1.8, and it is
      highly recommended to upgrade.

    - FreeType didn't properly parse empty Type 1 glyphs.
    
    - An unbound dynamic buffer growth was fixed in the PFR loader.
    
    - Several bugs have been fixed in the cache sub-system.

    - FreeType behaved incorrectly when resizing two distinct but very
      close character pixel sizes through `FT_Set_Char_Size' (Savannah
      bug #12263).
      
    - The auto-hinter didn't work properly for fonts without a Unicode
      charmap -- it even refused to load the glyphs.


  II. IMPORTANT CHANGES

    - Many fixes have been applied to drastically reduce the amount of
      heap   memory   used   by   FreeType,   especially   when  using
      memory-mapped font files  (which is the default on Unix  systems
      which support them).

    - The auto-hinter  has been replaced with a new module, called the
      `auto-fitter'.  It consumes  less memory  than its  predecessor,
      and it is  prepared to support non-latin scripts  better in next
      releases.

    - George Williams  contributed code to read  kerning data from PFM
      files.

    - FreeType   now   uses    the   TT_NAME_ID_PREFERRED_FAMILY   and
      TT_NAME_ID_PREFERRED_SUBFAMILY   strings   (if   available)  for
      setting  family  and  style in SFNT  fonts  (patch from Kornfeld
      Eliyahu Peter).

    - A  new  API `FT_Sfnt_Table_Info'  (in FT_TRUETYPE_TABLES_H)  has
      been added to retrieve name and size information of SFNT tables.

    - A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has
      been added to validate OpenType tables  (BASE, GDEF, GPOS, GSUB,
      JSTF).   After validation  it is  no longer  necessary to  check
      for errors in those tables while accessing them.

      Note that  this module might  be moved to another library in the
      future  to avoid  a tight  dependency between  FreeType and  the
      OpenType specification.

    - A new API in FT_BITMAP_H  (`FT_Bitmap_New', `FT_Bitmap_Convert',
      `FT_Bitmap_Copy',  `FT_Bitmap_Embolden',  `FT_Bitmap_Done')  has
      been added.   Its  use is  to convert an  FT_Bitmap structure in
      1bpp, 2bpp,  4bpp, or 8bpp  format into  another 8bpp FT_Bitmap,
      probably using a different pitch, and to further manipulate it.

    - A new  API `FT_Outline_Embolden'  (in FT_OUTLINE_H) gives  finer
      control how  outlines are embolded.

    - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H)  now handles bitmaps
      also (code contributed  by Chia I Wu).  Note that this  function
      is still experimental and may be replaced with a better API.

    - The method  how BDF and PCF  bitmap fonts  are accessed has been
      refined.   Formerly,   FT_Set_Pixel_Sizes  and  FT_Set_Char_Size
      were  synonyms in  FreeType's  BDF and PCF interface.  This  has
      changed now.  FT_Set_Pixel_Sizes  should be  used to  select the
      actual  font dimensions  (the `strike',  which is the sum of the
      `FONT_ASCENT'    and    `FONT_DESCENT'    properties),     while
      FT_Set_Char_Size  selects  the  `nominal' size  (the `PIXELSIZE'
      property).  In both functions, the width parameter is ignored.


  III. MISCELLANEOUS

    - The BDF driver  no longer converts  all returned bitmaps  with a
      depth of 2bpp or 4bpp to a depth of 8bpp.  The documentation has
      not  mentioned  this  explicitly,  but  implementors  might have
      relied on this after looking into the source files.

    - A new option `--ftversion' has been  added to freetype-config to
      return the FreeType version.

    - The  memory  debugger  has  been  updated   to  dump  allocation
      statistics on  all allocation  sources in the library.   This is
      useful to  spot greedy  allocations when  loading and processing
      fonts.

    - We removed a huge array of constant pointers to constant strings
      in the `psnames' module.   The problem was that  compilations in
      PIC mode (i.e.,  when generating a  Unix shared object/dll)  put
      the array  into the non-shared  writable section of  the library
      since absolute pointers are not relocatable by nature.
      
      This reduces the memory consumption by approximately 16KByte per
      process linked  to FreeType.   We now also store  the array in a
      compressed form (as a trie) which saves about 20KByte of code as
      well.

    - Kirill  Smelkov provided  patches to make  src/raster/ftraster.c
      compile stand-alone again.

svn path=/trunk/; revision=16675
2005-07-21 04:38:26 +00:00
Alex Ionescu
e4549de4a3 - Fix "cd" usage when the initial directory is a directory right on top of the root drive. (Brandon Turner)
svn path=/trunk/; revision=16674
2005-07-21 03:26:42 +00:00
Thomas Bluemel
f479dd02aa - Removed the Rtlp* string functions from the shared rtl library since they don't make sense in umode
- Moved RtlpCreateUnicodeString to ntoskrnl for now, it however is depreciated but still used in various places
- Added RtlpAllocateMemory and RtlpFreeMemory for rtl memory allocations (from paged pool in ntoskrnl and from the process heap in ntdll) that replace the ExAllocatePool* and ExFreePool implementations in ntdll

svn path=/trunk/; revision=16673
2005-07-20 23:35:59 +00:00
Thomas Bluemel
7b6225c3b5 fixed kdbg build
svn path=/trunk/; revision=16672
2005-07-20 21:38:17 +00:00
Magnus Olsen
2e13f4640d fix more cmd goto bugs. found labels bugs, and search label bugs, param bugs. now it should work fine
svn path=/trunk/; revision=16671
2005-07-20 19:44:47 +00:00
Magnus Olsen
368f39faad fix another bug in goto it is internel label :eof jump to end of the bat file
svn path=/trunk/; revision=16670
2005-07-20 18:43:01 +00:00
Magnus Olsen
4365851492 fix one bug with cmd goto so WBAT will work bit more now. thx gasmann to report it.
svn path=/trunk/; revision=16668
2005-07-20 17:06:53 +00:00
Alex Ionescu
8e5b438930 - Final fix.
svn path=/trunk/; revision=16667
2005-07-20 15:56:24 +00:00
Alex Ionescu
9b3250ce17 - Fix one more breakage (funny, the thing built without it for me?!)
svn path=/trunk/; revision=16666
2005-07-20 15:21:52 +00:00
Alex Ionescu
3134614de5 - Fix afd build for real (sorry...rbuild...)
svn path=/trunk/; revision=16665
2005-07-20 14:46:24 +00:00
Alex Ionescu
7ba312f725 - Fix AFD Build.
svn path=/trunk/; revision=16664
2005-07-20 14:45:33 +00:00
Alex Ionescu
0e0a951483 Fix build; sorry, I was waiting for Filip.
svn path=/trunk/; revision=16663
2005-07-20 14:40:20 +00:00
Filip Navara
0be32fc8d7 Build fixes.
svn path=/trunk/; revision=16662
2005-07-20 07:48:10 +00:00
Filip Navara
5fa260d21f Get rid of windows.h include in win32k. Fixes bug #666.
svn path=/trunk/; revision=16661
2005-07-20 07:27:09 +00:00
Alex Ionescu
692af5f653 Dmitry Philippov <shedon@mail.ru>:
- Implemented FindFirstFileExW() and have removed InternalFindFirstFile() in /lib/kernel32/file/find.c, now FindFirstFileA (), FindFirstFileExA () and FindFirstFileW called FindFirstFileExW ()

NOTE: Filip has asked revision "16661" (the next one) to be done by him... sorry if this sounds silly, but please respect his wish :)

svn path=/trunk/; revision=16660
2005-07-20 04:43:12 +00:00
Alex Ionescu
e8ebef770f - Move rosdhcp_public.h to dhcp library include directory.
svn path=/trunk/; revision=16659
2005-07-20 03:50:50 +00:00
Alex Ionescu
86f7b177e0 - Deleted ddk folder
- Moved afd headers to driver include directory

svn path=/trunk/; revision=16658
2005-07-20 03:43:20 +00:00
Alex Ionescu
0452118dc0 - Created include/libs and moved all library headers there.
- Created include/drivers and moved driver headers there.
 - Brought back core.h as diskdump.h, and re-enabled diskdump...it seems even though I was told it doesn't work, it's still very much used.

svn path=/trunk/; revision=16657
2005-07-20 03:42:05 +00:00
Alex Ionescu
f7270f23c4 - Build cdfs, ntfs, vfatfs with PCH
- Remove core.h and disable diskdump driver (never worked, was told it's an abandonned, obsolete driver and I tend to agree.)
 - Rename ROS ntifs.h to ccros.h and moved to root include directory (where all the "temporary" includes are for now).
 - Moved ROS class2.h to drivers/storage/include, per my own and other's recommendation, to make it clear that it's a ros-intenral file only useful for low-level storage drivers (no 3rd party driver needs this, which is why MS doesn't export it).

svn path=/trunk/; revision=16656
2005-07-20 02:52:52 +00:00
Alex Ionescu
832b1aa035 - Move asm.h to NDK.
svn path=/trunk/; revision=16655
2005-07-20 00:33:06 +00:00
Magnus Olsen
3de4927bd6 fixing bug copy file c: by Brandon Turner
svn path=/trunk/; revision=16654
2005-07-19 23:44:22 +00:00
Magnus Olsen
f48a391bbd Make CMD rember startpath when you change from start drive to another drive.
svn path=/trunk/; revision=16653
2005-07-19 23:36:59 +00:00
Magnus Olsen
7928f042c0 Fix some pipe and revirt one erly change as harumt sugest. and add alot errorlevel most command handle the errorlevel right but it is alot work todo
svn path=/trunk/; revision=16652
2005-07-19 23:25:50 +00:00
Magnus Olsen
6e7d8b2e8d add ConErrMessage to deal with error msg and ConOutMessage for other msg. Copy error msg are always pipe with ConOut and CD error msg with ConErr. Thx harmut that remmid me about it. All error msg need to check if they goes with ConErr or ConOut
svn path=/trunk/; revision=16651
2005-07-19 22:48:35 +00:00
Alex Ionescu
73e69c9d9e - 4th out of 5 patch part of ROSRTL removal. This touches fibers:
* Support SxS when available (add new fiber member for this as well).
        * Support FLS when available.
        * Added new Fiber Members for new features in XP/2003 (GuaranteedStackBytes and FlsData)
        * Support FPU State Restore/Save in switch code.
        * Use new common stack/context initialization routines instead of ROSRTL.
        * Change Fiber structure to use CONTEXT directly in order to speed up and generalize
          context creation.
        * Fix BaseFiberStartup to send right parameters.

Note: not yet fully tested with fibertest, I will do this later today and fix any bugs.

svn path=/trunk/; revision=16650
2005-07-19 21:04:19 +00:00
Alex Ionescu
22ef1b4558 - Update ASM header file with more offsets.
svn path=/trunk/; revision=16649
2005-07-19 20:56:38 +00:00
Alex Ionescu
f25f86cc02 - Fix LDR_DATA_TABLE_ENTRY definition.
svn path=/trunk/; revision=16648
2005-07-19 20:55:13 +00:00
Casper Hornstrup
4a454cb7d6 Generate RPC interface headers in intermediate directory
svn path=/trunk/; revision=16647
2005-07-19 18:46:13 +00:00
Magnus Olsen
b44c46dccd Fix all bugs in cmd commands cd, make it rember the last directory for each drive. make c: working, make cd f f working. We can not found any more bugs cd rewriting was done by BrandonTurner and me, Brandon rewrite cmd_chdir and I add two functions that we will use for cd and other commands to get and set current drive path. The /D are also implement in CD
svn path=/trunk/; revision=16646
2005-07-19 18:15:32 +00:00
Eric Kohl
5b843df690 - Implement CM_Get_Depth[_Ex] and CM_Get_DevNode_Status[_Ex].
- Add dummy code for CM_Get_Child_Ex, CM_Get_Parent_Ex and CM_Get_Sibling_Ex. WIDL doesn't support this yet.

svn path=/trunk/; revision=16645
2005-07-19 15:57:30 +00:00
Aleksey Bragin
4e94521b41 usb stack "upgrade", fixes issues with timing, host controller reset, new devices discovery, other small things (better to see diff :) ).
svn path=/trunk/; revision=16644
2005-07-19 14:11:53 +00:00
Aleksey Bragin
1e4f24a1e8 usbcore "upgrade", fixes issues with timing, host controller reset, new devices discovery, other small things (better to see diff :) ).
svn path=/trunk/; revision=16643
2005-07-19 14:06:19 +00:00
Aleksey Bragin
52d68cf938 Implemented needed DMA functions (pool alloc/free, create/destroy, map/unmap single), manipulations with timers (schedule_timeout, schedule_wait).
svn path=/trunk/; revision=16642
2005-07-19 13:19:04 +00:00
James Tabor
8e78ac6a62 Implement GdiGetCharDimensions by Robert Shearman rob@codeweavers.com.
svn path=/trunk/; revision=16641
2005-07-19 11:18:40 +00:00
James Tabor
6f5624c2a4 Fixup UnrealizeObject so it can return the correct state for a Brush Object.
svn path=/trunk/; revision=16640
2005-07-19 03:13:11 +00:00
Magnus Olsen
a6fd14c5c8 Cd does rember the cd c:\gcc and you can do c:
and it jump to c:\gcc not tested in reactos yet. but cd have other bugs that need to be fix. 

svn path=/trunk/; revision=16639
2005-07-19 01:55:16 +00:00
Magnus Olsen
3925d142b0 make GetRootPath bit smarter
svn path=/trunk/; revision=16638
2005-07-19 01:36:54 +00:00
Magnus Olsen
758d835b13 make GetRootPath bit faster if it does not get a drive name with :
svn path=/trunk/; revision=16637
2005-07-18 23:04:39 +00:00
Magnus Olsen
07a3a7ec8e add a new interal function call GetRootPath(TCHAR *InPath,TCHAR *OutPath,INT size) it get the a driver current path without change the current driver directory, it is not in use yet, prep for copy, cd, rm, and all other commands.
svn path=/trunk/; revision=16636
2005-07-18 22:44:13 +00:00
Alex Ionescu
ce7fb8c1b9 - Fix nasty APC delivery bug (in case a Kernel-Mode Special APC still returned with a Normal Routine, the Normal Routine was called with incorrect values (Special Routines take PVOID* arguments, while Normal Routines do not!))
- Remove APC from list before setting it to non-inserted.
 - Do proper thread termination piggybacking; terminate threads in user-mode as Hartmut correctly fixed.

svn path=/trunk/; revision=16635
2005-07-18 19:50:23 +00:00
Hartmut Birr
269fab698e Removed the message also from the senders queue (in MsqCleanupMessageQueue).
svn path=/trunk/; revision=16634
2005-07-18 15:05:58 +00:00
Hervé Poussineau
b9edb4f6e3 Forward more exports to setupapi.dll
svn path=/trunk/; revision=16633
2005-07-18 14:10:56 +00:00
Hervé Poussineau
08711eda61 Move serial ports and mice classes parameters to their own .inf files. They would be regenerated during 2nd stage setup
svn path=/trunk/; revision=16632
2005-07-18 11:57:16 +00:00
Hervé Poussineau
02b9843370 Implement SetupDiGetDeviceRegistryPropertyA/W
Change the way devices are enumerated in SetupDiGetClassDevsExW. Now, it enumerates subkeys of HKLM\SYSTEM\CurrentControlSet\Enum instead of HLKM\SYSTEM\CurrentControlSet\Control\Class ones.
Free the temp buffer in SetupDiGetDeviceRegistryPropertyA only when it is no more usefull
Replace RegOpenKeyEx by RegOpenKeyExW

svn path=/trunk/; revision=16631
2005-07-18 07:17:53 +00:00
James Tabor
d09f528ad2 Implement ShowOwnedPopups and ArrangeIconicWindows. Based on Wine. More work is needed on both.
svn path=/trunk/; revision=16630
2005-07-18 03:13:11 +00:00
James Tabor
35b93a79d6 Implement ShowOwnedPopups and ArrangeIconicWindows. Based on Wine.
svn path=/trunk/; revision=16629
2005-07-18 03:12:01 +00:00
Thomas Bluemel
0825640a24 fixed signed/unsigned comparison warning
svn path=/trunk/; revision=16628
2005-07-17 19:20:12 +00:00
Hartmut Birr
53f97f1bee If the user mode is intercepted by an interrupt, we must deliver user mode apc's.
svn path=/trunk/; revision=16627
2005-07-17 18:36:01 +00:00
Hartmut Birr
2adf26048d - PsKillMostProcesses must be running in the context of the system process.
- The thread terminating apc is a special user mode apc.

svn path=/trunk/; revision=16626
2005-07-17 18:34:23 +00:00
Hartmut Birr
d3493295ab Request the APC_INTERRUPT for the correct processor on smp machines.
svn path=/trunk/; revision=16625
2005-07-17 18:27:46 +00:00
Hartmut Birr
d40d2d7c83 Initialized SetMember as mask of the current processor.
svn path=/trunk/; revision=16624
2005-07-17 18:11:08 +00:00
Hartmut Birr
08e09be28a Changed the type of SetMember within KPRCB structure.
svn path=/trunk/; revision=16623
2005-07-17 18:08:19 +00:00
Hervé Poussineau
6d83f83840 Implement SetupDiGetDeviceInterfaceDetailA/W
svn path=/trunk/; revision=16622
2005-07-17 15:57:41 +00:00
Casper Hornstrup
ad59c91e1b Clean referenced object libraries when cleaning a module
svn path=/trunk/; revision=16621
2005-07-17 15:10:03 +00:00
Hervé Poussineau
d3d7a7f34b Return CR_FAILURE when the function is not implemented
Call the right *_Ex function in CM_Get_Child and CM_Get_Parent

svn path=/trunk/; revision=16620
2005-07-17 14:09:57 +00:00
Hervé Poussineau
28cb187427 Add registry key for PNP root device
svn path=/trunk/; revision=16619
2005-07-17 13:56:22 +00:00
Martin Fuchs
b635d34a4f fix build of ctm
svn path=/trunk/; revision=16618
2005-07-17 13:14:44 +00:00
Martin Fuchs
9c93090a1f replace TIME struct by LARGE_INTEGER
svn path=/trunk/; revision=16617
2005-07-17 12:51:28 +00:00
Martin Fuchs
2a0636a4ef fix ndk header usage
svn path=/trunk/; revision=16616
2005-07-17 12:50:56 +00:00
Martin Fuchs
85da1524b5 fix argc type
svn path=/trunk/; revision=16615
2005-07-17 12:31:31 +00:00
Martin Fuchs
2210ddb826 replace old <defines.h> by <windows.h>
svn path=/trunk/; revision=16614
2005-07-17 12:31:16 +00:00
Martin Fuchs
583ed2bdab replace old <defines.h> by <windows.h>
svn path=/trunk/; revision=16613
2005-07-17 12:30:09 +00:00
James Tabor
56d1785ca5 Implemented NtUser-GetMenuItemRect.
svn path=/trunk/; revision=16612
2005-07-17 12:26:24 +00:00
Filip Navara
612346a8b7 DPC stands for Deferred Procedure Call.
svn path=/trunk/; revision=16611
2005-07-17 12:24:15 +00:00
Casper Hornstrup
07e1646825 Avoid GNU make warnings
svn path=/trunk/; revision=16610
2005-07-17 11:15:55 +00:00
Casper Hornstrup
a04a10667a Add missing directory tag
svn path=/trunk/; revision=16609
2005-07-17 11:07:14 +00:00
Casper Hornstrup
d4ff3d81a2 Prepare cmd for testing
svn path=/trunk/; revision=16608
2005-07-17 10:57:38 +00:00
Martin Fuchs
92106004ec add explorer-ro.rc
svn path=/trunk/; revision=16607
2005-07-17 10:40:43 +00:00
Casper Hornstrup
acbcf1c29a Fix building of tests
svn path=/trunk/; revision=16605
2005-07-17 10:20:18 +00:00
Martin Fuchs
49c3197c28 remove winfile - it's superseded by winefile.
svn path=/trunk/; revision=16604
2005-07-17 09:56:38 +00:00
Eric Kohl
108c748343 - Implement CM_Locate_DevNode_ExW, CM_Get_Device_ID_Size[_Ex] and CM_Get_Device_ID[_Ex]W.
- Add flags for CM_Get_Global_State[_Ex].

svn path=/trunk/; revision=16603
2005-07-17 09:43:54 +00:00
Hartmut Birr
b4d21f4107 Fixed the determining of the file from the output redirection.
svn path=/trunk/; revision=16602
2005-07-17 07:02:20 +00:00
Magnus Olsen
14733418a7 /D /Z are implement in ros cmd copy by BrandonTurner but reactos CopyFile and CopyFileEx does not support it yet, for /D are COPY_FILE_ALLOW_DECRYPTED_DESTNATION for decypt the file when it copy to dest and /Z are COPY_FILE_RESTARTABLE for network. so it is working in windows
svn path=/trunk/; revision=16601
2005-07-17 00:44:33 +00:00
Magnus Olsen
0f1a1d9269 add CopyFileEx flags #define COPY_FILE_ALLOW_DECRYPTED_DESTINATION, COPY_FILE_FAIL_IF_EXISTS, COPY_FILE_RESTARTABLE, COPY_FILE_OPEN_SOURCE_FOR_WRITE
svn path=/trunk/; revision=16600
2005-07-16 23:44:16 +00:00
Eric Kohl
9ebf08eac5 - For bugs for in-string parameters.
- Implement out-string parameters (untested).

svn path=/trunk/; revision=16599
2005-07-16 23:21:36 +00:00
Hartmut Birr
b0c939bf13 Used the kernel base address from the loader structure instead MmSystemRangeStart.
MmSystemRangeStart isn't the base address with the 3GB switch.

svn path=/trunk/; revision=16597
2005-07-16 13:01:18 +00:00
Hartmut Birr
ada13b04e0 Replaced KERNEL_BASE by MmSystemRangeStart.
svn path=/trunk/; revision=16596
2005-07-16 12:35:34 +00:00
Magnus Olsen
5ec1eff5db crop mf logo to 30x280 and it showing right rember do not design higher that 280 on the startmenu logo change.
svn path=/trunk/; revision=16595
2005-07-16 12:18:16 +00:00
Jens Collin
431d4a6295 GetMenuStringA and GetMenuStringW inverted the MF_BYPOSITION parameter. Buffers were incorrectly copied in and wrong size returned in GetMenuItemInfoA ansi-structures.
GetMenuString now works the same on both windows and ROS.

svn path=/trunk/; revision=16594
2005-07-16 11:45:28 +00:00
Maarten Bosma
5638b3729f HUMA2000: Spanish translation
svn path=/trunk/; revision=16593
2005-07-16 10:23:10 +00:00
Hartmut Birr
6088c647a3 - Fixed the size of the hyperspace area (thanks to Filip Navara).
- Enabled Pae mode in freeldr if it is requested.

svn path=/trunk/; revision=16592
2005-07-16 09:01:07 +00:00
Magnus Olsen
6d92ae56c6 part1 of move bug from a volume to another have been solve, the part two are in Reactos MoveFileEx
svn path=/trunk/; revision=16591
2005-07-15 19:15:59 +00:00
Magnus Olsen
eb4fb35571 I should not write code when it is hot outside
clean up a if statement for realloc

svn path=/trunk/; revision=16590
2005-07-15 18:38:01 +00:00
Magnus Olsen
6850597254 in cress COPYCMD param search speed before w3seek does it
svn path=/trunk/; revision=16589
2005-07-15 18:31:42 +00:00
Magnus Olsen
8aa7fc3fb8 last try to fix NULL bug
svn path=/trunk/; revision=16588
2005-07-15 18:25:03 +00:00
Magnus Olsen
8b10660c85 last bugfix did forget use tchar * 512 in malloc I did only use 512 in malloc
svn path=/trunk/; revision=16587
2005-07-15 18:21:17 +00:00
Magnus Olsen
486636c37b did forget check malloc and realloc was NULL and set size to zero. thx w3seek that did see this mistake
svn path=/trunk/; revision=16586
2005-07-15 18:18:40 +00:00
Magnus Olsen
023ebef222 implement $s
svn path=/trunk/; revision=16585
2005-07-15 17:46:26 +00:00
Magnus Olsen
199110e78f bug fix $t so it write out time instead for "current time is xxxxxxx" not it write the time. bug fix $h so it did jump back and erase the char that was there before.
svn path=/trunk/; revision=16584
2005-07-15 17:31:12 +00:00
Magnus Olsen
81517874a0 crop the height of mf new logo so it show right
svn path=/trunk/; revision=16583
2005-07-15 15:31:14 +00:00
Hartmut Birr
050b5c1946 Revert my last commit (r16578).
svn path=/trunk/; revision=16582
2005-07-15 15:30:23 +00:00
Magnus Olsen
9f9dfd53cf revert back startmenu.cpp the change are not complite for mf new logo
svn path=/trunk/; revision=16581
2005-07-15 15:25:34 +00:00
Magnus Olsen
03a11e092f update swedish .rc and rename it from sw to sv, remove the german part in swedish rc. all swedish rc should have sv,
svn path=/trunk/; revision=16580
2005-07-15 15:22:26 +00:00
Magnus Olsen
97d546c77a Forget set some error level and some msg that should have goto ConOut not to ConErr so pipe are working with thuse msg
svn path=/trunk/; revision=16579
2005-07-15 14:50:46 +00:00
Hartmut Birr
bde6eea1e8 Fixed a test condition in IntWaitMessage.
svn path=/trunk/; revision=16578
2005-07-15 14:40:47 +00:00
Hartmut Birr
dfaed2eb99 Returned STATUS_NOT_IMPLEMENTED for requests other than read or write.
svn path=/trunk/; revision=16577
2005-07-15 14:29:58 +00:00
Magnus Olsen
e75662b821 fix a bug from me in COPYCMD check code it was two /V
it should only have been one /N = short file name (dos 8.3 file mname not /S) 

svn path=/trunk/; revision=16576
2005-07-15 14:18:45 +00:00
Magnus Olsen
84dc5b02f3 fix errorlevel for copy. left to do is /D = copy encrypte file and decypte to destinations (NT3.51) /S = make destfile name 8.3 compatible (NT3.51) /Z = restart copy if it fails
svn path=/trunk/; revision=16575
2005-07-15 14:12:48 +00:00
Magnus Olsen
2e307cf29e Add environment variable COPYCMD to copy
svn path=/trunk/; revision=16574
2005-07-15 13:51:38 +00:00
James Tabor
cc3f2972eb Fix up WM_ENABLE ScrollBarWndProc. Looks like we can disable and enable SB Ctrls.
svn path=/trunk/; revision=16573
2005-07-15 11:46:38 +00:00
James Tabor
2aed25b015 Fixed wParam in WM_ENABLE ScrollBarWndProc.
svn path=/trunk/; revision=16572
2005-07-15 02:16:12 +00:00
James Tabor
3c13baae03 Fixing WM_ENABLE ScrollBarWndProc. Tested it with 7-Zip, AbiWord, RegEdit and Winefile, all seem not to use it. Please test this.
svn path=/trunk/; revision=16571
2005-07-15 01:42:22 +00:00
Thomas Bluemel
a8f77a38bd don't allow changing the allow and deny checkbox state to checked at the same time
svn path=/trunk/; revision=16569
2005-07-14 21:57:57 +00:00
Hartmut Birr
f0300f5044 Mark the DispatchingListEntry as removed (in MsqSendMessage).
svn path=/trunk/; revision=16568
2005-07-14 21:07:14 +00:00
Magnus Olsen
2032b01e66 fix the second bug for 1>text.txt pipe
svn path=/trunk/; revision=16567
2005-07-14 20:51:39 +00:00
Magnus Olsen
3a00c096a3 fix echo osd 1>text: bug now it should pipe instead it is printing text out text on the screen. need to found the second bug now. but now this pipe are implement.
svn path=/trunk/; revision=16566
2005-07-14 20:26:37 +00:00
Magnus Olsen
98d6ba9ebf std_output does handle the : as ms does at pipe and we have also extend it to handle >test.txt: that is not vaild on ms but it should need more code to handle the : as ms does. we can call it reactos extend at cmd
svn path=/trunk/; revision=16564
2005-07-14 19:18:37 +00:00
Magnus Olsen
a292f28ef5 Change some error msg from ConErr to ConOut for they are being pipe so the behover are equal with ms windows cmd
svn path=/trunk/; revision=16563
2005-07-14 18:39:07 +00:00
Magnus Olsen
3aae85b431 Fix a weird bug in piping in some case if you pipe to no exists >pipe: then to a exists >pipe: it did make cmd crash for createfile only SetLastErrror when it fails. and the old one was in the loop. to solv it is to rest the GetLastError code before it is call.
svn path=/trunk/; revision=16562
2005-07-14 18:16:57 +00:00
Magnus Olsen
521a302ab8 Brandon Turner turnerb7@msu.edu Rewrite to clean up copy and support wildcard. and alot of other small bugfix, like does not crash when a file does not exists.
svn path=/trunk/; revision=16561
2005-07-14 14:51:35 +00:00
James Tabor
ad6a045f5b Typo fix. I was thinking oct not dec.
svn path=/trunk/; revision=16560
2005-07-14 00:27:53 +00:00
James Tabor
be123f5a26 Implemented VkKeyScan, GetKeyboardTypeand, GetKeyboardLayout and some Wine ports.
svn path=/trunk/; revision=16559
2005-07-13 23:22:20 +00:00
James Tabor
f84f0b7a10 Implemented VkKeyScan, GetKeyboardTypeand GetKeyboardLayout.
svn path=/trunk/; revision=16558
2005-07-13 23:19:59 +00:00
Hartmut Birr
537bcb48fa Fixed the allocation of the buffer for the environment variable in ProcessInput.
svn path=/trunk/; revision=16557
2005-07-13 17:59:37 +00:00
Hartmut Birr
7a0a377edd Fixed a bug in IsConsoleHandle which was introduced by r16540.
svn path=/trunk/; revision=16556
2005-07-13 17:32:39 +00:00
Thomas Bluemel
d31647b31f only NULL-terminate the string in GetEnvironmentVariableW if the buffer size is greater than 0. Thanks to Joseph Galbraith for the hint
svn path=/trunk/; revision=16555
2005-07-13 16:36:24 +00:00
Alex Ionescu
698dee2b87 Fix macro to be optimized out, thanks to Filip
svn path=/trunk/; revision=16554
2005-07-13 15:46:59 +00:00
Thomas Bluemel
a56f2840b3 handle memory allocation errors in GetEnvironmentVariable() and ensure the string is always null-terminated
svn path=/trunk/; revision=16553
2005-07-13 15:09:52 +00:00
Art Yerkes
90be5e4d9b stop exporting MmCopyFromCaller and kin and make a local version in the
last place we use it, now based on SEH.
we'll remove the copy from caller hack from ntoskrnl soon.

svn path=/trunk/; revision=16552
2005-07-13 08:48:49 +00:00
Alex Ionescu
5f9eec4d04 fix bizarre build error
svn path=/trunk/; revision=16551
2005-07-13 02:45:53 +00:00
Alex Ionescu
2c8f96ecf4 Silence more warnings. Patch by Waxdragon.
svn path=/trunk/; revision=16550
2005-07-13 02:02:08 +00:00
Alex Ionescu
c855fc1edb Expand the wine debug macros in all cases. the actual code will get optimized away, but the variables will appear in use. removes about 100-150 warnings. also fix hidden build breakages when the macros are actually used. thanks to art
svn path=/trunk/; revision=16549
2005-07-13 01:41:13 +00:00
Alex Ionescu
c01f0050df Fix executing applications. Sorry for the delay, this was like finding a needle in a hay stack. Gotta love splitting patches..
svn path=/trunk/; revision=16548
2005-07-13 00:11:11 +00:00
Casper Hornstrup
6f84809a47 Add copyright notices and GPL headers to rbuild
svn path=/trunk/; revision=16547
2005-07-12 16:47:34 +00:00
Casper Hornstrup
b8be54888b Have nci output files depend on input files
svn path=/trunk/; revision=16546
2005-07-12 16:11:30 +00:00
Casper Hornstrup
1f9b723f25 Install freeloader installer.
svn path=/trunk/; revision=16545
2005-07-12 15:04:17 +00:00
Eric Kohl
5e61398fc3 Add CM_Get_Global_State and CM_Get_Global_State_Ex prototypes.
svn path=/trunk/; revision=16544
2005-07-12 12:29:25 +00:00
Alex Ionescu
358a2167ab Part three of patch...
- Created utils.c for the following new functions:
        * BasepCreateStack - Creates a stack for a Thread or Fiber
        * BasepInitializeContext - Initializes the Context for a Process, a Thread, or a Fiber
        * BasepConvertObjectAttributes - Creates a OBJECT_ATTRIBUTES structure based on Win32
                                         lpSecurityAttributes and name.
        * BasepFreestack - Frees the stack created in case of a failure inside code using it.
        * BasepMapFile - Converts a Win32 Path to NT Path and maps a file into a section.
        * Base 8-bit String conversion functions - Use new, more efficient way to select
          between OEM/ANSI strings, based on MSDN Article by Matt Pietrek. Other code needs
          to be chand to use them.
Also added the new ASM for the startup thunks. All of this is still unused and only being committed to simply the diff output. Credits go to Matt Pietrek and his excellent MSDN article for the 8-bit conversion functions and implementaion details.

svn path=/trunk/; revision=16543
2005-07-12 05:00:33 +00:00
Alex Ionescu
e6523bb71e Second part of patch, implements the new RTL functions which will be used (not used by kernel yet).
- RtlCreateUserProcess:
        * Created RtlpInitEnvironment to manage Environment Block creation. Rougly based on
          old KlInitPeb code but with some optimizations.
        * Don't ignore Process Security Descriptor if one was specified.
        * Don't ignore ZeroBits, get correct entrypoint, and don't assume PEB address.
        * Don't close handle of section before closing process handle on failure.
        * Support new undocumented flag which pre-allocates 1MB of memory for Native Processes
        * FIXME: Hande duplication should be done, but wasn't and still isn't.
    
    - RtlpCreateUserStack:
        * New function to create a stack for a Thread, similar to BasepCreateStack but
          has some differences related to StackCommit/StackReserve.
        * Also create Guard Page
        
    - RtlpFreeUserStack:
        * Undoes what the function above does, in case of failure in code using it.
        
    - RtlCreateUserThread:
        * Use the new functions instead of rosrtl.
        
    - RtlInitializeContext:
        * New function similar to BasepInitializeContext but;
            > Uses a single entrypoint, not many possible thunks like Kernel32 (no need)
            > The starting EFLAGS is Interrupts Enabled, not IOPL 3.
            > We don't initialize the same Context Flags
            > The initial context registers are different
            
    - RtlFreeUserThreadStack
        * Don't assume the TEB address
          
    - RtlExitUserThread
        * Remove deprecated stack-switching semantics and use new TEB flag to tell the Kernel
          to deallocate the stack for us.

svn path=/trunk/; revision=16542
2005-07-12 04:41:41 +00:00
James Tabor
36a1230e2b Start integrating and implementing key board functions. More Wine porting with ROS.
svn path=/trunk/; revision=16541
2005-07-12 02:45:33 +00:00
Alex Ionescu
a10ed009b7 Partial patch of larger rosrtl removal patch. This one merely is a structure fix patch, and renames/corrects RTL_USER_PROCESS_INFORMATION (which had the totally wrong names) as well as updates the TEB to the latest version. It also fixes SECTION_IMAGE_INFORMATION to have the right format and names. Also, some callers of CreateProcessW are modified to not send a constant string as lpCommandLine (this was illegal and will crash on Windows/my patch). INITIAL_TEB was also renamed to the more correct fields, although they won't make sense with the current rosrtl/rtl implementation, the names will only make sense with the next patch. Finally NtTerminateThread was fixed to support sending NULL as handle, and PspExitThread was updated to work with the new FreestackOnExit flag, both of which will be used in the next patch.
svn path=/trunk/; revision=16540
2005-07-12 01:56:14 +00:00
Filip Navara
e36f90a9f9 Move Interlocked* routines from ROSRTL to separate INTRLCK library since ROSRTL is going to be removed.
svn path=/trunk/; revision=16539
2005-07-11 23:32:55 +00:00
Thomas Bluemel
fcc95c66a8 return the length of the string excluding the null-termination character on success in GetEnvironmentVariable(). Thanks to Hartmut.
svn path=/trunk/; revision=16536
2005-07-11 20:30:33 +00:00
Hartmut Birr
9b991b83fd Check for a valid console handle in SetConsoleMode.
svn path=/trunk/; revision=16535
2005-07-11 18:22:53 +00:00
Alex Ionescu
eb4f7c8b2f IPConfig Rewrite (Tim Jobling <tjob800@yahoo.co.uk>)
*  Relicense to GPL. 
    *  Display NodeType with meaningfull Human readable names.
    *  Exclusively use TCHAR strings.
    *  Display Physical Address, DHCP enabled state, IP Addresses/Netmasks,
    *  Default Gateway, DHCP server and DHCP Lease times.
    *  Parse command line options.
    *  Default to only showing the IP/SM/DG is no options specified
    *  Handel option: /All and /?
    *  Display message about all unimplemented options.
    *  Changed C++ style commenting to C style

svn path=/trunk/; revision=16534
2005-07-11 17:55:15 +00:00
Gé van Geldorp
34fd8c7135 Sebastian Gasiorek <zebasoftis@gmail.com>
Polish resource files

svn path=/trunk/; revision=16533
2005-07-11 07:51:09 +00:00
James Tabor
c81ba78f7b Connect UnrealizeObject and test debug prints. I assume arg count is one not two. If wrong please correct me.
svn path=/trunk/; revision=16532
2005-07-11 04:56:04 +00:00
James Tabor
6a38a2f69d Fix error return for WIN_ListChildren.
svn path=/trunk/; revision=16531
2005-07-11 02:43:24 +00:00
Magnus Olsen
5c73d34569 forget clean up after me
svn path=/trunk/; revision=16530
2005-07-10 22:23:00 +00:00
Magnus Olsen
58d41e3c76 second try, thx w3seek found out it should be charterer not byte
svn path=/trunk/; revision=16529
2005-07-10 22:19:57 +00:00
Magnus Olsen
e43573196c The return size calculation's of GetEnvironmentVariable string was wrong. Thx to <Bizzy_D> to find out cd %windir% did not work. Now it will
svn path=/trunk/; revision=16528
2005-07-10 22:12:07 +00:00
Gé van Geldorp
67af25e720 i386DX . <i386dx@hotmail.com>
Belgian (point/Flemish) keyboard layout

svn path=/trunk/; revision=16527
2005-07-10 22:05:48 +00:00
Magnus Olsen
fe2f78c54c quick dirty hack getting our copy working with 1>null by me
so we can create reactos iso on ros. bug reported by harteex and Brandon Turner, thanks to Brandon to hunt down where the bug was. 

svn path=/trunk/; revision=16526
2005-07-10 21:26:51 +00:00
Eric Kohl
a5b363cd94 - Implement CM_Get_Global_State/CM_Get_Global_State_Ex.
- All RPC-Calls to umpnpmgr return CONFIGRET.

svn path=/trunk/; revision=16525
2005-07-10 11:49:10 +00:00
Eric Kohl
de63015392 Fix a string length calculation bug in StringTableDuplicate.
svn path=/trunk/; revision=16524
2005-07-09 15:22:07 +00:00
Aleksey Bragin
122bcd196f Add dependence from pnp_client also, since in fact it uses it (includes pnp_c.h). It worked before only because lib/setupapi depends on pnp_c, and it's build earlier than umpnpmgr.
svn path=/trunk/; revision=16523
2005-07-09 13:23:05 +00:00
Thomas Bluemel
97679e7210 fixed the prototypes of GetConsoleAlias, GetConsoleAliasExes and GetConsoleAliasesLength
svn path=/trunk/; revision=16522
2005-07-09 10:31:30 +00:00
James Tabor
c0fb7448b1 Implement MDICascade, MDITile and WIN_ListChildren. This will help Winefile cascade and tile windows. WIN_ListChildren is tmp located here in mdi.c for now.
svn path=/trunk/; revision=16521
2005-07-09 08:54:43 +00:00
Casper Hornstrup
6c73106dfd Don't rebuild the module if a library is changed. Relinking the module is enough.
svn path=/trunk/; revision=16520
2005-07-09 07:50:48 +00:00
James Tabor
5dd6792d1d Fix masking.
svn path=/trunk/; revision=16519
2005-07-09 05:21:10 +00:00
James Tabor
ff7e7c8ae6 Kill debug print out.
svn path=/trunk/; revision=16518
2005-07-09 04:54:01 +00:00
James Tabor
7022204505 Implement ModifyMenu A & W.
svn path=/trunk/; revision=16517
2005-07-09 04:23:34 +00:00
James Tabor
b2bf468fad Implement GetMenuString A & W. Not fully tested.
svn path=/trunk/; revision=16516
2005-07-09 04:19:35 +00:00
James Tabor
5e3cc7bc94 Implement CheckMenuRadioItem. Not fully tested.
svn path=/trunk/; revision=16515
2005-07-09 04:15:44 +00:00
James Tabor
6b36fb6848 Implement DrawMenuBar.
svn path=/trunk/; revision=16514
2005-07-09 04:11:36 +00:00
Casper Hornstrup
91269f987b Check automatic dependencies of referenced object library modules on make <module>_depends
svn path=/trunk/; revision=16513
2005-07-08 19:55:30 +00:00
Thomas Bluemel
876fc32e53 Fixed enumerating the drive strings in SetupCreateDiskSpaceListW
svn path=/trunk/; revision=16512
2005-07-08 19:51:37 +00:00
Thomas Bluemel
d556da508d allocate enough memory for strings, lstrlenW returns the length of the string in characters, not bytes.
svn path=/trunk/; revision=16511
2005-07-08 19:21:28 +00:00
KJK::Hyperion
4c9e39ee83 PE loader: corrected an assertion (fixes bug reported by GvG), added a sanity check, return STATUS_INVALID_IMAGE_PROTECT in case of unrecognized PE signature (to match Windows behavior), removed evil STATUS_UNSUCCESSFUL, corrected successful return code
Memory manager: return STATUS_INVALID_IMAGE_NOT_MZ when no loader accepts the format (to match Windows behavior)

svn path=/trunk/; revision=16510
2005-07-08 16:37:07 +00:00
James Tabor
622c4d86e9 Implement NtUserGetAsyncKeyState and support for TrackMouseEvent.
svn path=/trunk/; revision=16509
2005-07-08 12:16:47 +00:00
James Tabor
6c4cbed9a2 Implement TrackMouseEvent.
svn path=/trunk/; revision=16508
2005-07-08 12:15:07 +00:00
James Tabor
e6ce20818e Add defines for TrackMouseEvent.
svn path=/trunk/; revision=16507
2005-07-08 12:13:23 +00:00
Gé van Geldorp
a340c27ec1 zebasoftis <zebasoftis@gmail.com>:
Polish Resource File for setupapi

svn path=/trunk/; revision=16506
2005-07-08 09:01:23 +00:00
Gé van Geldorp
d3558a7c23 zebasoftis <zebasoftis@gmail.com>:
Polish Resource File for user32

svn path=/trunk/; revision=16505
2005-07-08 08:56:07 +00:00
Gé van Geldorp
8895954185 zebasoftis <zebasoftis@gmail.com>
Polish Resource File for desk.cpl

svn path=/trunk/; revision=16504
2005-07-08 08:50:46 +00:00
James Tabor
953b49324b Kill debug messages.
svn path=/trunk/; revision=16503
2005-07-08 02:06:33 +00:00
James Tabor
31c9627540 Add MIIM_BITMAP & MNS_CHECKORBMP support in menu. Based on Wine port.
svn path=/trunk/; revision=16502
2005-07-07 23:29:53 +00:00
Hervé Poussineau
74346861b0 Minimize differences between GCC and MSVC in header file
Don't define SR_MSR_DSR as it already exists under the name SERIAL_DSR_STATE
Remove $Id: tags

svn path=/trunk/; revision=16501
2005-07-07 23:10:35 +00:00
Magnus Olsen
daafc242e6 Set right %ERRORLEVEL% value, fixing end of line for /? after implement of page break.
svn path=/trunk/; revision=16500
2005-07-07 22:27:30 +00:00
Hervé Poussineau
f7289e9d4a Add missing registry entries for serial ports
svn path=/trunk/; revision=16499
2005-07-07 22:23:26 +00:00
Magnus Olsen
19b47127b0 Set right %ERRORLEVEL% value, fixing end of line for /? for most commands after implement of page break.
svn path=/trunk/; revision=16498
2005-07-07 20:41:13 +00:00
Hartmut Birr
93fc422f43 Fixed a bug which was introduced by r16441.
svn path=/trunk/; revision=16497
2005-07-07 19:54:25 +00:00
Magnus Olsen
2bd961bd1d set right value of %ERRORLEVEL% for vol
svn path=/trunk/; revision=16496
2005-07-07 19:51:09 +00:00
Magnus Olsen
bff830321b add %CMDEXTVERSION% example to use it echo %CMDEXTVERSION% the value are hardcode to 2. for it is that value ms win2k / winxp report back. thx arty to test it in win xp.
svn path=/trunk/; revision=16495
2005-07-07 19:26:46 +00:00
Magnus Olsen
610ec85471 adding %cmdcmdline%, example how to use it echo %CMDCMDLINE%
svn path=/trunk/; revision=16494
2005-07-07 19:16:46 +00:00
Martin Fuchs
497eba8519 Sync to Wine:
- switch to UNICODE compilaton in Wine
- remove separate unixcalls.c file
- don't crash in set_curdir() for NULL in the 'entry' pointer

svn path=/trunk/; revision=16493
2005-07-07 18:44:08 +00:00
Magnus Olsen
dfcc16249d Did forget instate in for loop the patternX, the right way. thx GvG to spot it and tell me how to fix.
svn path=/trunk/; revision=16492
2005-07-07 18:21:44 +00:00
Martin Fuchs
c2db525161 Jonathan Ernst <Jonathan@ErnstFamily.ch>
Updated winefile French resources.

svn path=/trunk/; revision=16491
2005-07-07 18:07:40 +00:00
Magnus Olsen
7d58c61349 move PatternX initiate calculation out from for loop, it should have been outside of the for loop.
svn path=/trunk/; revision=16490
2005-07-07 17:54:50 +00:00
Magnus Olsen
5620de4ea7 adding %RANDOM% example how to use it echo %random%
svn path=/trunk/; revision=16489
2005-07-07 17:09:56 +00:00
Filip Navara
ac3457f145 #include "precomp.h" -> #include <precomp.h>
svn path=/trunk/; revision=16488
2005-07-07 16:45:42 +00:00
Hervé Poussineau
71183fb50d Enumerate serial interfaces by calling QueryDosDevice on Wine
Wine-ify th whole file by removing the L"..." strings, by using debugstr_w(), ...

svn path=/trunk/; revision=16487
2005-07-07 16:32:34 +00:00
Magnus Olsen
7d472ee662 Fix bug "mv foo.txt c:\temp gives you c:\tempfoo.txt" by Brandon Turner
svn path=/trunk/; revision=16486
2005-07-07 16:22:45 +00:00
Magnus Olsen
4e39fcafa0 add %DATE% example echo %date% are working now. Bugfix date so it print out the week days names.
svn path=/trunk/; revision=16485
2005-07-07 16:06:43 +00:00
Gé van Geldorp
d7990aa664 Sync to Wine-20050628:
Alexandre Julliard <julliard@winehq.org>
- Sort entry points in the same order as Windows.
- Added magic comments to all Wine-specific registry accesses to make
  them easier to grep.

svn path=/trunk/; revision=16484
2005-07-07 15:05:36 +00:00
Magnus Olsen
4fedfe1bf7 add %time% and %cd% internal value. Example echo %cd% or echo %time%.
svn path=/trunk/; revision=16483
2005-07-07 13:43:03 +00:00
Magnus Olsen
5aa3039278 Update command help text with \n at the end of the text
svn path=/trunk/; revision=16482
2005-07-07 11:44:15 +00:00
Magnus Olsen
be0b8327dd Fix minior bug in ConPrintfPaging so it count line right and do pause on the screen before it getting full. Fix the row size calc code. Move in page break code to the for. Write one char at time. Need to be fixed so it can write more that one char at time.
svn path=/trunk/; revision=16481
2005-07-07 11:26:38 +00:00
Filip Navara
e64361f015 Once more, this time with proper character encoding.
svn path=/trunk/; revision=16480
2005-07-07 09:56:47 +00:00
Filip Navara
52e8ffce44 Correct the copyright headers.
svn path=/trunk/; revision=16479
2005-07-07 09:48:44 +00:00
Filip Navara
8407954c54 Fix the problems introduced in r16449 by changing "-mdll --dll" to "-shared" and letting the linker generate the relocations in all cases.
svn path=/trunk/; revision=16478
2005-07-07 08:57:03 +00:00
Magnus Olsen
d1c9fb08f5 adding page break on almost all help param and on help command.
svn path=/trunk/; revision=16477
2005-07-07 08:29:22 +00:00
James Tabor
c296b39f61 Added MNS_ defines for MenuInfo dwStyle. Misc Wine Menu porting.
svn path=/trunk/; revision=16476
2005-07-07 00:21:21 +00:00
Gé van Geldorp
af07d5f933 Sync to Wine-20050628:
Alexandre Julliard <julliard@winehq.org>
- Sort entry points in the same order as Windows.

svn path=/trunk/; revision=16475
2005-07-06 22:49:08 +00:00
Hervé Poussineau
23c534f821 Open remote registry if needed in SetupDiCreateDeviceInfoListExW and SetupDiOpenClassRegKeyExW
Set last error in more places
Add my name to copyright due to my recent changes

svn path=/trunk/; revision=16474
2005-07-06 22:47:23 +00:00
Gé van Geldorp
8322ac0d33 Sync to Wine-20050628:
Juan Lang <juan_lang@yahoo.com>
- Fix return code abuse (don't use HRESULT when it isn't meant), make
  functions static where possible, remove unused prototypes.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Make some of the OLE interface vtables const.
Michael Jung <mjung@iss.tu-darmstadt.de>
- Use IShellFolder::GetDisplayNameOf instead of SHGetPathFromIDList to
  be able to browse shell namespace extensions.
Vitaly Lipatov <lav@etersoft.ru>
- Add some descriptions for PageSetupDlg functions.
- Implement user paint hook support and PSD_ENABLEPAGEPAINTHOOK
  checking.
Huw Davies <huw@codeweavers.com>
- If a folder is selected on Open then browse into it, otherwise we
  should return the path in the edit box whether that be a folder or a
  file.
- Don't add extensions to a folder.
- Use DWLP_MSGRESULT to return values from the dialog proc.
- Send CDN_FOLDERCHANGE whenever we change folder.

svn path=/trunk/; revision=16473
2005-07-06 22:40:35 +00:00
Gé van Geldorp
8a79bd9b46 Sync to Wine-20050628:
Robert Shearman <rob@codeweavers.com>
- Document how the native lays out the internal components of
  buttons.
- Fix control to follow these rules.
- Don't redraw disabled buttons.
- Padding is never less that GetSystemMetrics(SM_{CX,CY}EDGE).
- Change default iListGap value to 4 to match native.
- Fix a regression in IE where the Favourites menu didn't appear
  correctly because the height and width were swapped in the pager
  control.
Stefan Huehner <stefan@huehner.org>
- Fix more -Wstrict-prototypes warnings.
Mike McCormack <mike@codeweavers.com>
- Warning fixes for -Wmissing-declarations and -Wwrite-strings.
Felix Nawothnig <felix.nawothnig@t-online.de>
- Fix some missed invalidations after column resize.
- Pass the right hwnd to ReleaseDC().
Kouji Sasaki <taro-x@justsystem.co.jp>
- Added the feature to change row height in owner draw controls.
- Added the callback item processing for LISTVIEW_EndEditLabelT
  function.
- Corrected the priority of operators for LISTVIEW_GetNextItem
  function.
Huw Davies <huw@codeweavers.com>
- For modal propsheets we should run our own message loop rather than
  use a modal dialogbox just like Windows does.  This helps apps that
  subclass the propsheet's wndproc.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
James Hawkins <truiken@gmail.com>
- Audit the Tab control.
- Factor out common text shifting logic.
- Shift selected tab text up instead of down.
Alex Zorach <info@suscomputing.com>
- Fixed SetFocus behavior.
Krzysztof Foltman <wdev@foltman.com>
- Don't send TVN_SELCHANGING nor TVN_SELCHANGED if the same item is
  selected again.

svn path=/trunk/; revision=16472
2005-07-06 22:33:11 +00:00
Gé van Geldorp
44efc84fb4 Sync to Wine-20050628:
Thomas Weidenmueller <wine-patches@reactsoft.com>
- Removed local variables only used in TRACE statements.
Gerold Jens Wucherpfennig <gjwucherpfennig@gmx.net>
- Some FCI work.

svn path=/trunk/; revision=16471
2005-07-06 22:24:04 +00:00
Gé van Geldorp
0ddd1be07e Sync to Wine-20050628:
Robert Shearman <rob@codeweavers.com>
- Add more struct types for TLB generation.
Stefan Huehner <stefan@huehner.org>
- Fix some -Wmissing-declarations by making functions static.
Huw Davies <huw@codeweavers.com>
- Add comments describing the first DWORD in an import table entry.
Alexandre Julliard <julliard@winehq.org>
- Workaround to allow using the async keyword as method name.

svn path=/trunk/; revision=16470
2005-07-06 22:16:28 +00:00
Gé van Geldorp
28277f305b Sync to Wine-20050628:
Mike McCormack <mike@codeweavers.com>
- Move function prototypes to header.
Eric Pouech <pouech-eric@wanadoo.fr>
- Const correctness fixes.

svn path=/trunk/; revision=16469
2005-07-06 21:40:07 +00:00
Hervé Poussineau
40c9cd2c5d SetupDiGetClassDevsExW: implement DIGCF_ALLCLASSES and DIGCF_DEVICEINTERFACE. use deviceset and enumstr parameters if provided
Set right last error (if needed) in SetupDiCreateDeviceInfoListExW, SetupDiEnumDeviceInfo, SetupDiEnumDeviceInterfaces, SetupDiGetDeviceRegistryPropertyW
Replace some constants by constant names

svn path=/trunk/; revision=16468
2005-07-06 21:32:16 +00:00
Gé van Geldorp
bb29508c33 zebasoftis <zebasoftis@gmail.com>:
Polish Resource File for control.exe

svn path=/trunk/; revision=16467
2005-07-06 21:24:11 +00:00
Gé van Geldorp
dc2b5795d3 zebasoftis <zebasoftis@gmail.com>
Polish Resource File for timedate.cpl

svn path=/trunk/; revision=16466
2005-07-06 21:21:30 +00:00
Magnus Olsen
67984c6757 adding %errorlevel% code for date
it is always 0 

svn path=/trunk/; revision=16465
2005-07-06 20:50:21 +00:00
Eric Kohl
8655ed62ef Move undocumented GUIDs to a new NDK header file.
svn path=/trunk/; revision=16464
2005-07-06 20:20:02 +00:00
Magnus Olsen
7ee590086a set right errorlevel for cd / chdir, left to do we do not have /d param that are new in win2k maby in older windows also
svn path=/trunk/; revision=16463
2005-07-06 20:15:36 +00:00
Magnus Olsen
721be9ec7b remove rem errorlevel it was never set stupied mistake by me.fix call setting errorlevel to 1
svn path=/trunk/; revision=16462
2005-07-06 19:42:41 +00:00
Magnus Olsen
78df6635f5 set %errorlevel% for rem
svn path=/trunk/; revision=16461
2005-07-06 19:13:24 +00:00
Thomas Bluemel
2936d05aa3 don't use the DS_NOFAILCREATE style which I accidentally committed earlier
svn path=/trunk/; revision=16460
2005-07-06 17:18:48 +00:00
Casper Hornstrup
8a1b2d5c2b Generate pre-compiled headers in intermediate directory tree
svn path=/trunk/; revision=16459
2005-07-06 16:56:28 +00:00
Gé van Geldorp
c82da07ee2 Change license to LGPL
svn path=/trunk/; revision=16458
2005-07-06 16:27:58 +00:00
Magnus Olsen
c9b36033d8 hopeful it is last bug in choice.c when you type choice "sadsa" it did not response on key press at all.
svn path=/trunk/; revision=16457
2005-07-06 14:06:33 +00:00
Magnus Olsen
1369d1649e fix a small bug in choice.c so it does print out choice "sadsad" right
svn path=/trunk/; revision=16456
2005-07-06 13:50:08 +00:00
Filip Navara
2fc5a38d16 Remove definitions that are already present in the DDK headers.
svn path=/trunk/; revision=16455
2005-07-06 13:46:42 +00:00
Filip Navara
db15209f07 - Move ReactOS specific code to ReactOS specific files/directories.
- Use NDK instead of redefining the loader structures.

svn path=/trunk/; revision=16454
2005-07-06 13:41:51 +00:00
Magnus Olsen
3b440449dd Add proper memory alloc ProcessInput, the error handling for memory handling need to be improve
svn path=/trunk/; revision=16453
2005-07-06 13:09:23 +00:00
Magnus Olsen
04480b3be7 translate %errorlevel% to a value when it pass at command line. Now is errorlevel implement as it should. left todo check all cmd command that they are setting right value
svn path=/trunk/; revision=16452
2005-07-06 12:20:57 +00:00
Filip Navara
9254444a9c Don't continue processing after displaying the usage screen.
svn path=/trunk/; revision=16451
2005-07-06 11:31:03 +00:00
Filip Navara
8064f8c236 Fix some compilation issues.
svn path=/trunk/; revision=16450
2005-07-06 09:27:08 +00:00
Filip Navara
b6e80ebb53 Generating relocations twice for DLLs? Oh, what a clever idea ... not.
svn path=/trunk/; revision=16449
2005-07-06 08:43:36 +00:00
Filip Navara
8e4e06d0de Report correct system space start address in /3GB case.
svn path=/trunk/; revision=16448
2005-07-06 08:22:13 +00:00
Filip Navara
2773203033 Kernel base address and system space start can be distinct addresses, so use KERNEL_BASE and MmSystemRangeStart accordingly in the code.
svn path=/trunk/; revision=16447
2005-07-06 08:20:26 +00:00
Gé van Geldorp
d64e8b4096 zebasoftis <zebasoftis@gmail.com>:
Polish Resource File for winlogon

svn path=/trunk/; revision=16446
2005-07-06 07:54:04 +00:00
Filip Navara
902a400b19 Put the page tables and hyperspace at the right place in memory (ie. Windows compatible).
svn path=/trunk/; revision=16445
2005-07-06 00:29:39 +00:00
Thomas Bluemel
4ea9392a55 fix gcc4 warnings and indention
svn path=/trunk/; revision=16444
2005-07-06 00:24:08 +00:00
Thomas Bluemel
c75115824f fix warnings with -Wsign-compare for MP builds
svn path=/trunk/; revision=16443
2005-07-05 23:15:22 +00:00
Thomas Bluemel
5979e80363 fix warnings with -Wsign-compare and -Wpointer-arith
svn path=/trunk/; revision=16442
2005-07-05 22:58:11 +00:00
Thomas Bluemel
cc6ffdce48 fixed some signed/unsigned comparison warnings with -Wsign-compare
svn path=/trunk/; revision=16441
2005-07-05 22:35:29 +00:00
Alex Ionescu
c3e6b1f6a4 Ged Murpy <gedmurphy@gmail.com>
* ARP Rewrite, 90% complete (still in progress)

svn path=/trunk/; revision=16440
2005-07-05 22:14:07 +00:00
Alex Ionescu
d9cbcc2128 Fix the build by adding KDPC_DATA as a shared arch structure. Kind of a hack but I could not find another way to avoid the undelrying recursive dependencies that not doing this would cause. Also made an arch-specific fix to KPROCESS and wrote a little comment on it
svn path=/trunk/; revision=16439
2005-07-05 21:57:55 +00:00
Gé van Geldorp
d005fc9f1a Sync to Wine-20050628:
Alexandre Julliard <julliard@winehq.org>
- Generate the resource data directly inside the resource directory.
- Replaced all uses of the __ASM_NAME macro by the asm_name function to
  allow run-time determination of the correct format.
- Beginnings of an infrastructure to allow specifying the target CPU and
  platform at run-time.
- Output the exported names as a C string so that they end up in the
  correct section.
- Reuse output_dll_init for the constructor of debug files.
- Moved all assembly code to the end of the generated C files to avoid
  conflicting with the compiler over section changes.
- Switch back to .data at the end of asm sections to work around an
  optimization in recent gcc versions.
- Remove some i386 ifdefs for 16-bit entry points since they are no
  longer used by default on other platforms anyway.
- Make import thunks position-independent to avoid text relocations.
- Generate proper PIC code for CALL32_CBClient.
- Store a relative pointer for registry entry points to avoid some text
  relocations.
- Allocate ordinals in the order of the declarations in the spec file.
Wolfgang Thaller <wolfgang.thaller@gmx.net>
- Winebuild darwin/x86-specific fixes:
  - Assembler interprets .align as power-of-two
  - Add .weak_reference to output where gcc 3.3 swallows it
- Use __ASM_NAME and HAVE_ASM_DOT_SIZE in a few places in winebuild
  where they have been missing (needed for Darwin/x86).
Pierre d'Herbemont <stegefin@free.fr>
- Use .mod_*_func sections on Mac OS X/i386 instead of the elf
  constructor/destructor.

svn path=/trunk/; revision=16438
2005-07-05 21:17:01 +00:00
Eric Kohl
40dc1919bc Add architecture-specific headers and move I386-specific definitions into them.
svn path=/trunk/; revision=16437
2005-07-05 21:03:46 +00:00
Gé van Geldorp
93232de775 Sync to Wine-20050628:
Eric Pouech <pouech-eric@wanadoo.fr>
- Const correctness fixes.
Mike McCormack <mike@codeweavers.com>
- Fix some declaration and write string warnings.

svn path=/trunk/; revision=16436
2005-07-05 20:47:48 +00:00
Filip Navara
dd349cfd8b Remove spurious "#define _OLEIDL_H".
svn path=/trunk/; revision=16433
2005-07-05 17:13:01 +00:00
Gé van Geldorp
3b9c960f59 Always return a meaningfull status code
svn path=/trunk/; revision=16432
2005-07-05 17:10:52 +00:00
Gé van Geldorp
8e86b33472 Prevent warning in optimized builds
svn path=/trunk/; revision=16431
2005-07-05 17:10:19 +00:00
Gé van Geldorp
f29b15b285 Code generator for 16bpp DIB Blt operations
svn path=/trunk/; revision=16430
2005-07-05 17:08:58 +00:00
Filip Navara
d6ebf05ea0 Get rid of the (incorrect) __attribute__((packed)) usage.
svn path=/trunk/; revision=16429
2005-07-05 17:08:48 +00:00
Filip Navara
51c604714a - Convert pure inline assembler .c files to .S files.
- Move SMP IRQ handlers to irqhand.s (at the same place where the UP ones are).

svn path=/trunk/; revision=16428
2005-07-05 16:40:01 +00:00
Hervé Poussineau
7afd05c217 Fix compilation due to revision 16425.
I forgot a parameter in SetupDiGetClassDevsExA/W ...

svn path=/trunk/; revision=16427
2005-07-05 14:00:33 +00:00
Hervé Poussineau
9b619507af Implement SetupDiGetClassDescriptionExA, by calling SetupDiGetClassDescriptionExW
svn path=/trunk/; revision=16426
2005-07-05 13:15:10 +00:00
Hervé Poussineau
4a200035de Implement SetupDiGetClassDevs(Ex)A/W
svn path=/trunk/; revision=16425
2005-07-05 12:59:14 +00:00
Magnus Olsen
3c215ef287 Brandon Turner turnerb7@msu.edu. Bug fix color now it working as ms cmd color. Please everyone that have done translate of cmd, update the language's file. some text have been modify and add in cmd en.rc
svn path=/trunk/; revision=16424
2005-07-05 12:06:27 +00:00
Hervé Poussineau
a314f1c4ad - Implement SetupDiCreateDeviceInfoListExW
- Do according changes in SetupDiDestroyDeviceInfoList
- Implement SetupDiEnumDeviceInfo
- Don't open registry with full rights in SetupDiClassGuidsFromNameExW
- Set last error in SetupDiClassNameFromGuidExW in case of problem
- Do W->A conversion for InfSectionWithExt string in SetupDiGetActualSectionToInstallA

Following changes break serial port devices enumeration on Wine. I'll work on this problem later.
- Implement SetupDiGetClassDevsW
- Disable some code in SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetailA

Now, you should be able to list devices classes, and enumerate devices related to each class

svn path=/trunk/; revision=16423
2005-07-05 08:48:43 +00:00
Thomas Bluemel
9766bda54e globally enable the -Wpointer-arith warning to prevent usage of GCC's pointer arithmetics extension
svn path=/trunk/; revision=16422
2005-07-05 01:18:07 +00:00
Thomas Bluemel
bd691c850c fix code that depends on GCC's void* pointer arithmetic extension
svn path=/trunk/; revision=16421
2005-07-05 00:57:47 +00:00
Thomas Bluemel
945ed508b6 fix code that depends on GCC's void* pointer arithmetic extension
svn path=/trunk/; revision=16420
2005-07-05 00:24:36 +00:00
Thomas Bluemel
a4a9299b16 fix code that depends on GCC's void* pointer arithmetic extension
svn path=/trunk/; revision=16419
2005-07-04 23:05:17 +00:00
Thomas Bluemel
eea2c1d47c some %x -> %p fixes
svn path=/trunk/; revision=16418
2005-07-04 22:25:46 +00:00
Gunnar Dalsnes
cf3c6e6296 fix premature close og reg key
svn path=/trunk/; revision=16417
2005-07-04 22:22:22 +00:00
Thomas Bluemel
541151ea53 some %x -> %p fixes
svn path=/trunk/; revision=16416
2005-07-04 22:11:00 +00:00
Gunnar Dalsnes
d8e78cc66b hopefully fix something in CreateClassKey
svn path=/trunk/; revision=16415
2005-07-04 21:54:36 +00:00
Filip Navara
199b9bce22 Yet another DPRINT fix.
svn path=/trunk/; revision=16414
2005-07-04 21:46:20 +00:00
Filip Navara
8f08cb04c9 Fix more DPRINTs.
svn path=/trunk/; revision=16413
2005-07-04 21:12:35 +00:00
Hervé Poussineau
382e1c8635 Remove entries that are created by 2nd stage setup, using media/inf/NET_NIC.inf
Fix some obvious wrong copy/pastes
Add correct registry entries for kbdclass and mouclass classes
Fix hard-coded values for serial mice (Serenum doesn't report the exact hardwa

svn path=/trunk/; revision=16412
2005-07-04 21:08:00 +00:00
Alex Ionescu
9b63d671e9 Dprint fixes by our lovely Filip
svn path=/trunk/; revision=16411
2005-07-04 21:01:46 +00:00
Thomas Bluemel
12e95836ec add a quick search feature to the checklist control
svn path=/trunk/; revision=16410
2005-07-04 17:22:18 +00:00
Thomas Bluemel
a11dac9b2a properly handle WM_UPDATEUISTATE
svn path=/trunk/; revision=16409
2005-07-04 13:37:02 +00:00
Thomas Bluemel
8e3b9a7f21 - hide the keyboard focus when appropriate
- add missing definitions to w32api

svn path=/trunk/; revision=16408
2005-07-04 13:21:14 +00:00
Thomas Bluemel
0140b609d9 fixed some scrolling issues
svn path=/trunk/; revision=16407
2005-07-04 11:52:16 +00:00
Thomas Bluemel
48e0fe423b handle resizing of the control
svn path=/trunk/; revision=16406
2005-07-04 11:05:04 +00:00
Thomas Bluemel
a0f4cc2feb get rid of the obsolete Makefile.ros-template files
svn path=/trunk/; revision=16405
2005-07-04 09:46:50 +00:00
Thomas Bluemel
7661ff0d5f properly handle clicks outside a checkbox
svn path=/trunk/; revision=16404
2005-07-04 00:30:23 +00:00
Thomas Bluemel
9d1991ed72 minor bugfixes
svn path=/trunk/; revision=16403
2005-07-04 00:06:52 +00:00
Thomas Bluemel
68a5299cd2 enable editing of the checkboxes and minor bugfixes
svn path=/trunk/; revision=16402
2005-07-03 23:29:36 +00:00
Eric Kohl
fae2febad9 Remove trailing whitespace and fix indentation
svn path=/trunk/; revision=16401
2005-07-03 21:37:16 +00:00
Hervé Poussineau
d3bf39b1f2 Delete unused makefiles
svn path=/trunk/; revision=16400
2005-07-03 21:35:41 +00:00
Eric Kohl
2bdea48b49 - Implement PlugPlayControlProperty and PlugPlayControlGetDeviceDepth
- Move documentation from NDK headers

svn path=/trunk/; revision=16399
2005-07-03 21:25:00 +00:00
Hervé Poussineau
3988ea5599 Implement SetupDiGetDeviceRegistryPropertyA
Add stub for SetupDiGetDeviceRegistryPropertyW

svn path=/trunk/; revision=16398
2005-07-03 20:19:55 +00:00
Martin Fuchs
1d354a90fe fix compile errors
svn path=/trunk/; revision=16397
2005-07-03 20:12:16 +00:00
Thomas Bluemel
7a42053e8b actually disable it, sorry
svn path=/trunk/; revision=16396
2005-07-03 19:32:55 +00:00
Thomas Bluemel
ef28baf965 add support for XP themes (disabled by default)
svn path=/trunk/; revision=16395
2005-07-03 19:32:30 +00:00
Thomas Bluemel
4be9703fa6 - imported uxtheme.dll from WINE-20050703
- added missing definitions in w32api
- imported schemadef.h from WINE and replaced most of tmschema.h with WINE's version (which is much more correct)

svn path=/trunk/; revision=16394
2005-07-03 18:32:22 +00:00
Eric Kohl
89ac547ef5 - Move definitions from ntpnp.h into NDK and DDK
- Remove ntpnp.h

svn path=/trunk/; revision=16393
2005-07-03 15:21:19 +00:00
Martin Fuchs
d46e87dfdb prepare for WINE UNICODE patch
svn path=/trunk/; revision=16392
2005-07-03 13:49:05 +00:00
Hervé Poussineau
5c050fc41f Implement SetupDiGetActualSectionToInstallA
Implement SetupDiCreateDeviceInfoA
Add SetupDiCreateDeviceInfoW stub
Fix SetupDiOpenClassRegKeyExW, by adding { } around the GUID string when opening the registry key
Don't use L"..." notation for wide strings

svn path=/trunk/; revision=16391
2005-07-03 13:46:33 +00:00
Eric Kohl
89d4545331 - Define and use PLUGPLAY_CONTROL_CLASS
- PNP_GetVersion should return an error code
- Rename structs used by NtPlugPlayControl

svn path=/trunk/; revision=16390
2005-07-03 12:18:23 +00:00
Hervé Poussineau
3eb22d7480 Implement CM_Enumerate_Classes and CM_Enumerate_Classes_Ex
svn path=/trunk/; revision=16389
2005-07-03 10:35:56 +00:00
Hervé Poussineau
151fe7f976 Add some missing constants and prototypes related to setupapi/cfgmgr
svn path=/trunk/; revision=16388
2005-07-03 10:33:51 +00:00
Martin Fuchs
7e100086d3 switch to WIN32 API string functions
svn path=/trunk/; revision=16387
2005-07-03 09:39:11 +00:00
James Tabor
c21d161abd Half way implement NtGdiUnrealizedObject.
svn path=/trunk/; revision=16386
2005-07-03 06:43:49 +00:00
Thomas Bluemel
51e10671c0 don't look up list items with negative index
svn path=/trunk/; revision=16385
2005-07-03 02:02:47 +00:00
Thomas Bluemel
79811989d8 - allow changing the focus of the check boxes in the checklist control
- minor fixes

svn path=/trunk/; revision=16384
2005-07-03 01:44:25 +00:00
Eric Kohl
d23d39a743 Implement StringTableDuplicate.
svn path=/trunk/; revision=16383
2005-07-02 21:32:37 +00:00
Eric Kohl
396b274742 Implement GetVersionInfoFromImage.
Add missing prototypes to w32api.

svn path=/trunk/; revision=16382
2005-07-02 19:26:43 +00:00
Martin Fuchs
5f53398bd1 Henning Gerhardt <henning.gerhardt@web.de>: Update German resource files.
svn path=/trunk/; revision=16381
2005-07-02 17:57:51 +00:00
Hervé Poussineau
8925d0aca7 Implement PoRequestPowerIrp
svn path=/trunk/; revision=16380
2005-07-02 14:50:22 +00:00
Eric Kohl
6c58ea3cd7 Implement CenterWindowRelativeToParent.
svn path=/trunk/; revision=16379
2005-07-02 14:05:38 +00:00
Thomas Bluemel
50c2bb7322 - query the domain server if specified by the server
- fixed some minor bugs

svn path=/trunk/; revision=16378
2005-07-02 13:49:23 +00:00
Filip Navara
65ecbfa03d Use RtlExitUserThread instead of NtTerminateThread, so the stack is properly freed.
svn path=/trunk/; revision=16377
2005-07-02 13:45:23 +00:00
Filip Navara
f15bf7924f Add prototypes for RtlExitUserThread and RtlInitializeContext.
svn path=/trunk/; revision=16376
2005-07-02 13:42:43 +00:00
Thomas Bluemel
16c7672bfd enumerate the permission names and display them
svn path=/trunk/; revision=16375
2005-07-02 01:34:18 +00:00
Thomas Bluemel
15436e184a initial (not yet complete) implementation of the checklist control for the permissions editor
svn path=/trunk/; revision=16374
2005-07-01 23:33:34 +00:00
Hervé Poussineau
46903e60ea Set svn:eol-style property to native
svn path=/trunk/; revision=16373
2005-07-01 23:26:01 +00:00
Alex Ionescu
c18f64ffe6 fix tlist
svn path=/trunk/; revision=16372
2005-07-01 19:53:02 +00:00
Magnus Olsen
e2a3507651 Brandon Turner turnerb7@msu.edu
Added ConPrintfPaging and ConOutPrintfPaging
Added /p back in using ConOutPrintfPaging

Me
correct small mistake in en.rc adding newline 
for dir_help text, so it looking bit better when it 
printout

svn path=/trunk/; revision=16371
2005-07-01 18:20:10 +00:00
Alex Ionescu
dca78ab993 remove acledit.h, the interfaces are nt4-only and deprecated, programmers must use ISecurityInformation (which is what Thomas has started to implement as well)
svn path=/trunk/; revision=16370
2005-07-01 16:04:07 +00:00
Alex Ionescu
ff230341e0 Fix DHCP bug (a ReadFile was being done on a BOOLEAN return value instead of the handle, and a thread was never returning), fix 99% of warnings and use PCH
svn path=/trunk/; revision=16369
2005-07-01 15:40:52 +00:00
Hervé Poussineau
5cda38b218 Add '\' between "System\CurrentControlSet\Class" and the GUID when creating the registry key name
Don't return FALSE but INVALID_HANDLE_VALUE in SetupDiOpenClassRegKeyExW

svn path=/trunk/; revision=16368
2005-07-01 15:29:06 +00:00
Thomas Bluemel
15d5aa6c62 query the dacl from the ISecurityInformation server, query the domains name from lsass and list them in the dialog box
svn path=/trunk/; revision=16367
2005-07-01 12:09:04 +00:00
Alex Ionescu
a51afa23e7 These two escaped... fix them too
svn path=/trunk/; revision=16366
2005-07-01 03:58:55 +00:00
Alex Ionescu
aa9df5babf Fix breakage caused by accidental commit in the last revision
svn path=/trunk/; revision=16364
2005-07-01 03:40:52 +00:00
Alex Ionescu
79ab4b5644 Fix explorer/ibrowser build
svn path=/trunk/; revision=16363
2005-07-01 03:25:35 +00:00
Alex Ionescu
919125b189 Kill off more of rosrtl
svn path=/trunk/; revision=16362
2005-07-01 03:14:40 +00:00
Alex Ionescu
14e3b7395b PCH for csrss and win32csr, and remove rosrtl usage
svn path=/trunk/; revision=16361
2005-07-01 03:03:06 +00:00
Alex Ionescu
267707560d PCH for SMSS, and remove rosrtl usage
svn path=/trunk/; revision=16360
2005-07-01 02:47:15 +00:00
Alex Ionescu
4eb4922aad Kill large parts of rosrtl. devmode conversion implented in gdi32 because it's actually an exported api, 2nd converstion used only once so inlined. logfont conversion implented as functions directly in the ddl. rtlrosmin/max replaced by actual macros, and resource rtlros function in aclui replace by actual win32 call. other rosrtl code was already deprecated.
svn path=/trunk/; revision=16359
2005-07-01 01:54:55 +00:00
Alex Ionescu
2125679164 Move some internal headers to /reactos, set it as a default include path, move pseh and elf headers to their respective directories
svn path=/trunk/; revision=16358
2005-06-30 22:40:36 +00:00
Thomas Bluemel
755c848950 - Get rid of GCC specific typecasts to PVOID for pointer arithmetics
- Decrement the AceCount in RtlDeleteAce instead of incrementing it

svn path=/trunk/; revision=16357
2005-06-30 21:38:39 +00:00
Alex Ionescu
084cc36104 rollback change
svn path=/trunk/; revision=16356
2005-06-30 17:00:19 +00:00
Alex Ionescu
077fa44358 rollback change
svn path=/trunk/; revision=16355
2005-06-30 16:59:07 +00:00
Alex Ionescu
30a6f296fd kill rosrtl from system modules
svn path=/trunk/; revision=16354
2005-06-30 16:57:06 +00:00
Alex Ionescu
493ca2fe71 remove roscfg.h
svn path=/trunk/; revision=16353
2005-06-30 16:52:26 +00:00
Alex Ionescu
8539083b08 Add windows.h back, is it futile to remove it
svn path=/trunk/; revision=16352
2005-06-30 16:48:14 +00:00
Alex Ionescu
8209b87210 Remove windows.h from external win32k headers
svn path=/trunk/; revision=16351
2005-06-30 16:39:17 +00:00
Alex Ionescu
5420982bbb Math.c wasn't using the pch header, thanks for the catch, Steven
svn path=/trunk/; revision=16350
2005-06-30 16:31:15 +00:00
Alex Ionescu
eaf273b4ef remove windows.h dependency. Filip said it couldn't be done, so please watch out for flying pigs and hell freezing over
svn path=/trunk/; revision=16349
2005-06-30 16:20:40 +00:00
Alex Ionescu
02bd986e69 Fix win32k warnings, get rid of windowsx.h dependency
svn path=/trunk/; revision=16348
2005-06-30 16:17:45 +00:00
Alex Ionescu
d280ce9240 Kill rosrtl
svn path=/trunk/; revision=16347
2005-06-30 16:04:08 +00:00
Filip Navara
bc4215dca5 Don't use ROSRTL.
svn path=/trunk/; revision=16346
2005-06-30 14:38:53 +00:00
Filip Navara
046d85a84a Use RtlQueryRegistryValues instead of RosReadRegistryValue.
svn path=/trunk/; revision=16345
2005-06-30 13:50:21 +00:00
Alex Ionescu
2170f23f23 Manually define undocumented MS GLU constants
svn path=/trunk/; revision=16344
2005-06-30 12:42:57 +00:00
Thomas Bluemel
444df32c83 implemented NeedCurrentDirectoryForExePathA/W
svn path=/trunk/; revision=16343
2005-06-30 12:33:12 +00:00
Alex Ionescu
005201f320 Delete ddentry.h and create official ddrawgdi.h header instead, delete duplicate GL include folder, move internal headers to internal libs, delete tcpmisc.h and move its defines to official tcpioctl.h, fix up winddi.h and cleanup gdi32 header.
svn path=/trunk/; revision=16342
2005-06-30 12:31:36 +00:00
Filip Navara
56ac965dc9 Move ROSKY to a separate SVN module.
svn path=/trunk/; revision=16341
2005-06-30 12:22:27 +00:00
Filip Navara
f992a4e417 Move ROSKY to a separate SVN module.
svn path=/trunk/; revision=16340
2005-06-30 12:21:30 +00:00
Filip Navara
f5dfe7db02 Move ROSKY to a separate SVN module.
svn path=/trunk/; revision=16339
2005-06-30 12:19:21 +00:00
Filip Navara
ff9c6f6419 Move ROSKY out of the main module.
svn path=/trunk/; revision=16338
2005-06-30 12:17:36 +00:00
Filip Navara
9a7a1b2147 Move ROSKY out of the main module.
svn path=/trunk/; revision=16337
2005-06-30 12:17:30 +00:00
Filip Navara
8ab1501eb8 Move ROSKY out of the main module.
svn path=/trunk/; revision=16336
2005-06-30 12:16:27 +00:00
Alex Ionescu
625fd620c6 Fix warning
svn path=/trunk/; revision=16335
2005-06-30 02:17:47 +00:00
Filip Navara
73970db31b Allow YASM to be used instead of NASM.
svn path=/trunk/; revision=16334
2005-06-29 22:19:47 +00:00
Steven Edwards
3fd1a79ff3 silence some warnings and break it even more
svn path=/trunk/; revision=16333
2005-06-29 20:13:51 +00:00
Steven Edwards
235fba2f3b already moved this to the PSDK
svn path=/trunk/; revision=16332
2005-06-29 20:03:12 +00:00
Steven Edwards
13da42279f correctly convert to all lower case
svn path=/trunk/; revision=16331
2005-06-29 19:47:57 +00:00
Steven Edwards
dbf298de73 correct case of included headers
svn path=/trunk/; revision=16330
2005-06-29 19:36:54 +00:00
Alex Ionescu
8ebf837814 Add a nice little KIDT_ACCESS structure for setting IDT entries in a pretty way
svn path=/trunk/; revision=16329
2005-06-29 19:06:28 +00:00
Alex Ionescu
356bf8d78c Fix halmp build for real
svn path=/trunk/; revision=16328
2005-06-29 19:05:46 +00:00
Filip Navara
f08cae7194 Use the correct structure in SetInterruptGate.
svn path=/trunk/; revision=16327
2005-06-29 18:33:39 +00:00
Filip Navara
06bd6d6ba8 We don't need to have uuids.h in each folder of the source tree, do we?
svn path=/trunk/; revision=16326
2005-06-29 18:26:30 +00:00
Filip Navara
99cf3f8baa I feel like trying to fit a cube into a circle-shaped hole on those little things kids play with... but however ugly the change can look it makes the MP HAL not freeze during boot.
svn path=/trunk/; revision=16325
2005-06-29 18:21:31 +00:00
Gé van Geldorp
28f775e06d zebasoftis <zebasoftis@gmail.com>:
Add Polish translation

svn path=/trunk/; revision=16324
2005-06-29 18:18:19 +00:00
Alex Ionescu
70c62c571a Fix idt descriptor code properly
svn path=/trunk/; revision=16323
2005-06-29 17:36:05 +00:00
Alex Ionescu
ba4e11025f Fix HALMP build
svn path=/trunk/; revision=16322
2005-06-29 17:22:57 +00:00
Filip Navara
a6114ec37f Fix warnings.
svn path=/trunk/; revision=16321
2005-06-29 09:35:02 +00:00
Filip Navara
db07afe07a Move the inclusion of <debug.h> to individual files and consolidate the inclusion of DDRAW/D3D headers a bit.
svn path=/trunk/; revision=16320
2005-06-29 07:09:25 +00:00
Steven Edwards
1d02274287 move a few more headers to the PSDK
svn path=/trunk/; revision=16319
2005-06-29 00:11:39 +00:00
Gunnar Dalsnes
fb6b25f553 use correct resourcefile
svn path=/trunk/; revision=16318
2005-06-28 23:36:28 +00:00
Steven Edwards
753209adc2 move ipexport.h to PSDK
svn path=/trunk/; revision=16317
2005-06-28 23:31:38 +00:00
Steven Edwards
9a714d7f55 remove inclusion of basetsd.h, I did not mean to commit this
svn path=/trunk/; revision=16316
2005-06-28 22:56:09 +00:00
Gé van Geldorp
5a9947460c Start off atoms in life with a ReferenceCount of 1
svn path=/trunk/; revision=16315
2005-06-28 22:33:48 +00:00
Steven Edwards
6d73043da8 move some wine headers to the PSDK
svn path=/trunk/; revision=16314
2005-06-28 22:09:03 +00:00
Alex Ionescu
af4ad253eb Move MS DDK files to DDK
svn path=/trunk/; revision=16313
2005-06-28 21:01:50 +00:00
Alex Ionescu
19fedef475 Copy more official headers to psdk directory
svn path=/trunk/; revision=16312
2005-06-28 20:30:26 +00:00
Alex Ionescu
0b4e482a01 Copy more official headers to psdk directory
svn path=/trunk/; revision=16311
2005-06-28 20:30:21 +00:00
Alex Ionescu
0a57f377c6 Add PSDK headers from ./include to ./w32api, delete some outdated headers and place some in ddk properly
svn path=/trunk/; revision=16310
2005-06-28 16:59:43 +00:00
Eric Kohl
f03def7913 Implement private object security functions.
svn path=/trunk/; revision=16309
2005-06-27 22:42:28 +00:00
Eric Kohl
53dea75f28 - Add Rtl*SecurityObject stubs.
- Export RtlpUnWaitCriticalSection and RtlWaitForCriticalSection.
- Replace DWORDs by ULONGs.

svn path=/trunk/; revision=16308
2005-06-27 21:11:29 +00:00
Hartmut Birr
a484af08a4 Fixed the rule for wrc.o.
svn path=/trunk/; revision=16307
2005-06-27 18:56:50 +00:00
Magnus Olsen
3da468a670 remove blank space at end of line 143 did not see it
sorry for compiling waring

svn path=/trunk/; revision=16306
2005-06-27 18:53:37 +00:00
Magnus Olsen
ef09f963dd Brandon Turner <turnerb7@msu.edu> Implemented /A example "del /A:H /A:-R *.exe -ping.exe"
svn path=/trunk/; revision=16305
2005-06-27 18:46:07 +00:00
Alex Ionescu
9734b13b5c Delete last trace of old headers in NDIS, and clean up some more old headers
svn path=/trunk/; revision=16304
2005-06-26 22:16:39 +00:00
Thomas Bluemel
c717085add - don't use the UNIMPLEMENTED macro in ObFindHandleForObject because it's actually used by win32k already
- set the right generic mapping for desktop and window station handles during win32k startup

svn path=/trunk/; revision=16303
2005-06-26 21:42:30 +00:00
Alex Ionescu
0c07cf98ad Fix boot
svn path=/trunk/; revision=16302
2005-06-26 21:32:48 +00:00
Eric Kohl
566e4b53a3 Build LSASS.
svn path=/trunk/; revision=16301
2005-06-26 21:01:19 +00:00
Eric Kohl
a35b024258 Remove useless Nt*Chanel and NtQueryOleDirectoryFile() prototypes.
svn path=/trunk/; revision=16300
2005-06-26 19:57:29 +00:00
Alex Ionescu
4710304a0d Fix kdbg build and some more header cleanups: add csq.q to ntifs, since it's now fully documented by MS (kept vizzini's comments though), moved af_irda to w32api because it's part of PSDK, moved ntbootvid.h to bootvid directory, removed ldrfuncs.h and add ndk's ldrfuncs.h to umode ndk (it was missing)
svn path=/trunk/; revision=16298
2005-06-26 19:29:12 +00:00
Eric Kohl
7132276795 Revert patch 16283 because it breaks PSDK compatibility.
svn path=/trunk/; revision=16297
2005-06-26 18:04:20 +00:00
Alex Ionescu
025d7c475c Seems I forgot to commit this, sorry
svn path=/trunk/; revision=16296
2005-06-26 18:00:22 +00:00
Eric Kohl
954200311b Add missing base address for cfgmgr32.dll and lsasrv.dll.
svn path=/trunk/; revision=16295
2005-06-26 17:22:34 +00:00
Alex Ionescu
67c200f2f9 Fix build
svn path=/trunk/; revision=16294
2005-06-26 17:11:20 +00:00
Alex Ionescu
3562ba1c03 Finalize organization of rtlfuncs.h and update FIXME status.
svn path=/trunk/; revision=16293
2005-06-26 16:35:51 +00:00
Alex Ionescu
edbcb1e0f4 Remove depcrecated constant
svn path=/trunk/; revision=16292
2005-06-26 16:35:17 +00:00
Alex Ionescu
6a9d46a3bb Update FIXME status.
svn path=/trunk/; revision=16291
2005-06-26 16:07:49 +00:00
Alex Ionescu
fef9d4dc69 Fixes for NDK compatibily (and plain ol' good design): - Use correct LDRP_ flags instead of our own made up ones. - Remove extra Process Info Classes that aren't in winddk, and use an add-on enumeration in the NDK. - Make ntoskrnl even more unaware of Win32K Internals by removing the deprecated PsCreateWin32Process function, moving w32process/thread allocation to win32k, and fixing the PsEstablishWin32Callouts function to use the latest NT prototype and callout data. These changes are similar to the ones done in NT.
svn path=/trunk/; revision=16290
2005-06-26 16:06:32 +00:00
James Tabor
7c91ae9295 Setup support for ShowOwnedPopups and expand new function in NtUserCallTwoParam.
svn path=/trunk/; revision=16289
2005-06-26 15:49:56 +00:00
Alex Ionescu
ce50274dc3 Satisfy blight's excessively arrogant attitude and overblown ego
svn path=/trunk/; revision=16288
2005-06-26 15:22:44 +00:00
Alex Ionescu
7cf07db3d7 Add NDK FIXME List.
svn path=/trunk/; revision=16287
2005-06-26 14:52:15 +00:00
Eric Kohl
ef8c4070db Build lsasrv.dll.
svn path=/trunk/; revision=16286
2005-06-26 14:02:36 +00:00
Hervé Poussineau
daae3048fd Move variable declaration at the top of the function
Remove unneeded affectation of hProcessHeap (already initialized in DllMain)

svn path=/trunk/; revision=16285
2005-06-26 12:51:17 +00:00
Eric Kohl
489bda971f Add cfgmgr32 dll.
This is a forwarder dll that passes all calls to setupapi.dll.

svn path=/trunk/; revision=16284
2005-06-26 12:17:27 +00:00
Eric Kohl
8f6865c18a Don't redefine ANSI_STRING, UNICODE_STRING and OBJECT_ATTRIBUTES if the NDK already defines them.
svn path=/trunk/; revision=16283
2005-06-26 11:14:48 +00:00
Eric Kohl
f0365b3d7a Add missing resource function prototypes.
svn path=/trunk/; revision=16282
2005-06-26 11:07:15 +00:00
Alex Ionescu
ee15175e82 Hasta la vista ntdll/napi headers
svn path=/trunk/; revision=16281
2005-06-26 06:27:34 +00:00
Alex Ionescu
e91e67f144 fix diskdump build
svn path=/trunk/; revision=16280
2005-06-26 06:06:51 +00:00
Alex Ionescu
80a245fca0 Kill NTOS headers. So long, and thanks for all the fish
svn path=/trunk/; revision=16279
2005-06-26 05:52:40 +00:00
Alex Ionescu
068dd36e8b make usb miniports not to use old header
svn path=/trunk/; revision=16278
2005-06-26 05:06:38 +00:00
Alex Ionescu
2d4d9762bb make lsass, win32k and vbe/xbox miniports use ndk instead of old headers
svn path=/trunk/; revision=16277
2005-06-26 05:04:12 +00:00
Alex Ionescu
499eae2bd2 Revert accidental commit
svn path=/trunk/; revision=16276
2005-06-26 04:50:07 +00:00
Alex Ionescu
3251827a3d Imitate NT and set some of the private object info for desktop/winsta inside win32k, not inside the kernel, so we don't need to know about win32k's private objects
svn path=/trunk/; revision=16275
2005-06-26 04:49:10 +00:00
Alex Ionescu
c6af94415d Build videoprt with NDK
svn path=/trunk/; revision=16274
2005-06-26 04:00:25 +00:00
Eric Kohl
ae46f5aa6a Hal needs KPCR_BASE
svn path=/trunk/; revision=16273
2005-06-26 01:12:21 +00:00
Eric Kohl
b9345f5cd1 Fix indentation, remove trailing whitespace and sort prototypes.
svn path=/trunk/; revision=16272
2005-06-26 01:08:55 +00:00
Alex Ionescu
c12e487549 build win32k with NDK, finally\!
svn path=/trunk/; revision=16271
2005-06-25 20:05:56 +00:00
Alex Ionescu
a01ddd88cf fix most parts of the build except win32k
svn path=/trunk/; revision=16270
2005-06-25 18:18:01 +00:00
Alex Ionescu
c6e139c501 Add many more structures to NDK which were incorrectly in the w32api IFS
svn path=/trunk/; revision=16269
2005-06-25 18:08:47 +00:00
Alex Ionescu
deb7a80fdd Large partial cleanup of ntoskrnl internal headers, mostly to delete obsoleted or non-useful headers, to reformat some horrible tab, spaces, etc mixups, and to move to NDK some public structures and remove all the include headers so that the standard one can be added. Note the word partial, meaning more will come in order to fully fix the mess.
svn path=/trunk/; revision=16268
2005-06-25 17:01:17 +00:00
Hervé Poussineau
1e4c8ee564 Remove mouse type selection in usetup.
i8042prt driver is always loaded for keyboard and auto-detects the PS/2 mouse (if any)
sermouse driver is loaded if a serial mouse is enumerated by serenum driver

svn path=/trunk/; revision=16267
2005-06-25 16:01:27 +00:00
Alex Ionescu
95f0ca7fdb Build ntoskrnl with NDK, and don't use rosrtl
svn path=/trunk/; revision=16266
2005-06-25 14:04:56 +00:00
Alex Ionescu
a9a36a579f Forgot this, sorry
svn path=/trunk/; revision=16265
2005-06-25 14:03:51 +00:00
Alex Ionescu
4169a5a54b Build secur32 with NDK
svn path=/trunk/; revision=16264
2005-06-25 13:55:24 +00:00
Alex Ionescu
767c5ce44f Fix token structure, add aux_data, fix KeDisconnectInterrupt and add NtBuildNumber (fixes for NDK)
svn path=/trunk/; revision=16263
2005-06-25 05:01:29 +00:00
Magnus Olsen
8a99b51cbf Brandon Turner <turnerb7@msu.edu>) simple check to fix > and | bug with 'rem' I (greatlord / Magnus Olsen) did small change on his patch so it did null terminate the strings right
svn path=/trunk/; revision=16262
2005-06-24 22:52:21 +00:00
Alex Ionescu
5c2b2a05bf Add missing privileges to winddk
svn path=/trunk/; revision=16261
2005-06-24 20:58:18 +00:00
Casper Hornstrup
59605ac1e7 Search current directory first for #include "".
svn path=/trunk/; revision=16260
2005-06-24 19:39:47 +00:00
Hervé Poussineau
5444c47450 Change STATUS error codes to winerror ones
svn path=/trunk/; revision=16259
2005-06-24 18:28:22 +00:00
Hervé Poussineau
a434b1aa6d Dmitry Philippov (shedon@mail.ru): implement GetCommConfig and SetCommConfig
svn path=/trunk/; revision=16258
2005-06-24 18:19:40 +00:00
Thomas Bluemel
469c016da3 - Moved ntdll's atom table implementation to rtl, rewrote it to use proper structures and share the generic implementation between ntoskrnl and ntdll
- Updated the rtl handle table implementation to use proper structures. Reserved handles are not yet supported correctly.

svn path=/trunk/; revision=16257
2005-06-24 18:11:16 +00:00
Alex Ionescu
ff3d5dbe7d Fix rtshared, didn't know about this module
svn path=/trunk/; revision=16256
2005-06-24 16:39:49 +00:00
Alex Ionescu
c78d9b68e1 Build regtess with standard windows header only, not NTOS
svn path=/trunk/; revision=16255
2005-06-24 15:38:29 +00:00
Alex Ionescu
4a320e11d6 Forgot to commit this fix to ntifs
svn path=/trunk/; revision=16254
2005-06-24 15:34:40 +00:00
Alex Ionescu
758ab5ab61 Build HAL with NDK
svn path=/trunk/; revision=16253
2005-06-24 01:37:08 +00:00
Alex Ionescu
7f2ec8aa5d Build eventlog, umpnpmgr, rpcss with NDK
svn path=/trunk/; revision=16252
2005-06-24 01:31:23 +00:00
Hervé Poussineau
64016b704d Add COMMPROP_INITIALIZED constant. It is used in COMMPROP structure, for dwProvSpec1 field
svn path=/trunk/; revision=16251
2005-06-23 21:36:40 +00:00
Hervé Poussineau
130a036ab2 Assign provider-specific fields in IOCTL_SERIAL_GET_PROPERTIES
Big clean up in serial.h header
Fix header text (remove $Id...)

svn path=/trunk/; revision=16250
2005-06-23 20:34:17 +00:00
Steven Edwards
13c65b3f47 convert all of the gdiplus stuff to lowercase
svn path=/trunk/; revision=16249
2005-06-23 18:15:04 +00:00
Magnus Olsen
366a911edc (Brandon Turner) <turnerb7@msu.edu>) Fixed bug to allow MS style wildcards + code clean up added /y and /-y
svn path=/trunk/; revision=16248
2005-06-23 18:12:17 +00:00
Gé van Geldorp
f887cf0f05 Don't draw 0-width HLine
svn path=/trunk/; revision=16247
2005-06-23 17:54:22 +00:00
Alex Ionescu
7143bd0824 Build stub hal with NDK
svn path=/trunk/; revision=16246
2005-06-23 15:58:03 +00:00
Alex Ionescu
96507ffe7c Fix bug in interrupt code
svn path=/trunk/; revision=16245
2005-06-23 15:29:20 +00:00
Steven Edwards
236ce44dac properly break it. correct typo
svn path=/trunk/; revision=16244
2005-06-23 13:31:33 +00:00
Steven Edwards
f6259d7ec4 break the tree for gcc 3.4.1 and gcc 4 at the request of Alex
svn path=/trunk/; revision=16243
2005-06-23 13:26:18 +00:00
Steven Edwards
efbd608bb5 one has to wonder if I am fixing a kernel build.....
svn path=/trunk/; revision=16242
2005-06-23 12:38:13 +00:00
Alex Ionescu
c0d381402e Revert accidental change
svn path=/trunk/; revision=16241
2005-06-23 12:22:32 +00:00
Thomas Bluemel
4f18890314 flag IsTokenRestricted() as @implemented
svn path=/trunk/; revision=16240
2005-06-23 10:34:16 +00:00
Alex Ionescu
1a1adca582 Fix two more build issues caused by greatlod's d3d header change and ndk bug
svn path=/trunk/; revision=16239
2005-06-23 05:07:25 +00:00
Alex Ionescu
5eefe9bdd1 use DDK for rossym
svn path=/trunk/; revision=16238
2005-06-23 04:53:57 +00:00
Alex Ionescu
f8707b368d fix build...sigh...sorry, my ntoskrnl builds with NDK
svn path=/trunk/; revision=16237
2005-06-23 04:52:27 +00:00
Alex Ionescu
ad71bcda91 Fix more ddk/ndk missing defintions
svn path=/trunk/; revision=16236
2005-06-23 04:42:49 +00:00
Alex Ionescu
610b6a4048 Fix build (my fault now :P)
svn path=/trunk/; revision=16235
2005-06-23 03:24:42 +00:00
Alex Ionescu
3e1728b45b Fix some NDK things and missing w32api defines.
svn path=/trunk/; revision=16234
2005-06-23 03:18:20 +00:00
Alex Ionescu
65fd7f2386 Fix build (no, not because of me, casper)
svn path=/trunk/; revision=16233
2005-06-23 01:36:58 +00:00
Steven Edwards
20e1654594 mark IopCsqCancelRoutine as static. Vizzini really does write good code.
svn path=/trunk/; revision=16232
2005-06-22 23:47:53 +00:00
Alex Ionescu
680c995ee1 Fix typo
svn path=/trunk/; revision=16231
2005-06-22 23:12:49 +00:00
Alex Ionescu
705a57e075 Build diskdump with NDK
svn path=/trunk/; revision=16230
2005-06-22 23:12:24 +00:00
Alex Ionescu
d1258e99fa Fix definition of KINTERRUPT in ROS headers so that moving to NDK will be easier. Also fix KeDisconnectInterrupt to return the old state instead of VOID, and re-write the I/O Interrupt code to work with an array and first object for better speed
svn path=/trunk/; revision=16229
2005-06-22 23:10:15 +00:00
Steven Edwards
9925309a13 added msxmldid.h from wine
svn path=/trunk/; revision=16228
2005-06-22 21:55:43 +00:00
Magnus Olsen
e3ed3792ca move ddrawi.h to ddk there it belong
svn path=/trunk/; revision=16227
2005-06-22 21:51:30 +00:00
Thomas Bluemel
204ad68d21 implemented RtlHashUnicodeString and export it in ntdll
svn path=/trunk/; revision=16226
2005-06-22 21:01:13 +00:00
Steven Edwards
9900f1ee91 remove unnneed function declariation
svn path=/trunk/; revision=16225
2005-06-22 20:51:22 +00:00
Maarten Bosma
588a9bc3cb Removed ddk/ddrawi.h because we have it twice, also removed some defines from ddrawint.h that are already in ddrawi.h
svn path=/trunk/; revision=16224
2005-06-22 19:51:01 +00:00
Alex Ionescu
2778f92cc3 Fix build (eh, Casper? :P)
svn path=/trunk/; revision=16223
2005-06-22 19:33:26 +00:00
Thomas Bluemel
07c4b32cdd close extern "C" block for c++ code
svn path=/trunk/; revision=16222
2005-06-22 19:18:21 +00:00
Alex Ionescu
d3a3c52a0a Fix build
svn path=/trunk/; revision=16221
2005-06-22 18:06:47 +00:00
Hartmut Birr
9633616f5b Added PFILE_ALIGNMENT_INFORMATION.
svn path=/trunk/; revision=16220
2005-06-22 18:03:32 +00:00
Maarten Bosma
5276f2c8bb Change NtGdiD3dContextDestroyAll@4 to @0
svn path=/trunk/; revision=16219
2005-06-22 18:02:33 +00:00
Alex Ionescu
2ab26c9f4d Build tcpip with NDK
svn path=/trunk/; revision=16218
2005-06-22 17:58:42 +00:00
Alex Ionescu
9e8e05cf39 Fix one more bug in NDK, and fix w32api headers to use FLOWSPEC structure inside NDIS.h, and use qos.h instead of winsock2, and implement FLOWSPEC in qos.h, moving it outside from winsock2.
svn path=/trunk/; revision=16217
2005-06-22 17:58:19 +00:00
Hartmut Birr
b5a67666e6 - Initialized Reply with NULL for the first call to NtReplyWaitReceivePort.
- Removed LpcReply because it wasn't really used.

svn path=/trunk/; revision=16216
2005-06-22 17:43:59 +00:00
Magnus Olsen
73abbbd77e Brandon Turner <turnerb7@msu.edu> Added exclusive deletion "del * -abc.txt -text*.txt"
svn path=/trunk/; revision=16215
2005-06-22 17:39:10 +00:00
Alex Ionescu
164b25c391 Fix some NDK issues when attempting to use it from kmode, and fix some winddk/ntifs inconsistencies aswell (move PFILE_QUOTA_INFORMATION and remove all RtlRange functions from the DDK, plus add PPEB)
svn path=/trunk/; revision=16214
2005-06-22 05:04:02 +00:00
Alex Ionescu
3e604d23e7 Large change to modify NTDLL'S CSR Functions to be compatible with NT. They are external and we should at least try to match the number of arguments (one vs eight? come on!). Because this is also the direction that Emanuele wants to be taking, the whole external calling interface was modified to be more compatible with NT (although internally it still isn't, and does not have a reason to be). API Names are now generated by a macro from the Server ID, like Emanuele and I noticed from traces, and I've entirely removed the concept of a reply structure. CSRSS uses full-duplex one-way structures, not dual-strutures (this would've been incompatible with the external interface anyways). I don't seem to have introduced any new bugs (console-ROS works great for me, as does the GUI), but there is still a chance some obscure bug might happen, so please bear with me, I had to hand-edit over 250 calls. Also, this now allows full removal of ntdll headers and the next commits will clean this up
svn path=/trunk/; revision=16213
2005-06-22 04:02:32 +00:00
KJK::Hyperion
321df5d69c Partial merge from the ROX-U branch (various fixes for Visual C++ compilation, see logs for r16198 and r16208)
svn path=/trunk/; revision=16212
2005-06-21 23:42:58 +00:00
Magnus Olsen
1af2b69826 add error code for file not found it was missing on one place
svn path=/trunk/; revision=16211
2005-06-21 22:07:44 +00:00
Hervé Poussineau
a6d58d5291 Silent debug messages
svn path=/trunk/; revision=16210
2005-06-21 21:35:07 +00:00
Maarten Bosma
c9d742f6cf Martin Rottensteiner (2005only@pianonote.at):
- set errorlevel to 9009 if command not found
- implemented exit /b # in batchfiles

svn path=/trunk/; revision=16209
2005-06-21 19:17:49 +00:00
Maarten Bosma
8e3623c1af Copy ddk ddrawi.h to include since it's more uptodate.
svn path=/trunk/; revision=16207
2005-06-21 17:16:25 +00:00
Gé van Geldorp
e3f555a8c9 Patch by Hartmut Birr
Work around what seems to be a bug in GCC for optimized builds. See
http://reactos.com:8080/archives/public/ros-dev/2005-June/003842.html

svn path=/trunk/; revision=16206
2005-06-21 16:35:41 +00:00
Alex Ionescu
3596d2a339 Build kernel32, ntdll, csrss fully with NDK and remove ntdll header usage
svn path=/trunk/; revision=16205
2005-06-21 04:52:46 +00:00
Alex Ionescu
e3cfe86657 Use correct TlsCount/LoadCount definition and fix incorrect usage i code
svn path=/trunk/; revision=16204
2005-06-21 04:28:03 +00:00
Alex Ionescu
77f673dd82 Use LDR_DATA_TABLE_ENTRY instead of LDR_MODULE. the former is the actual structure. would be wise to fix the defs too.
svn path=/trunk/; revision=16203
2005-06-21 04:10:45 +00:00
Alex Ionescu
1595459dbc Last build fix...sorry
svn path=/trunk/; revision=16202
2005-06-21 02:58:22 +00:00
Alex Ionescu
b5e1fdb37a Fix build
svn path=/trunk/; revision=16201
2005-06-21 02:47:55 +00:00
Alex Ionescu
58f27e918c Add uncleaned start of internal ntdll header
svn path=/trunk/; revision=16200
2005-06-21 02:11:45 +00:00
Alex Ionescu
3b2016d0ac Add new header for native user-mode functios inside the NT library inside the NDK, it will end up replacing most of the exported parts of the ntdll headers. It's not used yet as it would conflict, I added a temporary guard for that. Also added many more types to rtlfuncs.h so that it's almost entirely complete, and took out non rtl-stuff and put it into the user-mode NT header
svn path=/trunk/; revision=16199
2005-06-21 02:08:42 +00:00
Alex Ionescu
1d7902f557 Make scsi header um friendly
svn path=/trunk/; revision=16197
2005-06-20 22:54:01 +00:00
Alex Ionescu
4650be627f Remove rosrtl usage from usetup
svn path=/trunk/; revision=16196
2005-06-20 22:51:54 +00:00
Alex Ionescu
ce068ea890 Build usetup with NDK
svn path=/trunk/; revision=16195
2005-06-20 22:49:45 +00:00
Filip Navara
2e4d4d6dfd Remove some non-__USE_W32API guarded blocks.
svn path=/trunk/; revision=16194
2005-06-20 22:48:50 +00:00
Alex Ionescu
8b83fb933a Build winlogon with NDK
svn path=/trunk/; revision=16193
2005-06-20 22:19:18 +00:00
Alex Ionescu
d8de94af8a Build taskmgr with NDK
svn path=/trunk/; revision=16192
2005-06-20 22:15:59 +00:00
Alex Ionescu
725169d745 Build autochk with NDK
svn path=/trunk/; revision=16191
2005-06-20 21:50:02 +00:00
Filip Navara
be5ad51996 Fix build.
svn path=/trunk/; revision=16190
2005-06-20 21:49:00 +00:00
Alex Ionescu
e04c28b61f Build dhcp with ndk
svn path=/trunk/; revision=16189
2005-06-20 21:45:19 +00:00
Alex Ionescu
4d21e1f410 Build format with NDK
svn path=/trunk/; revision=16188
2005-06-20 21:43:14 +00:00
Alex Ionescu
2c52e31b61 Build ntvdm with NDK
svn path=/trunk/; revision=16187
2005-06-20 21:42:52 +00:00
Filip Navara
d373bd32e7 Build GDI32 with NDK and without DDK.
svn path=/trunk/; revision=16186
2005-06-20 21:35:05 +00:00
Alex Ionescu
9eea30f8b3 Build smss with NDK
svn path=/trunk/; revision=16185
2005-06-20 21:16:59 +00:00
Alex Ionescu
c618c35523 Build services with NDK
svn path=/trunk/; revision=16183
2005-06-20 21:04:03 +00:00
Alex Ionescu
5cc3617a10 Build sm with NDK
svn path=/trunk/; revision=16182
2005-06-20 21:03:51 +00:00
Filip Navara
b97fb9c707 Make winddi.h UM-friendly.
svn path=/trunk/; revision=16181
2005-06-20 21:03:41 +00:00
Hartmut Birr
f4d5dc8eb3 Fixed a bug within the calculation of the memory load.
svn path=/trunk/; revision=16180
2005-06-20 20:27:10 +00:00
Alex Ionescu
1bb602a345 Don't use DDK, use NDK for wshirda and ws2help
svn path=/trunk/; revision=16179
2005-06-20 20:26:14 +00:00
Alex Ionescu
0669fda144 Don't use ntdll headers in crt, use ndk
svn path=/trunk/; revision=16178
2005-06-20 20:22:54 +00:00
Alex Ionescu
de322e6992 Build iphlpapi with NDK instead of DDK
svn path=/trunk/; revision=16177
2005-06-20 20:20:40 +00:00
Alex Ionescu
26fca9d4cf Use NDK instead of DDK
svn path=/trunk/; revision=16176
2005-06-20 20:13:58 +00:00
Alex Ionescu
f239820920 jingle bells batman smells, robin laid an egg (build rosrtl with NDK)
svn path=/trunk/; revision=16175
2005-06-20 20:07:52 +00:00
Alex Ionescu
f9eab6bf5e Syssetup has fallen to the dark side
svn path=/trunk/; revision=16174
2005-06-20 19:58:43 +00:00
Alex Ionescu
7fdb1a2266 Build userenv and samlib with NDK
svn path=/trunk/; revision=16173
2005-06-20 19:50:52 +00:00
Alex Ionescu
a1a5cdb7ca Buid vfat(x)lib with NDK
svn path=/trunk/; revision=16172
2005-06-20 19:46:09 +00:00
Alex Ionescu
aa1e7d31e8 Build psapi with NDK
svn path=/trunk/; revision=16171
2005-06-20 19:38:25 +00:00
Alex Ionescu
0bbb2a98cd build lsasrv with NDK
svn path=/trunk/; revision=16170
2005-06-20 19:34:39 +00:00
Alex Ionescu
b19d74062e Build smdll with NDK
svn path=/trunk/; revision=16169
2005-06-20 19:33:08 +00:00
Alex Ionescu
0856013938 Build ws2_32 with NDK
svn path=/trunk/; revision=16168
2005-06-20 19:30:55 +00:00
Alex Ionescu
07d22c372d Compile msafd with NDK
svn path=/trunk/; revision=16167
2005-06-20 19:28:45 +00:00
Alex Ionescu
4cf87b40e7 Build secur32 with NDK
svn path=/trunk/; revision=16166
2005-06-20 19:19:23 +00:00
Hartmut Birr
747c64b7c4 Moved the TRACE_LDR macro from ntdll.h to utils.c.
svn path=/trunk/; revision=16165
2005-06-20 19:18:35 +00:00
Alex Ionescu
ae955c39ed Build epsapi with NDK
svn path=/trunk/; revision=16164
2005-06-20 19:14:08 +00:00
Alex Ionescu
c3151ba005 Build dnsapi with NDK
svn path=/trunk/; revision=16163
2005-06-20 19:05:25 +00:00
Alex Ionescu
d53d55734a build smlib with NDK
svn path=/trunk/; revision=16162
2005-06-20 19:02:23 +00:00
Alex Ionescu
44b8b1697a Remove rosrtl from advapi
svn path=/trunk/; revision=16161
2005-06-20 18:58:56 +00:00
Alex Ionescu
cf9968925b Switch Advapi32 to NDK
svn path=/trunk/; revision=16160
2005-06-20 18:55:05 +00:00
Alex Ionescu
29075cd391 Add missing types to NDK
svn path=/trunk/; revision=16159
2005-06-20 18:54:47 +00:00
Martin Fuchs
0f3a2ad610 sync with Wine's repository
svn path=/trunk/; revision=16158
2005-06-20 18:48:32 +00:00
Alex Ionescu
88b8879367 Compile user32 with NDK, clean up its headers, and separate it from the intenral win32k stuff
svn path=/trunk/; revision=16157
2005-06-20 18:21:07 +00:00
Martin Fuchs
8e0a6b7b07 Sync with Wine repo
svn path=/trunk/; revision=16156
2005-06-20 16:53:47 +00:00
Martin Fuchs
a609b028a1 Stefan Huehner <stefan@huehner.org>:
Remove some -Wstrict-prototypes warnings.

svn path=/trunk/; revision=16155
2005-06-20 16:52:02 +00:00
Maarten Bosma
e133ad2f81 g++ seams to have a problem with this dummy union names.
svn path=/trunk/; revision=16154
2005-06-20 16:32:42 +00:00
Filip Navara
7bf3a79d15 Remove Jamfiles.
svn path=/trunk/; revision=16153
2005-06-20 14:30:44 +00:00
Filip Navara
f266cbb1c2 Fix warnings.
svn path=/trunk/; revision=16152
2005-06-20 14:23:13 +00:00
Filip Navara
d69a2a31dd Fix a cut & paste error.
svn path=/trunk/; revision=16151
2005-06-20 14:08:06 +00:00
Filip Navara
81175de9c1 Fix warnings.
svn path=/trunk/; revision=16150
2005-06-20 13:59:40 +00:00
Filip Navara
6479d4526a Forgot this file in r16147.
svn path=/trunk/; revision=16149
2005-06-20 13:54:52 +00:00
Filip Navara
3b0038292f Remove Jamfiles.
svn path=/trunk/; revision=16148
2005-06-20 13:43:26 +00:00
Filip Navara
cdad35b774 Fix warnings and remove Jamfiles.
svn path=/trunk/; revision=16147
2005-06-20 13:43:05 +00:00
Filip Navara
d160d80677 Fix warnings.
svn path=/trunk/; revision=16146
2005-06-20 13:17:21 +00:00
Filip Navara
aa82a6a072 The DK directory doesn't seem to be used anymore.
svn path=/trunk/; revision=16145
2005-06-20 12:10:46 +00:00
Filip Navara
e0df17c6fd Compile CSRSS and WIN32CSR with NDK headers.
svn path=/trunk/; revision=16144
2005-06-20 11:56:10 +00:00
Gé van Geldorp
59057f2e70 Exclusively lock surface bits before reading or writing them
svn path=/trunk/; revision=16143
2005-06-20 08:31:48 +00:00
Filip Navara
113cab2be5 Fix definition of LPC_MESSAGE_BASE_SIZE.
svn path=/trunk/; revision=16142
2005-06-20 07:18:20 +00:00
Filip Navara
21616080f6 Remove InitializeMessageHeader definition.
svn path=/trunk/; revision=16141
2005-06-20 07:16:51 +00:00
Filip Navara
31ad5f02a9 Fix the definion of SharedUserData.
svn path=/trunk/; revision=16140
2005-06-20 07:06:41 +00:00
Hervé Poussineau
57074db1aa Implement IOCTL_USB_GET_NODE_CONNECTION_NAME, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME
Fix indices in IOCTL_USB_GET_NODE_CONNECTION_INFORMATION

svn path=/trunk/; revision=16139
2005-06-20 05:54:19 +00:00
Alex Ionescu
0ee8822197 Major cleanup to rtlfuncs.h. Not yet perfect but much better organized.
svn path=/trunk/; revision=16138
2005-06-20 05:36:32 +00:00
Alex Ionescu
4b83cb1f77 Cleanup kernel usage to decrease compilation time/memory
svn path=/trunk/; revision=16136
2005-06-20 04:30:23 +00:00
Alex Ionescu
eb67c61944 Remove rosrtl string macros
svn path=/trunk/; revision=16135
2005-06-20 04:18:03 +00:00
Alex Ionescu
497256b40e Build kernel32 with NDK
svn path=/trunk/; revision=16134
2005-06-20 04:07:49 +00:00
Alex Ionescu
d98066b2aa Final NDK fixes for kernel32
svn path=/trunk/; revision=16133
2005-06-20 04:07:34 +00:00
Alex Ionescu
4a0a216d3e Apply kjk's change to thread.c too
svn path=/trunk/; revision=16132
2005-06-20 04:07:19 +00:00
Alex Ionescu
3bfd20f396 Some NDK Fixes, kernel32 almost compiles
svn path=/trunk/; revision=16131
2005-06-20 03:55:42 +00:00
KJK::Hyperion
8cd2554cff Converted kernel32 process creation to use PSEH (untested change to help Alex)
svn path=/trunk/; revision=16130
2005-06-20 03:42:05 +00:00
Alex Ionescu
f5e002e1c9 Fixed incorrect SetNamedPipeHandleState implementation to use the actual APIs/Structures it should and added one of the missing ones to NTIFS.
svn path=/trunk/; revision=16129
2005-06-20 01:52:47 +00:00
Alex Ionescu
aaad0af903 Add missing stuff to NDK
svn path=/trunk/; revision=16128
2005-06-19 23:59:40 +00:00
Alex Ionescu
16c356bfa1 Ditto for HAL
svn path=/trunk/; revision=16127
2005-06-19 22:53:49 +00:00
Alex Ionescu
b4cb154b4a Blight is cool. oh, right..this is a commt message. err.. oh. include debug.h per-file isntead of globally, or else this breaks NDEBUG
svn path=/trunk/; revision=16126
2005-06-19 22:50:59 +00:00
Filip Navara
94b818d7c0 TIME -> LARGE_INTEGER
svn path=/trunk/; revision=16125
2005-06-19 22:32:51 +00:00
Hervé Poussineau
697e997b8f Implement IRP_MJ_CLEANUP for UHCI controller
svn path=/trunk/; revision=16124
2005-06-19 22:19:11 +00:00
Filip Navara
8098dc0a97 - Don't include ntddk.h from most of the DDK headers and move the includes out of the "extern C" blocks.
- Fix order of STDCALL in few callback defintions.
- Get the sources to build again with these changes.

svn path=/trunk/; revision=16123
2005-06-19 22:13:41 +00:00
Hervé Poussineau
9bd5178ad2 Implement IOCTL_GET_HCD_DRIVERKEY_NAME
Better check for arguments in IOCTL_*
Let IOCTL_USB_GET_ROOT_HUB_NAME use the right structure type
Initialize wrapper around linux code after setting the device extension field

svn path=/trunk/; revision=16122
2005-06-19 22:11:09 +00:00
Alex Ionescu
b76b475c32 Build RTL with NDK
svn path=/trunk/; revision=16121
2005-06-19 22:05:50 +00:00
Alex Ionescu
aec8d2f143 Move internal rtlp functions out of ntos and into internal rosrtl header
svn path=/trunk/; revision=16120
2005-06-19 22:05:18 +00:00
Alex Ionescu
1754d20379 Add free to libsupp
svn path=/trunk/; revision=16119
2005-06-19 21:50:05 +00:00
Alex Ionescu
d3e93a6629 Add include to rosrtl where needed
svn path=/trunk/; revision=16118
2005-06-19 21:40:29 +00:00
Alex Ionescu
9deb8137ef Fix cshort definition
svn path=/trunk/; revision=16117
2005-06-19 21:39:58 +00:00
Alex Ionescu
ef09428e85 Add libsupp.h for rtl's Kernel Allocation functions
svn path=/trunk/; revision=16116
2005-06-19 21:37:01 +00:00
Alex Ionescu
38765d4930 Add missing security types in winnt.h
svn path=/trunk/; revision=16115
2005-06-19 21:35:57 +00:00
Alex Ionescu
a43ea85ae0 User helper header and don't use RTLROS string macros naymore
svn path=/trunk/; revision=16114
2005-06-19 21:08:39 +00:00
Alex Ionescu
4d69a0fddb Fix Build
svn path=/trunk/; revision=16113
2005-06-19 21:03:41 +00:00
Filip Navara
61eed1a9da Fxi build.
svn path=/trunk/; revision=16112
2005-06-19 20:56:11 +00:00
Alex Ionescu
299cedf334 Use RTL_CONSTANT_STRING instead of RtlRos macro
svn path=/trunk/; revision=16111
2005-06-19 20:43:13 +00:00
Alex Ionescu
3b65c45a7c Build NTDLL with NDK
svn path=/trunk/; revision=16110
2005-06-19 20:28:20 +00:00
Alex Ionescu
d3d66f5e68 Final NDK fixes for ntdll
svn path=/trunk/; revision=16109
2005-06-19 20:18:30 +00:00
Filip Navara
514f6f4626 Remove PNP_VETO_TYPE from winddk.h.
svn path=/trunk/; revision=16108
2005-06-19 20:09:32 +00:00
Alex Ionescu
448fd2a82a More NDK fixes, remove duplicated debug functions from ntdll, use rosrtl header where neded in ntdll.
svn path=/trunk/; revision=16107
2005-06-19 20:01:07 +00:00
Filip Navara
fd45cff559 Fix packing.
svn path=/trunk/; revision=16106
2005-06-19 19:56:01 +00:00
Alex Ionescu
3ff128077e More NDK fixes/additions
svn path=/trunk/; revision=16105
2005-06-19 19:36:05 +00:00
Alex Ionescu
93d9bcad1a More NDK fixes (user-mode NDK now works) and guard some stuff in include/ntdll so that ntdll can be build with NDK, but so that other apps not yet using it, but using those headers, can also build
svn path=/trunk/; revision=16104
2005-06-19 19:15:46 +00:00
James Tabor
7d84d6b837 Adding ps.exe to build process.
svn path=/trunk/; revision=16103
2005-06-19 18:54:02 +00:00
James Tabor
b3bc018212 Adding ps.exe to build process.
svn path=/trunk/; revision=16102
2005-06-19 18:53:19 +00:00
Filip Navara
ac4f85a89e Forgot to commit this file in r16097.
svn path=/trunk/; revision=16101
2005-06-19 18:34:35 +00:00
Alex Ionescu
1b74c03fb1 Major cleanup of User-Mode NDK
svn path=/trunk/; revision=16100
2005-06-19 18:21:58 +00:00
Filip Navara
8b3da072dd Cleanup header usage in USER32.
svn path=/trunk/; revision=16099
2005-06-19 18:06:53 +00:00
Filip Navara
3dcd5f1ff6 Remove duplicate header.
svn path=/trunk/; revision=16098
2005-06-19 17:34:05 +00:00
Filip Navara
f2ff7df489 (Re)move USER32 headers from include/user32.
svn path=/trunk/; revision=16097
2005-06-19 17:27:44 +00:00
Filip Navara
8625b6ac08 Remove duplicate headers.
svn path=/trunk/; revision=16096
2005-06-19 16:30:52 +00:00
Filip Navara
2954ec2db0 Better header redefiniton guards.
svn path=/trunk/; revision=16095
2005-06-19 15:40:47 +00:00
Filip Navara
ae8bd99934 - Add definition of DRIVE_LAYOUT_INFORMATION_EX.
- Move CLS defintions from winddk.h to ntnls.h.
- Move EVENT_TRACE_HEADER defintion from winddk.h to evntrace.h.

svn path=/trunk/; revision=16094
2005-06-19 15:27:10 +00:00
Hervé Poussineau
d4719c91ec Implement IRP_MN_QUERY_DEVICE_RELATIONS for USB hubs
Implement IRP_MN_QUERY_ID for devices enumerated by USB hubs

svn path=/trunk/; revision=16093
2005-06-19 14:15:39 +00:00
Magnus Olsen
30eee0c5d1 revert my lattes change some part of head did break
sorry all. 

svn path=/trunk/; revision=16092
2005-06-19 14:12:59 +00:00
Casper Hornstrup
a5e4e00e8a Count only scheduled time when running performance tests
svn path=/trunk/; revision=16091
2005-06-19 12:41:22 +00:00
Magnus Olsen
2caba7c355 add struct DDRAWI_DIRECTDRAW_GBL
svn path=/trunk/; revision=16090
2005-06-19 12:14:31 +00:00
Magnus Olsen
e661bfdc12 Correct the DD_GETDRIVERINFODATA struct it did missing a pointer to DDRAWI_DIRECTDRAW_GBL struct. Some need really check this file if more mistake exists
svn path=/trunk/; revision=16089
2005-06-19 12:13:57 +00:00
Magnus Olsen
17c0f2829a add TAG macro
svn path=/trunk/; revision=16088
2005-06-19 10:10:34 +00:00
Hartmut Birr
499a2712a9 Initialized the system call entry independent of the real type of SystemCall.
svn path=/trunk/; revision=16087
2005-06-19 09:48:14 +00:00
Filip Navara
fbf1722197 Couple of build fixes.
svn path=/trunk/; revision=16086
2005-06-19 09:07:44 +00:00
Filip Navara
068cf10896 Add TAG macro definition.
svn path=/trunk/; revision=16085
2005-06-19 08:21:35 +00:00
Filip Navara
b63e292fbd Add TAG macro definition.
svn path=/trunk/; revision=16084
2005-06-19 08:20:08 +00:00
Filip Navara
d864df4b3b Move the TAG define.
svn path=/trunk/; revision=16083
2005-06-19 08:15:10 +00:00
Filip Navara
887716169a Add TAG macro definition.
svn path=/trunk/; revision=16082
2005-06-19 08:14:18 +00:00
Filip Navara
b76c3856ee Move the TAG define.
svn path=/trunk/; revision=16081
2005-06-19 08:05:01 +00:00
Alex Ionescu
6048617aab Some more NDK fixes
svn path=/trunk/; revision=16080
2005-06-19 07:41:35 +00:00
Alex Ionescu
1311a0191c Fix rtl/rossym
svn path=/trunk/; revision=16079
2005-06-19 07:15:07 +00:00
Alex Ionescu
469fa69ab7 Add NtcurrentThread, ALTERNATIVE_ARCHITECTURE_TYPE, KSYSTEM_TIME, KUSER_SHARED_DATA, REG_CREATED_NEW_KEY, REG_OPENED_EXISTING_KEY, KeRaiseIrqlToSynchLevel to DDK. Remove HANDLE_TABLE_ENTRY_INFO and HANDLE_TABLE_ENTRY from NTIFS. Add NT_PRODUCT_TYPE
svn path=/trunk/; revision=16078
2005-06-19 07:11:49 +00:00
Alex Ionescu
10c1c40139 Fix some ntoskrnl things, like using Rtl instead of RosRtl, and undefining ROUND macros
svn path=/trunk/; revision=16077
2005-06-19 07:11:38 +00:00
Filip Navara
e960d42247 Use RTL_CONSTANT_STRING instead of ROSRTL macros.
svn path=/trunk/; revision=16076
2005-06-19 07:07:52 +00:00
Alex Ionescu
9d04f9a976 More NDK Fixes
svn path=/trunk/; revision=16075
2005-06-19 07:03:18 +00:00
Alex Ionescu
a6c04adbb2 Fix building issues caused by previous patch
svn path=/trunk/; revision=16074
2005-06-19 04:49:14 +00:00
Alex Ionescu
cbe3dc72cb Move Exported functions away from internal/ke.h, move exported data from internal/ex.h, add internal structures to internal/ifs.h, include ntdddisk.h in internal/xhal.h for access to PDRIVE_LAYOUT_INFORMATION, remove DDK function from internal/nls.h, remove KTRAP_FRAME from internal/i386/ke.h, add some more temporary types to krnltypes.h, protect PNP_VETO_TYPE, move EVENT_TRACE_HEADER to DDK, guard disk.h properly, correct DRIVE_LAYOUT_INFORMATION typedef in DDK, add PNP_VETO_TYPE, NLSTABLEINFO, CPTABLEINFO, remove KDPC_DATA, PP_LOOKASIDE_LIST. remove PROCESSOR_POWER_STATE from ntpoapi, remove MAILSLOT_CREATE_PARAMETERS, NAMED_PIPE_CREATE_PARAMETERS, IO_COMPLETION_INFORMATION_CLASS, PAGEFAULT_HISTORY, SECTION_XXX_INFORMATION, RtlSelfRelativeToAbsoluteSD, ZwQuerySection/Object, ZwQuerySystemInformation, ZwSetInformationObject, ZwSetSystemInformation from IFS
svn path=/trunk/; revision=16073
2005-06-19 03:55:48 +00:00
Alex Ionescu
428572a138 Move Exported functions away from internal/ke.h, move exported data from internal/ex.h, add internal structures to internal/ifs.h, include ntdddisk.h in internal/xhal.h for access to PDRIVE_LAYOUT_INFORMATION, remove DDK function from internal/nls.h, remove KTRAP_FRAME from internal/i386/ke.h, add some more temporary types to krnltypes.h, protect PNP_VETO_TYPE, move EVENT_TRACE_HEADER to DDK, guard disk.h properly, correct DRIVE_LAYOUT_INFORMATION typedef in DDK, add PNP_VETO_TYPE, NLSTABLEINFO, CPTABLEINFO, remove KDPC_DATA, PP_LOOKASIDE_LIST. remove PROCESSOR_POWER_STATE from ntpoapi, remove MAILSLOT_CREATE_PARAMETERS, NAMED_PIPE_CREATE_PARAMETERS, IO_COMPLETION_INFORMATION_CLASS, PAGEFAULT_HISTORY, SECTION_XXX_INFORMATION, RtlSelfRelativeToAbsoluteSD, ZwQuerySection/Object, ZwQuerySystemInformation, ZwSetInformationObject, ZwSetSystemInformation from IFS
svn path=/trunk/; revision=16072
2005-06-19 03:55:34 +00:00
Alex Ionescu
0af7b6f7a0 Many fixes to NDK
svn path=/trunk/; revision=16071
2005-06-19 03:25:33 +00:00
Alex Ionescu
5a4296bcec Remove PAGED_CODE, PAGED_CODE_RTL and RTL_ONSTANT_STRING from ntoskrnl.h. The first and last are in DDK, and the second is not used in the kernel and already defined
svn path=/trunk/; revision=16070
2005-06-19 01:10:08 +00:00
Filip Navara
5be76fa181 Use RTL_CONSTANT_STRING instead of ROSRTL macros.
svn path=/trunk/; revision=16069
2005-06-19 00:28:46 +00:00
Filip Navara
cc03f70b55 Use RTL_CONSTANT_STRING instead of ROSRTL macros.
svn path=/trunk/; revision=16068
2005-06-19 00:21:54 +00:00
Filip Navara
7971e8425b - Use regular PE structures in NTOSKRNL/NTDLL/DISKDUMP.
- Add WDMGUID library.
- Get rid of few more headers.

svn path=/trunk/; revision=16067
2005-06-19 00:06:08 +00:00
Alex Ionescu
c09b52bf01 Add NDK 1.00-pre. Needs some TLC in umtypes.h and a lot of fixes. Not used anywhere yet.
svn path=/trunk/; revision=16066
2005-06-18 23:33:40 +00:00
Magnus Olsen
46f26a073b make inline asm -O3 compatible (remove L1 and L2 label) thx blight and alex to explain how to do that.
svn path=/trunk/; revision=16065
2005-06-18 22:54:12 +00:00
Filip Navara
bc47c238df Remove duplicate definition of KdPrintEx.
svn path=/trunk/; revision=16064
2005-06-18 22:06:54 +00:00
Magnus Olsen
5e0373034a make gcc stop nag about uninitialized value in 114: and make -O3 working
svn path=/trunk/; revision=16063
2005-06-18 21:55:59 +00:00
Filip Navara
dc337def98 Get rid of ROS DDK SCSI headers (forgot these files in r16060).
svn path=/trunk/; revision=16061
2005-06-18 21:02:59 +00:00
Filip Navara
fd44a4b514 Get rid of ROS DDK SCSI headers.
svn path=/trunk/; revision=16060
2005-06-18 20:55:09 +00:00
Gé van Geldorp
39da2fef47 Thanks to GreatLord for spotting that we shouldn't access pixels outside the
source surface in EngBitBlt.

svn path=/trunk/; revision=16059
2005-06-18 20:29:31 +00:00
Filip Navara
91a2889e07 - Convert mouclass and sermouse to use official DDK prototypes.
- Get rid of the old ROS DDK headers.

svn path=/trunk/; revision=16058
2005-06-18 20:25:08 +00:00
Gé van Geldorp
95d1b8ae62 Use correct dest rect when preventing copy outside source surf
svn path=/trunk/; revision=16057
2005-06-18 19:53:49 +00:00
Filip Navara
434303caa3 Don't include internal headers.
svn path=/trunk/; revision=16056
2005-06-18 19:30:47 +00:00
Filip Navara
8b43bd8c4c Add __ASM__ guard.
svn path=/trunk/; revision=16055
2005-06-18 19:30:15 +00:00
Filip Navara
31b7f64f58 Fix build. :/
svn path=/trunk/; revision=16054
2005-06-18 19:13:29 +00:00
Filip Navara
52f8761d3a Use W32API for NTOSKRNL.
svn path=/trunk/; revision=16053
2005-06-18 18:32:29 +00:00
Filip Navara
ff246534c9 Fix build.
svn path=/trunk/; revision=16052
2005-06-18 17:22:21 +00:00
Filip Navara
fb0959e85a - Move few non-DDK types from ROS DDK to NTOS headers.
- Fix some __USE_W32API guards.


svn path=/trunk/; revision=16051
2005-06-18 17:17:52 +00:00
Filip Navara
4d14d7da13 Define DRVO_UNLOAD_INVOKED, DRVO_LEGACY_DRIVER, DRVO_BUILTIN_DRIVER, DRVO_REINIT_REGISTERED, DRVO_INITIALIZED, DRVO_BOOTREINIT_REGISTERED and DRVO_LEGACY_RESOURCES. Thanks Alex.
svn path=/trunk/; revision=16050
2005-06-18 16:56:41 +00:00
Filip Navara
bb40279864 Move non-DDK Ps* function prototypes and types from ROS DDK to NTOS headers.
svn path=/trunk/; revision=16049
2005-06-18 16:53:34 +00:00
Filip Navara
a7753f898e Move non-DDK Se* function prototypes and types from ROS DDK to NTOS headers.
svn path=/trunk/; revision=16048
2005-06-18 16:21:46 +00:00
Filip Navara
c818943efa Move InsertAscendingListFIFO, InsertDescendingListFIFO, InsertAscendingList and InsertDescendingList out of the __USE_W32API guarded region.
svn path=/trunk/; revision=16047
2005-06-18 15:58:39 +00:00
Filip Navara
2d6c9998be - Move non-DDK HAL function prototypes from ROS DDK to NTOS headers.
svn path=/trunk/; revision=16046
2005-06-18 15:55:23 +00:00
Filip Navara
73d83fbb2b Fix build.
svn path=/trunk/; revision=16045
2005-06-18 15:50:23 +00:00
Alex Ionescu
7bbb54b0e7 Fix XML bug in hal makefiles
svn path=/trunk/; revision=16044
2005-06-18 15:24:30 +00:00
Filip Navara
0f030a82b0 - Move non-DDK Ke* function prototypes from ROS DDK to NTOS headers.
- Fix calling convention for KeI386* functions.

svn path=/trunk/; revision=16043
2005-06-18 15:15:25 +00:00
Alex Ionescu
99cc88158b Use generic HAL header
svn path=/trunk/; revision=16040
2005-06-18 14:30:09 +00:00
Alex Ionescu
f8d053290e Build Generic HAL with w32api
svn path=/trunk/; revision=16039
2005-06-18 14:29:31 +00:00
Alex Ionescu
06e00cb9c9 Build XBOX HAL with w32api
svn path=/trunk/; revision=16038
2005-06-18 14:29:17 +00:00
Alex Ionescu
762e020a20 Build UP HAL with w32api
svn path=/trunk/; revision=16037
2005-06-18 14:28:55 +00:00
Alex Ionescu
3e334c65fc Build MP HAL with w32api
svn path=/trunk/; revision=16036
2005-06-18 14:28:28 +00:00
Alex Ionescu
a5579f945f Build stub HAL with w32api
svn path=/trunk/; revision=16035
2005-06-18 14:27:44 +00:00
Alex Ionescu
01251016ad Remove weird header and add a missing prototype in halfuncs.h
svn path=/trunk/; revision=16034
2005-06-18 14:26:22 +00:00
Alex Ionescu
eb4f82ce4d Remove IoAdapterObjectType defintion, it doesn't belong in public headers
svn path=/trunk/; revision=16033
2005-06-18 14:10:28 +00:00
Filip Navara
cc6150fb29 Fix SMP version of ASSERT and assert.
svn path=/trunk/; revision=16032
2005-06-18 14:05:56 +00:00
Filip Navara
14b69747a2 Remove duplicate definition of EVENT_QUERY_STATE.
svn path=/trunk/; revision=16031
2005-06-18 13:15:07 +00:00
Filip Navara
6a7e9f4bf7 Correctly pack the KIPCR structure.
svn path=/trunk/; revision=16030
2005-06-18 12:56:11 +00:00
Filip Navara
4fd0801d50 Fix position of the STDCALL keyword. Spotted by KJK::Hyperion.
svn path=/trunk/; revision=16029
2005-06-18 12:55:02 +00:00
Filip Navara
186c8b72d1 ntapi.h:
- Define LANGID and fix definition of PLANGID.
- Define PVM_COUNTERS, SYSTEM_CACHE_INFORMATION and SYSTEM_INTERRUPT_INFORMATION.
- Match the ROS version of LPC_MESSAGE (the structure itself should be named PORT_MESSAGE and belongs to ntifs.h).
- Move KEY_SET_INFORMATION_CLASS definiton to winddk.h.
- Make the first parameter of NtAllocateUuids PULARGE_INTEGER.
- Declare NtSetUuidSeed.
- Fix definition of ATOM_INFORMATION_CLASS and ATOM_BASIC_INFORMATION to match ReactOS versions.
winddk.h:
- Define NTHALAPI and use it to mark HAL exports instead of NTOSAPI.
- Define PADAPTER_OBJECT, EVENT_QUERY_STATE, EVENT_MODIFY_STATE, EVENT_ALL_ACCESS, SEMAPHORE_QUERY_STATE, SEMAPHORE_MODIFY_STATE, SEMAPHORE_ALL_ACCESS, IRP_QUOTA_CHARGED, IRP_ALLOCATED_MUST_SUCCEED, IRP_ALLOCATED_FIXED_SIZE, IRP_LOOKASIDE_ALLOCATION, HalDispatchTableVersion, HalQuerySystemInformation, HalSetSystemInformation, HalQueryBusSlots, HalDeviceControl, HalIoAssignDriveLetters, HalIoReadPartitionTable, HalIoSetPartitionInformation, HalIoWritePartitionTable, HalReferenceHandlerForBus, HalReferenceBusHandler, HalDereferenceBusHandler, IO_TYPE_ADAPTER, IO_TYPE_CONTROLLER, IO_TYPE_DEVICE, IO_TYPE_DRIVER,
IO_TYPE_FILE, IO_TYPE_IRP, IO_TYPE_MASTER_ADAPTER, IO_TYPE_OPEN_PACKET,
IO_TYPE_TIMER, IO_TYPE_VPB, IO_TYPE_ERROR_LOG, IO_TYPE_ERROR_MESSAGE,
IO_TYPE_DEVICE_OBJECT_EXTENSION, IO_FORCE_ACCESS_CHECK and IO_NO_PARAMETER_CHECKING.
- Remove declaration of HalPrivateDispatchTable, it doesn't belong to public headers.
- Fix declaration of WAIT_CONTEXT_BLOCK, HalDispatchTable, DRIVER_EXTENSION, GENERAL_LOOKASIDE, NPAGED_LOOKASIDE_LIST, PAGED_LOOKASIDE_LIST, KPCR_TIB, MmHighestUserAddress, MmSystemRangeStart, MmUserProbeAddress, KdDebuggerNotPresent and KdDebuggerEnabled.
- Declare KEY_WRITE_TIME_INFORMATION, KEY_USER_FLAGS_INFORMATION, KEY_SET_INFORMATION_CLASS, KfAcquireSpinLock, KfReleaseSpinLock and ExfInterlockedCompareExchange64.
winnt4.h:
- Declare HalAcquireDisplayOwnership and HalAllocateAdapterChannel.
ntifs.h:
- Fix definition of NTKERNELAPI.
- Fix declaration of FsRtlLegalAnsiCharacterArray, FsRtlNotifyInitializeSync, FsRtlNotifyUninitializeSync, IoCheckFunctionAccess and PsGetProcessExitTime.
- Declare IoStatisticsLock, IoReadOperationCount, IoWriteOperationCount, IoOtherOperationCount, IoReadTransferCount, IoWriteTransferCount,
IoOtherTransferCount, FSRTL_ADVANCED_FCB_HEADER, FSRTL_PER_STREAM_CONTEXT, PFILTER_REPORT_CHANGE, FS_FILTER_SECTION_SYNC_TYPE, FS_FILTER_PARAMETERS, FS_FILTER_CALLBACK_DATA, PFS_FILTER_CALLBACK, PFS_FILTER_COMPLETION_CALLBACK, FS_FILTER_CALLBACKS, READ_LIST, ExInitializeRundownProtection, ExReInitializeRundownProtection, ExAcquireRundownProtection, ExAcquireRundownProtectionEx, ExReleaseRundownProtection, ExReleaseRundownProtectionEx, ExRundownCompleted, ExWaitForRundownProtectionRelease, FsRtlMdlReadDev, FsRtlPrepareMdlWriteDev, PFSRTL_STACK_OVERFLOW_ROUTINE, FsRtlPostStackOverflow, FsRtlPostPagingFileStackOverflow, IoAttachDeviceToDeviceStackSafe, IoQueueThreadIrp, KeInitializeMutant, KeReadStateMutant, KeReleaseMutant and PsIsSystemThread.
- Define FSRTL_FAT_LEGAL, FSRTL_HPFS_LEGAL, FSRTL_NTFS_LEGAL, FSRTL_WILD_CHARACTER, FSRTL_OLE_LEGAL, FSRTL_NTFS_STREAM_LEGAL, EX_RUNDOWN_ACTIVE, EX_RUNDOWN_COUNT_SHIFT, EX_RUNDOWN_COUNT_INC, FsRtlIsLeadDbcsCharacter and FsRtlIsAnsiCharacterWild.
- Remove declaration of SYSTEM_CACHE_INFORMATION and SeCreateAccessState, they don't belong to public headers.

svn path=/trunk/; revision=16028
2005-06-18 12:39:24 +00:00
Filip Navara
69b04c6fd2 Define PAGE_WRITECOMBINE, IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, IMAGE_NT_HEADERS32 and IMAGE_NT_HEADERS64.
svn path=/trunk/; revision=16027
2005-06-18 12:12:41 +00:00
Gregor Anich
eb4f850ff3 Fix stupid bug...
svn path=/trunk/; revision=16026
2005-06-18 11:42:42 +00:00
Eric Kohl
65a5620cd8 Implement basic string table functions
svn path=/trunk/; revision=16025
2005-06-18 11:30:49 +00:00
Casper Hornstrup
1ac8300db4 DIB_24BPP_ColorFill performance test
svn path=/trunk/; revision=16024
2005-06-18 08:04:30 +00:00
Martin Fuchs
2486be430f remove superfluous include
svn path=/trunk/; revision=16023
2005-06-18 07:43:49 +00:00
Casper Hornstrup
37e38723e7 Prepare win32k for tests
svn path=/trunk/; revision=16022
2005-06-18 06:17:10 +00:00
Filip Navara
fbf52b7050 Fix "make test".
svn path=/trunk/; revision=16021
2005-06-17 22:59:39 +00:00
Alex Ionescu
b7754ab78d Add KIPCR which will be needed soon and add one more internal function
svn path=/trunk/; revision=16020
2005-06-17 22:05:16 +00:00
Filip Navara
7cee43970a Remove few more dead headers.
svn path=/trunk/; revision=16019
2005-06-17 21:35:33 +00:00
Gé van Geldorp
c37765923c - Correctly translate output rect
- Don't call DIB routines for empty (clipped away) rectangles

svn path=/trunk/; revision=16018
2005-06-17 20:54:24 +00:00
Martin Fuchs
5d7043ea5a remove tabs for proper indenting
svn path=/trunk/; revision=16017
2005-06-17 20:32:22 +00:00
Casper Hornstrup
da4957ec53 External modules area
svn path=/trunk/; revision=16016
2005-06-17 20:30:57 +00:00
Martin Fuchs
f53f915435 sync to Wine's latest "warning fixes"
svn path=/trunk/; revision=16015
2005-06-17 20:28:06 +00:00
Martin Fuchs
836c8f9265 remove old headerfile "license.h"
svn path=/trunk/; revision=16014
2005-06-17 20:23:31 +00:00
Martin Fuchs
3f0cb9fa9f Update Copyright information from Wine's repository
svn path=/trunk/; revision=16013
2005-06-17 20:22:08 +00:00
Filip Navara
609922c292 Add definition of PKBUGCHECK_REASON_CALLBACK_ROUTINE, KBUGCHECK_REASON_CALLBACK_RECORD and KBUGCHECK_CALLBACK_REASON.
svn path=/trunk/; revision=16012
2005-06-17 20:09:20 +00:00
Filip Navara
6c512c6430 Cleanup the indenting of HAL types and move the STDCALL/FASTCALL keywords at the right place in the declarations.
svn path=/trunk/; revision=16011
2005-06-17 20:01:51 +00:00
Filip Navara
d1dbe1be23 Remove definiton of PHAL_RESET_DISPLAY_PARAMETERS.
svn path=/trunk/; revision=16010
2005-06-17 19:43:51 +00:00
Filip Navara
a8f8cec2a4 Be W32API friendly.
svn path=/trunk/; revision=16009
2005-06-17 19:27:49 +00:00
Alex Ionescu
d143eebd0f Add missing HAL types to DDK
svn path=/trunk/; revision=16008
2005-06-17 18:02:31 +00:00
Alex Ionescu
4b08e9770a Oops. Thanks w3seek
svn path=/trunk/; revision=16007
2005-06-17 17:59:11 +00:00
Filip Navara
0a48555ba9 - Comment out the call to SHObjectProperties. The one who added it must have been complete freak since the parameters were completely wrong. Don't let me do "svn log" ...
- Remove duplicate definition from version.h.

svn path=/trunk/; revision=16006
2005-06-17 17:44:39 +00:00
Filip Navara
7af0efc0bc - Define SHOP_PRINTERNAME, SHOP_FILEPATH and SHOP_VOLUMEGUID.
- Declare SHObjectProperties.

svn path=/trunk/; revision=16005
2005-06-17 17:37:54 +00:00
Gregor Anich
3ab6c437cc longjmp() should return 1 if 0 is passed as return value (0 should only be returned by setjmp)
svn path=/trunk/; revision=16004
2005-06-17 17:33:47 +00:00
Gregor Anich
402b13b071 Fix another broken setjmp.
svn path=/trunk/; revision=16003
2005-06-17 17:27:03 +00:00
Gregor Anich
faeb567e1c Fix setjmp (didn't save correct ESP, so it crashed after longjmp).
Fix the kernel debugger.

svn path=/trunk/; revision=16002
2005-06-17 17:25:02 +00:00
Hervé Poussineau
8502799382 Implement IRP_MN_QUERY_CAPABILITIES, IRP_MN_QUERY_RESOURCES, IRP_MN_QUERY_RESOURCE_REQUIREMENTS
svn path=/trunk/; revision=16001
2005-06-17 17:22:57 +00:00
Alex Ionescu
ffe54a1108 Enable PCH for NTDLL. This is commit 16000. Alex pwns you all.
svn path=/trunk/; revision=16000
2005-06-17 17:22:44 +00:00
Alex Ionescu
2df663e3fe Use NTDLL Common Header.
svn path=/trunk/; revision=15999
2005-06-17 17:22:27 +00:00
Alex Ionescu
5e400ded46 Add NTDLL Common Header
svn path=/trunk/; revision=15998
2005-06-17 17:22:19 +00:00
Alex Ionescu
46794424c7 Enable PCH for rtl
svn path=/trunk/; revision=15997
2005-06-17 17:22:12 +00:00
Gregor Anich
bfe3229a7d Remove #include <poppack.h> - there is no pshpack beeing included.
svn path=/trunk/; revision=15996
2005-06-17 17:18:58 +00:00
Filip Navara
ef09f86407 Use W32API.
svn path=/trunk/; revision=15995
2005-06-17 17:15:55 +00:00
Filip Navara
580b785a18 Fix the export of HalExamineMBR. It mustn't be aliased since we need to have it named correctly in the import library.
svn path=/trunk/; revision=15994
2005-06-17 17:14:57 +00:00
Filip Navara
b4a5cd914f - Move DRIVE_LAYOUT_INFORMATION_MBR, DRIVE_LAYOUT_INFORMATION_GPT and
PARTITION_INFORMATION_MBR structures from winddk.h to ntdddisk.h.
- Add definitions of IOCTL_DISK_HISTOGRAM_STRUCTURE, IOCTL_DISK_HISTOGRAM_DATA,
  IOCTL_DISK_HISTOGRAM_RESET, IOCTL_DISK_LOGGING, IOCTL_DISK_REQUEST_DATA,
  IOCTL_DISK_REQUEST_STRUCTURE, PARTITION_INFORMATION_MBR,
  DRIVE_LAYOUT_INFORMATION and IO_QUERY_DEVICE_DATA_FORMAT.

svn path=/trunk/; revision=15993
2005-06-17 17:12:17 +00:00
Filip Navara
0794ad5aa6 - Get rid of STDCALL_FUNC usage in napi/core.h.
- Allow including ntos.h and ntdddisk.h at the same time.

svn path=/trunk/; revision=15992
2005-06-17 17:08:04 +00:00
Filip Navara
c57e3d0690 Fix definition of LPC_MAX_MESSAGE for __USE_W32API case.
svn path=/trunk/; revision=15991
2005-06-17 16:58:15 +00:00
Filip Navara
300fd866a2 Fix packing of structures.
svn path=/trunk/; revision=15990
2005-06-17 16:35:17 +00:00
Thomas Bluemel
dfe571622c - fixed a possible deadlock in SmBeginClientInitialization
- fixed SmCompleteClientInitialization to return success when the client data could be found
- don't copy the program name to a NULL pointer in SmCreateClient in case allocating the storage failed

svn path=/trunk/; revision=15989
2005-06-17 16:26:04 +00:00
Casper Hornstrup
ac243d95f2 Build wrc in output tree.
Patch by Sylvain Petreolle [spetreolle@yahoo.fr].


svn path=/trunk/; revision=15988
2005-06-17 16:12:33 +00:00
Hervé Poussineau
a9a05b022d Disable some code in cromwell, as you get an infinite loop on some hardware ("ERR: drivers\usb\cromwell\uhci\uhci-hcd.c: 1060: host controller halted. very bad during boot")
svn path=/trunk/; revision=15987
2005-06-17 15:48:15 +00:00
Magnus Olsen
2e71724ae1 New icon from mf. same as cmd icon
svn path=/trunk/; revision=15986
2005-06-17 15:47:10 +00:00
Filip Navara
ddec33b110 Use W32API.
svn path=/trunk/; revision=15985
2005-06-17 15:10:01 +00:00
Filip Navara
f44cbee050 Get rid of obsolete makefile.
svn path=/trunk/; revision=15984
2005-06-17 14:00:19 +00:00
Filip Navara
e37f6810a5 CSQ is linked to the kernel also, so make that work.
svn path=/trunk/; revision=15983
2005-06-17 13:59:47 +00:00
Filip Navara
7554c281d5 Use W32API.
svn path=/trunk/; revision=15982
2005-06-17 13:24:50 +00:00
Filip Navara
8342ea7301 Remove KEBUGCHECK and KEBUGCHECKEX definitions.
svn path=/trunk/; revision=15981
2005-06-17 13:22:12 +00:00
Filip Navara
3f77a1c166 Fix a typo. :(
svn path=/trunk/; revision=15980
2005-06-17 13:17:46 +00:00
Filip Navara
a4cb3017e6 Define KEBUGCHECK and KEBUGCHECKEX here.
svn path=/trunk/; revision=15979
2005-06-17 13:13:37 +00:00
Filip Navara
05548c5587 A bit of W32API friendliness...
svn path=/trunk/; revision=15978
2005-06-17 13:12:45 +00:00
Filip Navara
bae68b41b1 Use W32API.
svn path=/trunk/; revision=15977
2005-06-17 13:05:11 +00:00
Filip Navara
6a36797b61 Allow csq.h to be included along with ntddk.h.
svn path=/trunk/; revision=15976
2005-06-17 13:00:03 +00:00
Filip Navara
1b5f61f4e6 Include the prototypes for CcRosInitializeFileCache and CcRosReleaseFileCache even when compiling w/ W32API.
svn path=/trunk/; revision=15975
2005-06-17 12:59:27 +00:00
Filip Navara
4cd0b32494 - Fix prototype of IoCsqInitialize.
- Define IO_TYPE_CSQ and IO_TYPE_CSQ_IRP_CONTEXT.

svn path=/trunk/; revision=15974
2005-06-17 12:57:31 +00:00
Filip Navara
a965b968f2 Get rid of obsolete makefile.
svn path=/trunk/; revision=15973
2005-06-17 12:31:49 +00:00
Filip Navara
e0463986d3 Build file system drivers w/ W32API headers.
svn path=/trunk/; revision=15972
2005-06-17 12:29:33 +00:00
Filip Navara
b0d3f5b991 Make the ASSERT macros GCC friendly.
svn path=/trunk/; revision=15971
2005-06-17 12:24:29 +00:00
Filip Navara
317d4942bd Use W32API.
svn path=/trunk/; revision=15970
2005-06-17 11:40:11 +00:00
Filip Navara
d604caaaf3 Get rid of the prehistoric GNU Windows32 headers.
svn path=/trunk/; revision=15969
2005-06-17 11:29:07 +00:00
Filip Navara
14e5873c84 Do NOT include defines.h in .rc files.
svn path=/trunk/; revision=15968
2005-06-17 11:28:23 +00:00
Filip Navara
bd0ef4def4 Use W32API.
svn path=/trunk/; revision=15967
2005-06-17 11:22:47 +00:00
Filip Navara
aab0294f3b Use W32API.
svn path=/trunk/; revision=15966
2005-06-17 11:05:49 +00:00
Filip Navara
ab4dfd00f0 Don't include windows.h in drivers.
svn path=/trunk/; revision=15965
2005-06-17 10:54:34 +00:00
Filip Navara
3fb65d4597 - Use W32API.
- Fix some protoypes.

svn path=/trunk/; revision=15964
2005-06-17 10:43:58 +00:00
Filip Navara
19955a57e1 Fix declaration of AdvancedDocumentProperties[AW].
svn path=/trunk/; revision=15963
2005-06-17 10:43:16 +00:00
Thomas Bluemel
acfd0635dd implemented the TokenRestrictedSids information class for NtQueryInformationToken, however restricted SIDs are not yet supported!
svn path=/trunk/; revision=15962
2005-06-17 10:30:59 +00:00
Filip Navara
785eb54c6a Use W32API.
svn path=/trunk/; revision=15961
2005-06-17 10:15:21 +00:00
Filip Navara
37bfae8d86 Use W32API.
svn path=/trunk/; revision=15960
2005-06-17 09:57:53 +00:00
Filip Navara
ba98c65d7a - Declare IO_ERROR_LOG_MESSAGE.
- Define ERROR_LOG_LIMIT_SIZE and IO_ERROR_LOG_MESSAGE_HEADER_LENGTH.

svn path=/trunk/; revision=15959
2005-06-17 09:57:28 +00:00
Thomas Bluemel
f6e5d12f4c implemented IsTokenRestricted(), inspired by a patch to winehq by James Hawkins
svn path=/trunk/; revision=15958
2005-06-17 09:46:29 +00:00
Filip Navara
a50fde81ae Use W32API.
svn path=/trunk/; revision=15957
2005-06-17 09:46:21 +00:00
Filip Navara
204dc0088b Use W32API.
svn path=/trunk/; revision=15956
2005-06-17 09:46:03 +00:00
Filip Navara
826e4d001b Use W32API.
svn path=/trunk/; revision=15955
2005-06-17 09:45:42 +00:00
Filip Navara
99e07a1ddf Use W32API.
svn path=/trunk/; revision=15954
2005-06-17 08:12:20 +00:00
Filip Navara
138bbbaa3a Use W32API.
svn path=/trunk/; revision=15953
2005-06-17 08:08:58 +00:00
Filip Navara
05061cedaa Use W32API.
svn path=/trunk/; revision=15952
2005-06-17 08:05:58 +00:00
Filip Navara
63ac2d0f1f Cleanup the usage of W32API.
svn path=/trunk/; revision=15951
2005-06-17 08:02:05 +00:00
Filip Navara
754ccb0eb6 Use W32API.
svn path=/trunk/; revision=15950
2005-06-17 08:00:30 +00:00
Filip Navara
3814e88279 Use W32API.
svn path=/trunk/; revision=15949
2005-06-17 07:59:43 +00:00
Filip Navara
d4e71ef096 Use W32API.
svn path=/trunk/; revision=15948
2005-06-17 07:57:37 +00:00
Filip Navara
7ccf07aecc A bit of W32API friendliness...
svn path=/trunk/; revision=15947
2005-06-17 07:55:45 +00:00
Filip Navara
81405a8541 Use W32API.
svn path=/trunk/; revision=15946
2005-06-17 07:53:58 +00:00
Filip Navara
c893e787ea - Use standard TLS instead of custom TEB field.
- Use W32API.

svn path=/trunk/; revision=15945
2005-06-17 07:53:34 +00:00
Filip Navara
c7ccd70dbd Add definitions of ACCESS_MAX_MS_V2_ACE_TYPE, ACCESS_ALLOWED_COMPOUND_ACE_TYPE, ACCESS_MAX_MS_V3_ACE_TYPE, ACCESS_MIN_MS_OBJECT_ACE_TYPE, ACCESS_ALLOWED_OBJECT_ACE_TYPE, ACCESS_DENIED_OBJECT_ACE_TYPE, SYSTEM_AUDIT_OBJECT_ACE_TYPE, SYSTEM_ALARM_OBJECT_ACE_TYPE, ACCESS_MAX_MS_OBJECT_ACE_TYPE, ACCESS_MAX_MS_V4_ACE_TYPE, ACCESS_MAX_MS_ACE_TYPE, ACCESS_ALLOWED_CALLBACK_ACE_TYPE, ACCESS_DENIED_CALLBACK_ACE_TYPE, ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE, ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE, SYSTEM_AUDIT_CALLBACK_ACE_TYPE, SYSTEM_ALARM_CALLBACK_ACE_TYPE, SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE, SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE, ACCESS_MAX_MS_V5_ACE_TYPE, SID_MAX_SUB_AUTHORITIES, SID_RECOMMENDED_SUB_AUTHORITIES, SE_OWNER_DEFAULTED, SE_GROUP_DEFAULTED, SE_DACL_PRESENT, SE_DACL_DEFAULTED, SE_SACL_PRESENT, SE_SACL_DEFAULTED, SE_DACL_UNTRUSTED, SE_SERVER_SECURITY, SE_DACL_AUTO_INHERIT_REQ, SE_SACL_AUTO_INHERIT_REQ, SE_DACL_AUTO_INHERITED, SE_SACL_AUTO_INHERITED, SE_DACL_PROTECTED, SE_SACL_PROTECTED, SE_RM_CONTROL_VALID and SE_SELF_RELATIVE.
svn path=/trunk/; revision=15944
2005-06-17 07:16:01 +00:00
Filip Navara
59801357f9 - Declare POLICY_NOTIFICATION_INFORMATION_CLASS and SECURITY_LOGON_SESSION_DATA.
- Fix declaration of CRITICAL_SECTION and RTL_CRITICAL_SECTION.

svn path=/trunk/; revision=15943
2005-06-17 07:12:16 +00:00
Alex Ionescu
314e0eaf59 Fix bug in gate code
svn path=/trunk/; revision=15942
2005-06-17 00:13:44 +00:00
Alex Ionescu
c2167ebb58 Fix strpbrk
svn path=/trunk/; revision=15941
2005-06-17 00:13:10 +00:00
Gé van Geldorp
66c72376e1 Declare Guarded Mutex functions and export them
svn path=/trunk/; revision=15940
2005-06-16 22:15:43 +00:00
Hervé Poussineau
f104c62bd6 Add "depends" target for makefiles
svn path=/trunk/; revision=15939
2005-06-16 21:02:52 +00:00
James Tabor
11ae17704c Plugging in CallMsgFilter.
svn path=/trunk/; revision=15938
2005-06-16 20:47:47 +00:00
James Tabor
1284e1351f Pluged in CallMsgFilter.
svn path=/trunk/; revision=15937
2005-06-16 20:47:09 +00:00
Hervé Poussineau
192c84808f Use <ifnot property="ARCH" value="i386"> instead of <if property="ARCH" value="unknown">, because ARCH would never be defined to unknown
svn path=/trunk/; revision=15936
2005-06-16 20:46:48 +00:00
James Tabor
2054ea72e9 Pluged in CallMsgFilter, I tested this and no crashes on real hardware.
svn path=/trunk/; revision=15935
2005-06-16 20:46:39 +00:00
Hervé Poussineau
8f5dd38cdd Implement <ifnot>
svn path=/trunk/; revision=15934
2005-06-16 20:37:50 +00:00
Gé van Geldorp
2cc8819bc6 Fix warning
svn path=/trunk/; revision=15933
2005-06-16 09:25:51 +00:00
Hartmut Birr
f31239f089 Changed InterlockedIncrement and InterlockedDecrement to return the modified value.
svn path=/trunk/; revision=15932
2005-06-15 23:08:33 +00:00
Hartmut Birr
c8ba8dd860 Removed intrlck.c, because it is already in lib\rtl.
svn path=/trunk/; revision=15931
2005-06-15 23:00:10 +00:00
Hartmut Birr
3ab1c49a3e Removed strpbrk.c.
svn path=/trunk/; revision=15930
2005-06-15 22:52:03 +00:00
Hartmut Birr
251cbb167f Add an optimized version of strpbrk to the string library.
svn path=/trunk/; revision=15929
2005-06-15 22:47:12 +00:00
Hartmut Birr
60410fb891 Used the assembler source for the i386 architecture.
svn path=/trunk/; revision=15928
2005-06-15 22:39:03 +00:00
KJK::Hyperion
cba0f39ae7 No reason KiDoubleFaultHandler should return a value - in fact it doesn't return at all
svn path=/trunk/; revision=15927
2005-06-15 21:55:36 +00:00
Steven Edwards
f050a320ca Added new better tracert replacement by Ged Murphy
svn path=/trunk/; revision=15926
2005-06-15 20:24:31 +00:00
Steven Edwards
4345881c2a Use w32api
svn path=/trunk/; revision=15925
2005-06-15 20:05:54 +00:00
Steven Edwards
6dfaa9b3a5 some magic to make w32api happy when using a [arch]-linux compiler rather than mingw32
svn path=/trunk/; revision=15924
2005-06-15 19:45:28 +00:00
Maarten Bosma
87ee9dfafb delete .cvsignore
svn path=/trunk/; revision=15923
2005-06-15 17:51:54 +00:00
Maarten Bosma
84321058f9 removed rules.mak and outdated entries from readme.txt
svn path=/trunk/; revision=15922
2005-06-15 17:42:12 +00:00
Maarten Bosma
f30aac562d remove old makefile
svn path=/trunk/; revision=15921
2005-06-15 17:37:14 +00:00
Maarten Bosma
3bf9dce002 Created XML makefiles for rosapps. You need to checkout /rosapps in your /reactos folder to use it. This projects do not build: /lib/dflat32 and /welcome (I don't know if they did before). Winemine does not work. (but it builds) /test makefiles are not done yet.
svn path=/trunk/; revision=15920
2005-06-15 17:19:52 +00:00
Hervé Poussineau
0d5c780913 Add Green driver, that emulates a VT100 compatible server.
Input won't work as long as we don't have a kdbclass driver.Add stubs for IOCTL_USB_GET_NODE_CONNECTION_NAME, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION

svn path=/trunk/; revision=15919
2005-06-15 17:11:36 +00:00
KJK::Hyperion
390d16bed5 Removed empty directory
svn path=/trunk/; revision=15918
2005-06-14 22:08:13 +00:00
Filip Navara
9e9a326ead Add Nokia/Ericsson vitrual key codes.
svn path=/trunk/; revision=15917
2005-06-14 21:59:07 +00:00
Filip Navara
095faa8449 - Remove KeAttachProcess and KeDetachProcess prototypes from winddk.h.
- Remove non-public object manager stuff from W32API and ROS headers.

svn path=/trunk/; revision=15916
2005-06-14 20:41:49 +00:00
Filip Navara
a6b2363ea0 Use KeStackAttachProcess/KeUnstackDetachProcess instead of KeAttachProcess/KeDetachProcess.
svn path=/trunk/; revision=15915
2005-06-14 20:24:02 +00:00
Filip Navara
56f5461bff Revert r15906 change.
svn path=/trunk/; revision=15914
2005-06-14 18:39:12 +00:00
Gregor Anich
88e9416cb8 Fix compilation.
svn path=/trunk/; revision=15913
2005-06-14 18:33:59 +00:00
Hartmut Birr
83ff161361 It was a bad idea to manipulate the length of the given unicode string if we don't like the the starting back slash.
svn path=/trunk/; revision=15912
2005-06-14 18:33:02 +00:00
Alex Ionescu
d101bc4e2d Add an ARC Header for future purposes (PPC, ARM, etc, ARCLoader) and implement KeFindConfigurationNextEntry and fix the definition
svn path=/trunk/; revision=15911
2005-06-14 17:37:07 +00:00
Filip Navara
f4ff6e70b3 Accidently removed one line in the last commit ... gotta love this header hell. :/
svn path=/trunk/; revision=15910
2005-06-14 14:44:11 +00:00
Filip Navara
83210a64d6 A bit of W32API magic.
svn path=/trunk/; revision=15909
2005-06-14 13:50:23 +00:00
Filip Navara
17990a22f5 Fix compilation error (try 2).
svn path=/trunk/; revision=15908
2005-06-14 13:46:32 +00:00
Filip Navara
cd1a3da016 Fix compilation error.
svn path=/trunk/; revision=15907
2005-06-14 13:45:31 +00:00
Filip Navara
b2970c097e - Fix the declarations of PDRIVER_CANCEL, KeGetCurrentProcessorNumber and KPCR in ROS headers.
- Fix the declarations of KeGetCurrentProcessorNumber, PIO_QUERY_DEVICE_ROUTINE, THREAD_STATE, KPCR and KeAttachProcess in W32API headers.
- Remove KeInitializeApc, KEVENT_PAIR and TERMINATION_PORT declarations from W32API, they don't belong there.
- Correct the STDCALL order in callback declarations in winddk.h.

svn path=/trunk/; revision=15906
2005-06-14 13:10:40 +00:00
Hervé Poussineau
819d60094a Enumerate root hub connected to UHCI controller
Use Cromwell USB stack to initialize UHCI controller

svn path=/trunk/; revision=15905
2005-06-14 12:31:51 +00:00
Alex Ionescu
2e0ff75066 Remove excessive debugging messages used during testing
svn path=/trunk/; revision=15904
2005-06-14 03:35:23 +00:00
Alex Ionescu
28c50308c7 Fix OB Bug and port ObQueryNameString from my branch so Herve can get back to working on USB. Sorry for taking so long, hpoussin\!
svn path=/trunk/; revision=15903
2005-06-14 03:33:21 +00:00
Gé van Geldorp
9c3a32fd9e Re-apply r15878 as it wasn't the cause of the problems
svn path=/trunk/; revision=15902
2005-06-13 22:27:09 +00:00
Gé van Geldorp
08d5e5e7e5 We were changing the edi register, but not informing the compiler about this.
For certain optimization combinations, the compiler would assume edi was
unchanged. Fixed by adding %edi to the clobber list.

svn path=/trunk/; revision=15901
2005-06-13 22:24:28 +00:00
Hervé Poussineau
f5f855488d Handle DeviceId property
Change InstanceId to Serenum\Mouse

svn path=/trunk/; revision=15900
2005-06-13 21:51:42 +00:00
Hervé Poussineau
a189416191 Fix string returned by IoRegisterDeviceInterface()
svn path=/trunk/; revision=15899
2005-06-13 21:44:32 +00:00
Hervé Poussineau
d520f41934 Add registry entries related to USB hub driver
svn path=/trunk/; revision=15898
2005-06-13 20:51:07 +00:00
Hervé Poussineau
ed558f123b Silent some debug messages
svn path=/trunk/; revision=15897
2005-06-13 20:45:52 +00:00
Hervé Poussineau
925b767f99 Add usb hub driver. It is linked with cromwell usb stack
svn path=/trunk/; revision=15896
2005-06-13 20:41:59 +00:00
Hervé Poussineau
6b3ec8469e Disable some usb empty drivers. We will use thoses in drivers/usb/cromwell
svn path=/trunk/; revision=15895
2005-06-13 20:37:33 +00:00
KJK::Hyperion
f5b60bc69e longjmp should restore the stack pointer as it would be *after* setjmp returns. Since the PSEH implementation of setjmp is __stdcall, this value differs from the usual esp+4, because *after* return *two* doublewords are popped (return IP and parameter). Thanks to blight_ for reporting
svn path=/trunk/; revision=15894
2005-06-13 20:31:55 +00:00
Maarten Bosma
ca33e9fc4f set svn:eol-style native
svn path=/trunk/; revision=15893
2005-06-13 18:33:08 +00:00
Maarten Bosma
ab2a7524d0 remove empty dir
svn path=/trunk/; revision=15892
2005-06-13 18:09:27 +00:00
Maarten Bosma
9631980621 remove empty dir
svn path=/trunk/; revision=15891
2005-06-13 18:09:22 +00:00
Maarten Bosma
9038f375f7 remove empty dir
svn path=/trunk/; revision=15890
2005-06-13 18:09:16 +00:00
Maarten Bosma
c1d7682a91 remove empty dir
svn path=/trunk/; revision=15889
2005-06-13 18:09:11 +00:00
Maarten Bosma
c50ea61c80 remove empty dir
svn path=/trunk/; revision=15888
2005-06-13 18:09:05 +00:00
Maarten Bosma
d4e3987bad remove empty dir
svn path=/trunk/; revision=15887
2005-06-13 18:07:56 +00:00
Maarten Bosma
45c9cc8bde remove content of empty dir (cvsignore)
svn path=/trunk/; revision=15886
2005-06-13 18:06:30 +00:00
Gregor Anich
584e9b9488 Fix warnings in inline assembly (I hope this doesnt expose a GCC bug and thus break the build for others, using 3.4.2 myself and everything works)
svn path=/trunk/; revision=15884
2005-06-13 15:29:05 +00:00
KJK::Hyperion
e3502f710b did I miss a "the tree isn't supposed to build anymore" memo or what? fixes for compilation with GCC 3.3.3
svn path=/trunk/; revision=15883
2005-06-13 14:36:02 +00:00
Maarten Bosma
5347091d15 XML Makefiles
svn path=/trunk/; revision=15882
2005-06-13 13:21:34 +00:00
Magnus Olsen
0aec39dcbe revert back to 15869 for current change break 32 / 8 bpp for vbe drv, and vmware drv the mouse did not redaw some dialog box was wrong. and alot more
svn path=/trunk/; revision=15881
2005-06-13 02:02:21 +00:00
Magnus Olsen
99848068d0 32dib remove one of color fill optimizing until it can be fix for oarch=pentiun2 DBG=0 with vmware drv
svn path=/trunk/; revision=15880
2005-06-13 01:58:57 +00:00
Magnus Olsen
9d5a92b86b fix bug in color fill inline asm code. Did crash cirrus drv, vmware 5 drv and if the buffer was not align. Clean up inline asm code.
svn path=/trunk/; revision=15879
2005-06-12 19:23:40 +00:00
Gé van Geldorp
8ab10b3efd Clip lines totally outside the clip region
svn path=/trunk/; revision=15878
2005-06-12 19:06:38 +00:00
Hartmut Birr
f4732fef7d Print more informations on a BSOD by enabling the debug prints to the screen.
svn path=/trunk/; revision=15877
2005-06-12 16:20:10 +00:00
Casper Hornstrup
45a93411a7 Show execution time of tests
svn path=/trunk/; revision=15876
2005-06-12 15:33:34 +00:00
Martin Fuchs
4f0032f8d7 remove duplicate toolbar button
svn path=/trunk/; revision=15875
2005-06-12 14:09:39 +00:00
Gé van Geldorp
83804c9749 Allow logging of calls into display driver (disabled by default)
svn path=/trunk/; revision=15874
2005-06-12 13:11:36 +00:00
Martin Fuchs
53a8f66404 small adjustements:
- #ifdef for WINE specific menu item
- C style comment
- white space

svn path=/trunk/; revision=15873
2005-06-12 11:30:17 +00:00
Casper Hornstrup
ad1bdc040e Document well-known targets
svn path=/trunk/; revision=15872
2005-06-12 10:52:18 +00:00
Hartmut Birr
ad04a63867 Preinitialize the Provider to prevent from crashing if no sockets were given.
svn path=/trunk/; revision=15871
2005-06-12 10:33:22 +00:00
Hartmut Birr
95aa074b1e - Fixed the calculation of some offset values.
- Used the correct flag for testing of a bss section.

svn path=/trunk/; revision=15870
2005-06-12 10:25:49 +00:00
Hartmut Birr
b2f1b36fd9 - Fixed the inline assembler in DIB_16BPP_ColorFill.
- Calculated the color value outside of the loop in DIB_16BPP_ColorFill.

svn path=/trunk/; revision=15869
2005-06-12 10:23:04 +00:00
Casper Hornstrup
321c3545d8 Support module_depends target
svn path=/trunk/; revision=15868
2005-06-12 10:18:51 +00:00
Martin Fuchs
639193ca53 - standardize resource scripts: align code and remove tabs
- ifdef __WINE__ for ID_ABOUT_WINE

svn path=/trunk/; revision=15867
2005-06-12 10:14:37 +00:00
Casper Hornstrup
bfef768a76 Make test pass
svn path=/trunk/; revision=15866
2005-06-12 09:36:25 +00:00
Martin Fuchs
bef9eaff74 remove unnecessary paint code
svn path=/trunk/; revision=15865
2005-06-12 09:17:06 +00:00
Martin Fuchs
ed5cf2efc8 remove unsued compilation unit
svn path=/trunk/; revision=15864
2005-06-12 09:14:12 +00:00
Martin Fuchs
c25cc23eb8 remove unused variable
svn path=/trunk/; revision=15863
2005-06-12 09:13:45 +00:00
Aleksey Bragin
8addb6ae11 Fix pdo->fdo typo, causing serious errors, ending up driver unloadable at all.
svn path=/trunk/; revision=15862
2005-06-11 21:29:59 +00:00
Magnus Olsen
6eab0b40a0 fix fill color and hline asm code
thx tamlin to notice some mistake

svn path=/trunk/; revision=15861
2005-06-11 19:56:12 +00:00
Hervé Poussineau
03586e2534 Patch by Sylvain Petreolle <spetreolle@yahoo.fr>: Fix bug 646
- Remove duplicate dll entries in reactos.dff,
- Move some at their correct place.

svn path=/trunk/; revision=15860
2005-06-11 19:09:42 +00:00
Magnus Olsen
c1643db40b speed up 24bpp small fill and fill
svn path=/trunk/; revision=15859
2005-06-11 13:36:00 +00:00
Magnus Olsen
7c9de0d8d6 Speed up Fill and Small fill. for 16bpp
svn path=/trunk/; revision=15858
2005-06-11 12:13:28 +00:00
Magnus Olsen
c507c88f25 adding __volatile__ on all DIB32 inline asm to ensure it doesn't get modified when optimizations are enabled
Thx w3seek 

svn path=/trunk/; revision=15857
2005-06-11 10:19:33 +00:00
Magnus Olsen
1503cdc0b4 Fix align 4 problem with color fill and hline.
Now OARCH=pentium2 working with 32bpp


svn path=/trunk/; revision=15856
2005-06-11 09:53:14 +00:00
Hervé Poussineau
df3ceea77c Set svn:eol-style property to native
svn path=/trunk/; revision=15855
2005-06-10 22:54:11 +00:00
Alex Ionescu
2dc107e012 Support QEMU Hardware Acceleration
svn path=/trunk/; revision=15854
2005-06-10 21:46:16 +00:00
Hervé Poussineau
64bd0a6bd1 Add a pointer to the root hub PDO in the usb controller device extension
svn path=/trunk/; revision=15853
2005-06-10 21:25:55 +00:00
Aleksey Bragin
988bbc4f12 Add scrollbar to timezone selection comboboxes. Patch by unC0Rr.
svn path=/trunk/; revision=15852
2005-06-10 21:13:15 +00:00
Martin Fuchs
d92ffc0b93 Patch from WineHQ:
Mike McCormack <mike@codeweavers.com>
Fix more warnings.

svn path=/trunk/; revision=15851
2005-06-10 20:41:26 +00:00
Gé van Geldorp
15e83c5e04 Re-apply fix to dib16bpp and fix the root cause
svn path=/trunk/; revision=15850
2005-06-09 20:40:44 +00:00
Magnus Olsen
5ecd1f57d9 dib16_hline revert GvG change until some rewrite the asm code to handler the 4 align right. for now it does
the test 0x01,%%edi is wrong it must be test 0x03,%%edi
for not break cmd in 16bpp and other apps

svn path=/trunk/; revision=15849
2005-06-09 20:18:32 +00:00
Gé van Geldorp
bb18fc25e9 Speed up 24bpp fills
svn path=/trunk/; revision=15848
2005-06-09 19:04:32 +00:00
Magnus Olsen
ecb9480129 correct the spelling for some comment thx w3seek
svn path=/trunk/; revision=15847
2005-06-09 18:33:45 +00:00
Magnus Olsen
e4d12844dc fix a comment
svn path=/trunk/; revision=15846
2005-06-09 18:03:05 +00:00
Magnus Olsen
a89c7dcf3d fix a bug in hline for 16bpp it did not do Align to fullword boundary correct GvG did spot this lite bug. fix fill bug in 8bpp now it will boot agein thx waxdragon that did spot this problem.
svn path=/trunk/; revision=15845
2005-06-09 17:58:33 +00:00
James Tabor
ba8d788967 Added HcdInterfaceName from hpoussin new uhci devctrl.c.
svn path=/trunk/; revision=15844
2005-06-09 02:12:33 +00:00
James Tabor
26d0d00e72 Attached Linux device to Device Extension.
svn path=/trunk/; revision=15843
2005-06-09 02:01:06 +00:00
James Tabor
7240f0cf76 Fixing to start pnp of usb drivers.
svn path=/trunk/; revision=15842
2005-06-09 01:43:07 +00:00
Magnus Olsen
e87cc02785 add my self to CREDITS
svn path=/trunk/; revision=15841
2005-06-08 17:29:59 +00:00
Magnus Olsen
f0881728a7 Optimze DIB32_bitblt for both DGB=0 and DGB=1
Can not geting it faster with current c code


svn path=/trunk/; revision=15840
2005-06-08 16:28:41 +00:00
Gé van Geldorp
ec70aa71b0 Revert r15838 since it breaks the build
svn path=/trunk/; revision=15839
2005-06-07 23:11:35 +00:00
Gé van Geldorp
5fb6c9fc9c Add getnameinfoA/W
svn path=/trunk/; revision=15838
2005-06-07 22:04:54 +00:00
Filip Navara
e5541e23e6 Fix prototypes for non-GDI_DEBUG case.
svn path=/trunk/; revision=15837
2005-06-07 21:23:30 +00:00
Hartmut Birr
b494dd6e5e Changed back to the GPL.
svn path=/trunk/; revision=15836
2005-06-07 20:15:16 +00:00
Filip Navara
cb3ec720bd Fix a cut & paste mistake.
svn path=/trunk/; revision=15835
2005-06-07 20:10:16 +00:00
Filip Navara
7aea00d1d6 - Repair GDI handle debugging functionality.
- Fix locking in NtGdiGetTextFace.

svn path=/trunk/; revision=15834
2005-06-07 20:02:22 +00:00
Martin Fuchs
7a4b2f8d8f sync winefile resource wcripts with WINE and adjust INFO entries
svn path=/trunk/; revision=15833
2005-06-07 17:13:38 +00:00
Hartmut Birr
b4f774ec1e - Removed the process member from the memory area structure.
- Add the copyright notice and all programmers.

svn path=/trunk/; revision=15832
2005-06-07 17:07:34 +00:00
Filip Navara
cc0fc0d35c Implementation of DragDetect. Based on Wine code (C) 1993, 1994 Alexandre Julliard.
svn path=/trunk/; revision=15831
2005-06-07 16:54:15 +00:00
Filip Navara
4619446ed0 - Unlock GDI objects by pointer, not by handle.
- Fix a few invalid lock cases.
- Add support for shared GDI object locks and use it for locking surfaces.

svn path=/trunk/; revision=15830
2005-06-07 16:34:07 +00:00
Filip Navara
e7f345e0a2 Fix buffer size checks for IOCTL_VIDEO_SET_COLOR_REGISTERS.
svn path=/trunk/; revision=15829
2005-06-07 16:26:14 +00:00
Gregor Anich
d06d236296 Add 'l' suffix to shr in DIB_16BPP_VLine.
svn path=/trunk/; revision=15828
2005-06-07 15:13:14 +00:00
Gregor Anich
2b005b9bfa Remove a comment which i forgot to remove, oops.
svn path=/trunk/; revision=15827
2005-06-07 15:10:56 +00:00
Gregor Anich
85b03712d5 Assembly for DIB_16BPP_VLine, nearly no performance increase, but could be useful later anyway.
svn path=/trunk/; revision=15826
2005-06-07 15:09:02 +00:00
Thomas Bluemel
72448a5e50 use %lu instead of %d for unsigned formatting
svn path=/trunk/; revision=15825
2005-06-07 13:53:37 +00:00
Thomas Bluemel
1413f0bd4c delete obsolete folder
svn path=/trunk/; revision=15824
2005-06-07 13:51:58 +00:00
Eric Kohl
518bede98c Use #if 0 ... #endif to disable source code.
svn path=/trunk/; revision=15823
2005-06-06 20:39:25 +00:00
Eric Kohl
a344dd8f15 NtPlugPlayControl: Implement PLUGPLAY_GET_RELATED_DEVICE and PLUGPLAY_DEVICE_STATUS.
svn path=/trunk/; revision=15822
2005-06-06 20:31:56 +00:00
Hartmut Birr
700e2c8098 - Changed the calculation of the base address of an image section.
- Removed some unnecessary members from section object.  
- Changed the allocation of a section object back to paged pool.

svn path=/trunk/; revision=15821
2005-06-06 20:27:49 +00:00
Klemens Friedl
6193faf9cd cmd update:
* add 'help' command: list all available commands plus show a short description
* update english and german language resource files

svn path=/trunk/; revision=15820
2005-06-06 20:05:14 +00:00
Eric Kohl
794ac95666 Disable patch 15796 because it breaks the bootcd.
svn path=/trunk/; revision=15819
2005-06-06 19:34:36 +00:00
Hartmut Birr
5e938a6c68 Allocate the section object from non paged pool because the storage for a spin lock must be in non paged memory.
svn path=/trunk/; revision=15818
2005-06-05 23:07:51 +00:00
Hartmut Birr
9ea1665416 Fixed the clean rule.
svn path=/trunk/; revision=15817
2005-06-05 21:30:41 +00:00
Hartmut Birr
1272e9ca67 Revert my changes from rev 15805.
svn path=/trunk/; revision=15816
2005-06-05 21:24:36 +00:00
Hartmut Birr
f97e4e54cd Allocate the section segments from non paged pool because the storage for fast mutex must be in non paged memory.
svn path=/trunk/; revision=15815
2005-06-05 21:12:30 +00:00
Gé van Geldorp
be1ac79fa0 Implement /LOADSYMBOLS and /NOLOADSYMBOLS command line option
Note to self: send shipping address for coffee mug to Alex

svn path=/trunk/; revision=15814
2005-06-05 20:56:14 +00:00
Hervé Poussineau
170980ae6f Include French resources in explorer
svn path=/trunk/; revision=15813
2005-06-05 20:05:56 +00:00
Magnus Olsen
3ed044e92e more optimze of bitblt for dib32
svn path=/trunk/; revision=15812
2005-06-05 18:15:08 +00:00
Casper Hornstrup
012786bd8f Clean proxy makefiles on 'make clean'
svn path=/trunk/; revision=15810
2005-06-05 16:47:42 +00:00
Casper Hornstrup
5c0d2bc84c Remove old makefiles
svn path=/trunk/; revision=15809
2005-06-05 16:32:33 +00:00
Casper Hornstrup
2163a01133 Generate proxy makefiles in output tree.
svn path=/trunk/; revision=15808
2005-06-05 15:59:18 +00:00
James Tabor
4c7bbd9c39 Adding symbolic link to USBFDO.
svn path=/trunk/; revision=15807
2005-06-05 15:50:55 +00:00
Hartmut Birr
34fea9606b Forgot this file.
Make the bochs debug output in the very early boot phase available, if AUTO_ENABLE_BOCHS is defined.

svn path=/trunk/; revision=15806
2005-06-05 14:03:55 +00:00
Hartmut Birr
09b3ff1ebb Don't lock the kernel address space while solving faults from the paged pool.
It is possible, that someone try to access memory from paged pool 
while the kernel address space is already locked.

svn path=/trunk/; revision=15805
2005-06-05 14:01:58 +00:00
Casper Hornstrup
00457dbaa6 Document rbuild flags.
svn path=/trunk/; revision=15804
2005-06-05 12:53:22 +00:00
Martin Fuchs
ef499ee12a refresh window content after context menu popups only if any command has been executed
svn path=/trunk/; revision=15803
2005-06-05 12:20:07 +00:00
Casper Hornstrup
dba8d6b88a Correct dependencies for 'make <module>_install'
svn path=/trunk/; revision=15802
2005-06-05 12:08:39 +00:00
Casper Hornstrup
1aa91e26e5 * Support enabling/disabling modules depending on configuration.
* Enable halup for MP=0 configuration and halmp for MP=1 configuration.


svn path=/trunk/; revision=15801
2005-06-05 11:22:16 +00:00
Gé van Geldorp
34ef0d66de Use standard debug macros
svn path=/trunk/; revision=15800
2005-06-05 11:05:47 +00:00
Gé van Geldorp
0d7ebb711c Lucio Diaz-Flores Varela <reactos_translate@yahoo.es>
Add Spanish translation

svn path=/trunk/; revision=15799
2005-06-05 08:33:52 +00:00
James Tabor
a104816de4 Fixed Interface.
svn path=/trunk/; revision=15798
2005-06-05 00:40:40 +00:00
Eric Kohl
355593bafa - Create device instance key for root device node.
- Add DeviceReference value for each non-root device node.

svn path=/trunk/; revision=15796
2005-06-04 22:55:58 +00:00
Aleksey Bragin
607f793fc0 Fix a few critical typos/mistakes (like interruptvector/interruptlevel), stdcall for thread's func, etc. Also added some "hacks" into hub's thread, but at least it leads to first steps to device enumeration.
Driver (OHCI) bugchecks on my_pci_pool_allocation now (when trying to send URB).

svn path=/trunk/; revision=15795
2005-06-04 21:35:07 +00:00
Alex Ionescu
2fb48b3787 Fix filip's fixme and alex's fixme (ie: make IRP cancellation work properly). This should appease Hartmut even more =).
svn path=/trunk/; revision=15794
2005-06-04 21:07:00 +00:00
Martin Fuchs
14245cb4ed german resource for property dialog
svn path=/trunk/; revision=15793
2005-06-04 20:48:51 +00:00
Martin Fuchs
9dafeab3da sync winefile's header between WINE and ReactOS
svn path=/trunk/; revision=15792
2005-06-04 20:37:15 +00:00
Filip Navara
4b55dd45ab Correctly handle NOT operator in window style definitions.
svn path=/trunk/; revision=15788
2005-06-04 19:44:50 +00:00
Klemens Friedl
f40c4fef66 add property page winapi (not finished, I will implement it)
svn path=/trunk/; revision=15787
2005-06-04 19:21:15 +00:00
Magnus Olsen
633fbd38c8 fix head so it compile agein
svn path=/trunk/; revision=15786
2005-06-04 19:11:11 +00:00
Magnus Olsen
de07d08907 sorry revert to 15772
svn path=/trunk/; revision=15777
2005-06-04 18:43:39 +00:00
Magnus Olsen
33798a8e08 dib32 more speed optimze
svn path=/trunk/; revision=15774
2005-06-04 17:36:59 +00:00
Magnus Olsen
daaeafc22b small optimze and bug fix optimze color fill for DIB32_BltBit
svn path=/trunk/; revision=15772
2005-06-04 16:09:39 +00:00
Alex Ionescu
59b2cea3cd Sorry I was errm a bit...dizzy
svn path=/trunk/; revision=15771
2005-06-04 13:38:48 +00:00
Alex Ionescu
fd884b9ca2 Fix HEader
svn path=/trunk/; revision=15770
2005-06-04 13:24:50 +00:00
Alex Ionescu
e24313d28a Optimized DstInvert32
svn path=/trunk/; revision=15769
2005-06-04 13:20:34 +00:00
Hartmut Birr
e13bb66f6e Make the bochs debug output in the very early boot phase available, if AUTO_ENABLE_BOCHS is defined.
svn path=/trunk/; revision=15768
2005-06-04 10:05:20 +00:00
Alex Ionescu
651c6eedd3 Add inbv header, stub InvbDisplayString, fix BSOD to always show on screen like it should, make bugcheck macros show the bugcheck data in the debug output. I hope this appeases Hartmut a bit =)
svn path=/trunk/; revision=15763
2005-06-04 00:25:04 +00:00
Magnus Olsen
9f03cb709d more optimze of blt. icon draw lite faster
svn path=/trunk/; revision=15762
2005-06-03 23:21:21 +00:00
Hervé Poussineau
bf82efbfa5 Don't define asm macros that are not used
svn path=/trunk/; revision=15761
2005-06-03 22:44:38 +00:00
Gé van Geldorp
238b5dae79 Fix DBG := 0 build
svn path=/trunk/; revision=15760
2005-06-03 21:18:09 +00:00
Martin Fuchs
44917b7007 remove resrc1.h
svn path=/trunk/; revision=15759
2005-06-03 19:54:52 +00:00
Martin Fuchs
4a13ec527a split the big explorer resource file into smaller language specific rescource scripts
svn path=/trunk/; revision=15758
2005-06-03 19:36:03 +00:00
Magnus Olsen
1ec0b9da80 sorry foregt test one optimze
remove it until futer

svn path=/trunk/; revision=15757
2005-06-03 19:11:10 +00:00
Magnus Olsen
bf66d82efc optimze for bitblt dib32bpp.c
NOTSRCERASE, DSTINVERT
you can gain more speed from these

svn path=/trunk/; revision=15756
2005-06-03 18:57:53 +00:00
Klemens Friedl
3c262aeb05 update resource file (convert linux file to windows linebreak-compatible)
svn path=/trunk/; revision=15755
2005-06-03 18:33:15 +00:00
Klemens Friedl
c46d9a027b Add german language resource file
svn path=/trunk/; revision=15754
2005-06-03 18:23:18 +00:00
Klemens Friedl
a41298140f Add german language resource to the ReactOS Command Processor
(not completely finished, I will update it as soon as possible)

svn path=/trunk/; revision=15753
2005-06-03 18:21:50 +00:00
Maarten Bosma
5fd1b3d346 Some new features like Login, Config.h and Idle message
svn path=/trunk/; revision=15752
2005-06-03 17:28:53 +00:00
Hervé Poussineau
525d26d031 Wait the opening of mouclass device to connect the underlying mouse port driver
svn path=/trunk/; revision=15751
2005-06-03 17:09:47 +00:00
Magnus Olsen
5a2cbdf365 bitblt srcpy optimze it can be more optimze
svn path=/trunk/; revision=15750
2005-06-03 16:57:55 +00:00
Hervé Poussineau
47418050f9 Save DriverObject pointer to device extension
Use INTERFACE_TYPE type instead of ULONG
Use OBJ_KERNEL_HANDLE when opening \Device\PhysicalMemory

svn path=/trunk/; revision=15749
2005-06-03 16:56:27 +00:00
Hartmut Birr
2bb29cba04 Fixed the compiling with DBG set to 1.
svn path=/trunk/; revision=15748
2005-06-03 16:04:40 +00:00
Magnus Olsen
0bbffbfe78 activate 32 to 32 bitblt code
svn path=/trunk/; revision=15747
2005-06-03 12:30:09 +00:00
Hervé Poussineau
8c8bc52df8 Delete unneeded makefile
svn path=/trunk/; revision=15746
2005-06-03 12:03:44 +00:00
Gregor Anich
e631ea01ae DIB_32BPP_BitBlt: Fix ROP4_SRCCOPY case for 32bpp.
This file is ugly!

svn path=/trunk/; revision=15745
2005-06-03 01:45:26 +00:00
Magnus Olsen
f240bd9f61 blt fill did broke winquake fix it now.
svn path=/trunk/; revision=15744
2005-06-03 01:18:02 +00:00
Magnus Olsen
253b2e8c8a thx agein blight and alex.
we got alot faster blt for source copy for 
32bpp to 32bpp now.

svn path=/trunk/; revision=15743
2005-06-03 00:35:31 +00:00
Magnus Olsen
848d499f3d sorry wrong optimze for black and white fixing the start menu
svn path=/trunk/; revision=15742
2005-06-03 00:10:18 +00:00
Martin Fuchs
5416ad8915 Sync from Wine - Henning Gerhardt <henning.gerhardt@web.de>: Update German resource files
svn path=/trunk/; revision=15741
2005-06-02 22:14:53 +00:00
Martin Fuchs
d0551f0760 convert info strings to UTF-16
svn path=/trunk/; revision=15740
2005-06-02 22:09:06 +00:00
Martin Fuchs
9719715092 implemented file properties dialog (partly based on Rob D.'s winfile code)
svn path=/trunk/; revision=15739
2005-06-02 21:39:00 +00:00
Martin Fuchs
dcf3800a39 fix column headers
svn path=/trunk/; revision=15738
2005-06-02 21:32:21 +00:00
Aleksey Bragin
c7f2fa3f15 First version of Explorer's translation into Russian. Done by Dmitry Philippov, checked by me, DarkHobbit and others.
But still needs extensive checking.

svn path=/trunk/; revision=15737
2005-06-02 21:09:29 +00:00
Aleksey Bragin
ab4e0e3543 Changed dialog's size, and sizes of its elements, so russian translation looks nice in it.
By M. Zvyozdochkin.

svn path=/trunk/; revision=15736
2005-06-02 20:47:15 +00:00
Magnus Olsen
34b6e5c4e2 sorry did foregt ;
svn path=/trunk/; revision=15735
2005-06-02 20:47:11 +00:00
Aleksey Bragin
65c31ced72 Fix grammar typo (notinserted -> not inserted) in russian translation.
By M. Zvyozdochkin.

svn path=/trunk/; revision=15734
2005-06-02 20:38:18 +00:00
Steven Edwards
fbb262fc76 add cabinet.dll to the cd
svn path=/trunk/; revision=15733
2005-06-02 20:14:23 +00:00
Magnus Olsen
bd38382acb lite Optimze only for dib32bpp.c
thanks Blight for the inline asm for hline 
bitblt have got optimze for fill black and white color
only. more will come

svn path=/trunk/; revision=15732
2005-06-02 20:12:58 +00:00
Gregor Anich
83c66bb1c1 Make formatting of half-verbose output the same for linux as for windows (add quotes to the echos)
svn path=/trunk/; revision=15731
2005-06-02 19:56:12 +00:00
Emanuele Aliberti
4276c73ec9 svn propset
svn path=/trunk/; revision=15730
2005-06-02 13:20:04 +00:00
Emanuele Aliberti
da87b75712 SM/CSR: move win32k.sys loading from the SM to the Win32 user mode server.
svn path=/trunk/; revision=15729
2005-06-02 13:17:37 +00:00
Emanuele Aliberti
114fa63aa5 Correct midimap location.
svn path=/trunk/; revision=15728
2005-06-02 13:10:57 +00:00
Alex Ionescu
2565867874 Fix midimap/wavemap build
svn path=/trunk/; revision=15727
2005-06-02 03:21:17 +00:00
Steven Edwards
278d41accc this was moved
svn path=/trunk/; revision=15726
2005-06-02 02:12:48 +00:00
James Tabor
13d5ffb301 Removed makefiles.
svn path=/trunk/; revision=15725
2005-06-02 01:37:38 +00:00
James Tabor
bdcd967755 Fixed xml problem.
svn path=/trunk/; revision=15724
2005-06-02 01:36:20 +00:00
James Tabor
59a36a978f Fixed xml problem.
svn path=/trunk/; revision=15723
2005-06-02 01:36:07 +00:00
Hervé Poussineau
c5bcf76042 Don't close port if opening failed
svn path=/trunk/; revision=15722
2005-06-01 23:09:36 +00:00
Eric Kohl
793415253c - Start the logging thread from ServiceMain.
- Move UNICODE definition to the configuration file.
- Code cleanup.

svn path=/trunk/; revision=15721
2005-06-01 21:57:52 +00:00
James Tabor
372172fd93 Adding Cromwell to usb.
svn path=/trunk/; revision=15720
2005-06-01 21:55:36 +00:00
James Tabor
e8d9ee409c Adding Cromwell to usb.
svn path=/trunk/; revision=15719
2005-06-01 21:55:09 +00:00
Eric Kohl
8ebdfa0f0d Build the UNICODE version of the eventlog service.
svn path=/trunk/; revision=15718
2005-06-01 19:43:32 +00:00
Thomas Bluemel
592490d2ae fixed warnings
svn path=/trunk/; revision=15717
2005-06-01 19:01:12 +00:00
Magnus Olsen
1983bc6012 small optimze for StretchBlt
Thanks Alex for the idea with neg for statement
it is still a ref implemnet and have some limits


svn path=/trunk/; revision=15716
2005-06-01 18:11:26 +00:00
Casper Hornstrup
0e6919a8c0 Build with MP=1
svn path=/trunk/; revision=15715
2005-06-01 17:28:51 +00:00
Casper Hornstrup
2786a429ac Remove unneded file
svn path=/trunk/; revision=15714
2005-06-01 17:27:55 +00:00
Alex Ionescu
c5bf36a5de Fix some debug messages (do I need to patch this to wine?)
svn path=/trunk/; revision=15712
2005-06-01 01:59:05 +00:00
Alex Ionescu
18aa07be14 Fix some debug messages
svn path=/trunk/; revision=15711
2005-06-01 01:56:55 +00:00
Magnus Olsen
bf6e782ee1 small optimze for StretchBlt
now do only getpixel ones instead call hole time on getpixel for the color value when it stretch to biger BMP
the hole stretchblt need to be optimze this code are geting it working bit faster and it is reference implementation

svn path=/trunk/; revision=15710
2005-05-31 23:58:14 +00:00
Gé van Geldorp
17d0c2f684 Small present for ion
svn path=/trunk/; revision=15709
2005-05-31 22:06:18 +00:00
Klemens Friedl
2764274eb7 update wallpaper list
svn path=/trunk/; revision=15707
2005-05-31 20:47:11 +00:00
Casper Hornstrup
46fc8e6a4c Delete
svn path=/trunk/; revision=15706
2005-05-31 20:40:27 +00:00
Casper Hornstrup
f892959c3d MP configuration
svn path=/trunk/; revision=15705
2005-05-31 20:39:13 +00:00
Magnus Olsen
0a91aa1d44 strechblt
gain very lite perfomen boost

svn path=/trunk/; revision=15704
2005-05-31 19:44:36 +00:00
Casper Hornstrup
b4dae62ae5 Generate SMP friendly temporary filenames
svn path=/trunk/; revision=15703
2005-05-31 17:30:54 +00:00
Magnus Olsen
e346b7e2ce complete dummy hal
svn path=/trunk/; revision=15702
2005-05-31 15:46:26 +00:00
Magnus Olsen
64d4d57449 Fix a bugin strechblt. it can now zoom in or out in any bpp
still this need todo
/* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
/* This is a reference implementation, it hasn't been optimized for speed */



svn path=/trunk/; revision=15701
2005-05-31 15:19:10 +00:00
Hartmut Birr
63843d944f - Added a missing dereferencing in NtTerminateProcess.
- Don't access already freed memory while sending messages to the termination port (in PspExitThread).

svn path=/trunk/; revision=15700
2005-05-31 15:01:29 +00:00
Hartmut Birr
9029590177 Try always to open a file as named object first.
This is necessary for the redirection to NUL which is used by the new build system.

svn path=/trunk/; revision=15699
2005-05-31 14:56:55 +00:00
Hartmut Birr
17b55d1d60 Changed the indentation to a more readable format (no other changes).
svn path=/trunk/; revision=15698
2005-05-31 14:51:53 +00:00
Magnus Olsen
e79b3bf80c implement strechblt for all 8bpp this code are not optimze.
tested with winquake 8bpp to 16/32bpp. 
/* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
/* This is a reference implementation, it hasn't been optimized for speed */

svn path=/trunk/; revision=15697
2005-05-31 14:11:02 +00:00
Hervé Poussineau
48af34a807 Add registry entries for serial mouse driver
svn path=/trunk/; revision=15696
2005-05-31 13:49:41 +00:00
Hervé Poussineau
eddf35ba2a Don't try to detect serial ports at known I/O addresses. They have to be written in registry and enumerated by Root bus enumerator.
Get interrupt informations from AllocatedResourcesTranslated in IRP_MN_START_DEVICE

svn path=/trunk/; revision=15695
2005-05-31 10:35:22 +00:00
James Tabor
907751c162 Change Xml from msafd32.dll to msafd.dll.
svn path=/trunk/; revision=15694
2005-05-31 08:02:29 +00:00
Hartmut Birr
c46482a139 Build a correct console handle.
svn path=/trunk/; revision=15693
2005-05-30 23:22:15 +00:00
Hervé Poussineau
361b320cf8 Read resource requirements list for devices enumerated by Root bus
svn path=/trunk/; revision=15692
2005-05-30 23:01:37 +00:00
Hervé Poussineau
13ffb8ef14 Write resource requirements list in the registry, instead of its address
svn path=/trunk/; revision=15691
2005-05-30 22:55:09 +00:00
Gé van Geldorp
12628f673c Work around problem in wrc
svn path=/trunk/; revision=15690
2005-05-30 21:35:07 +00:00
Gé van Geldorp
e163d454bc Revert last change, it was causing build problems. Go back to causing run
problems instead (try Start/Run/Browse)

svn path=/trunk/; revision=15689
2005-05-30 20:37:29 +00:00
Hartmut Birr
1fac54757a Check for a valid console handle.
svn path=/trunk/; revision=15688
2005-05-30 20:13:35 +00:00
Hartmut Birr
e3d66fd5c6 - Don't duplicate the process handle.
- Do close the process and thread handle if the caller doesn't request it.

svn path=/trunk/; revision=15687
2005-05-30 20:11:44 +00:00
Aleksey Bragin
277b2da899 Add translation for "Templates" by unC0Rr
svn path=/trunk/; revision=15686
2005-05-30 19:45:04 +00:00
Gé van Geldorp
9948c2bbfa Revert some incorrect changes that were made during rbuild merge
svn path=/trunk/; revision=15685
2005-05-30 19:19:06 +00:00
Aleksey Bragin
1e05d99733 Added russian translation for lib/userenv. Done by Dimtry Philippov.
svn path=/trunk/; revision=15684
2005-05-30 18:46:49 +00:00
Filip Navara
61cbda4605 Don't lock the primary surface just to get info we already have.
svn path=/trunk/; revision=15681
2005-05-30 13:00:50 +00:00
Filip Navara
5417e5d19c Add MSVFW32 and MSWSOCK to the build.
svn path=/trunk/; revision=15680
2005-05-30 12:52:38 +00:00
Filip Navara
b84060f8e3 Remove redundant line...
svn path=/trunk/; revision=15679
2005-05-30 08:12:30 +00:00
Magnus Olsen
3eedff3253 fix winquake color glitc bug
the text are now whie instead for black

svn path=/trunk/; revision=15678
2005-05-30 07:27:22 +00:00
Magnus Olsen
30976b41c4 add rospref to defualt build
and remove a makefile that is not need it 
patch By WaxDragon

svn path=/trunk/; revision=15677
2005-05-29 22:33:25 +00:00
Gé van Geldorp
f46df32f70 Prevent kernel32.dll and winmm.dll from overlapping
svn path=/trunk/; revision=15676
2005-05-29 21:40:17 +00:00
Aleksey Bragin
554f18954d Added WS_VSCROLL to a language selection combobox (thx to unC0Rr)
svn path=/trunk/; revision=15675
2005-05-29 21:16:29 +00:00
Magnus Olsen
8c2b8755dc remove old makefile add xml makefile
svn path=/trunk/; revision=15674
2005-05-29 21:00:11 +00:00
Magnus Olsen
9cd1969b76 fix expand.exe compile and include on the bootcd
svn path=/trunk/; revision=15673
2005-05-29 20:58:38 +00:00
Alex Ionescu
4286032cc7 Fix function bug
svn path=/trunk/; revision=15672
2005-05-29 20:49:56 +00:00
Hervé Poussineau
7599760096 Read device instance IDs in registry instead of forcing 0000. This allows more than one instance for each device enumerated by Root bus.
Be ready to have resource requirements for each device instance (not used ATM)
Replace some ExAllocatePool/ExFreePool with ExAllocatePoolWithTag/ExFreePoolWithTag

svn path=/trunk/; revision=15671
2005-05-29 19:48:43 +00:00
Alex Ionescu
39e84ca95f Wrappers for debug builds only, like before.
svn path=/trunk/; revision=15670
2005-05-29 19:41:24 +00:00
Gé van Geldorp
045a7df56c Don't build as Unicode
svn path=/trunk/; revision=15669
2005-05-29 19:06:30 +00:00
Casper Hornstrup
3444049ffb Install explorer-cfg-template.xml
svn path=/trunk/; revision=15668
2005-05-29 16:07:35 +00:00
Alex Ionescu
0e1269ee48 Build at 2GB like before
svn path=/trunk/; revision=15667
2005-05-29 16:07:05 +00:00
Hartmut Birr
a67e88ab21 Change the object to non permanent if an error occurs (in NtCreateDirectoryObject).
svn path=/trunk/; revision=15666
2005-05-29 15:43:53 +00:00
Hartmut Birr
6ec730fc4c Reset the permanent flag if the object is changed to non permanent.
svn path=/trunk/; revision=15665
2005-05-29 15:41:24 +00:00
Hartmut Birr
717888776f Lock the directory while it is parsed.
svn path=/trunk/; revision=15664
2005-05-29 15:37:47 +00:00
Magnus Olsen
2c5946dd01 remove some unse Makefile.ros-template files
not longer need it

svn path=/trunk/; revision=15663
2005-05-29 15:17:38 +00:00
Filip Navara
8b4668efce Set entry point to zero.
svn path=/trunk/; revision=15662
2005-05-29 15:10:11 +00:00
Casper Hornstrup
f5fdc514d3 vgamp.sys, not vgamp.dll
svn path=/trunk/; revision=15661
2005-05-29 15:05:22 +00:00
Casper Hornstrup
ba885106f7 Install to system32
svn path=/trunk/; revision=15660
2005-05-29 14:51:17 +00:00
Casper Hornstrup
3cb2f38e73 Install more modules
svn path=/trunk/; revision=15659
2005-05-29 14:35:36 +00:00
Gé van Geldorp
204cfe40fe Use standard debug macros
svn path=/trunk/; revision=15658
2005-05-29 14:26:21 +00:00
Casper Hornstrup
93d4234a07 regsvr32.exe, not regsvr32.dll
svn path=/trunk/; revision=15657
2005-05-29 14:09:04 +00:00
Casper Hornstrup
750ce3d65a Autodetect nasm
svn path=/trunk/; revision=15656
2005-05-29 11:51:37 +00:00
Martin Fuchs
66500a1428 implement 'delete' command
svn path=/trunk/; revision=15655
2005-05-29 11:42:46 +00:00
Martin Fuchs
32ec815105 switch to SHFileOperation() for file copy and move operations
svn path=/trunk/; revision=15654
2005-05-29 09:58:47 +00:00
Martin Fuchs
ff58b88eaf handle copy/move for already existing target directories
svn path=/trunk/; revision=15653
2005-05-29 09:39:31 +00:00
Martin Fuchs
02fa1a2b59 implement file copying
svn path=/trunk/; revision=15652
2005-05-29 08:47:23 +00:00
Martin Fuchs
2a46b799fc refresh display after executing a context menu command
svn path=/trunk/; revision=15651
2005-05-29 08:38:23 +00:00
Filip Navara
5c43578bfd Fix ASSERT conditions.
svn path=/trunk/; revision=15650
2005-05-29 07:29:59 +00:00
Magnus Olsen
d593712681 remove some ros-tempöate from old building system
svn path=/trunk/; revision=15649
2005-05-29 01:04:44 +00:00
Thomas Bluemel
d1d04bc6c6 fix gcc4 warnings
svn path=/trunk/; revision=15648
2005-05-29 00:04:41 +00:00
Magnus Olsen
89f3ea02c7 this two file are not need any longer
svn path=/trunk/; revision=15647
2005-05-28 23:38:58 +00:00
Magnus Olsen
7e6a4cd48c Remove two file that are not need any longer
fix some compilings warings

svn path=/trunk/; revision=15646
2005-05-28 23:34:24 +00:00
Alex Ionescu
de71d516e8 disable assert until someone fixes this
svn path=/trunk/; revision=15645
2005-05-28 23:26:37 +00:00
Magnus Olsen
54805d4cf5 mising desk.rc in the xml files
de.rc and cz.rc a resuse id was change 

svn path=/trunk/; revision=15644
2005-05-28 23:16:12 +00:00
Alex Ionescu
2ca6508908 More fixes from yours truly
svn path=/trunk/; revision=15643
2005-05-28 23:06:49 +00:00
Alex Ionescu
a2efaabdcd more build fixes
svn path=/trunk/; revision=15642
2005-05-28 22:56:14 +00:00
Alex Ionescu
0ba1f085f1 more build fixes
svn path=/trunk/; revision=15641
2005-05-28 22:48:33 +00:00
Thomas Bluemel
3574d717a4 little fix
svn path=/trunk/; revision=15640
2005-05-28 22:40:04 +00:00
James Tabor
ad652aad95 Added usbuhci to xml file.
svn path=/trunk/; revision=15639
2005-05-28 22:25:51 +00:00
James Tabor
397ca71b9f Added usbohci to xml file.
svn path=/trunk/; revision=15638
2005-05-28 22:25:29 +00:00
James Tabor
a2497ea64c Added usbehci to xml file.
svn path=/trunk/; revision=15637
2005-05-28 22:25:09 +00:00
James Tabor
39b694fcf3 Added usb miniport to xml file.
svn path=/trunk/; revision=15636
2005-05-28 22:24:22 +00:00
James Tabor
8a624fa286 Added usb miniport to xml file.
svn path=/trunk/; revision=15635
2005-05-28 22:23:51 +00:00
Thomas Bluemel
12e17e01f0 make rbuild compile with gcc4
svn path=/trunk/; revision=15634
2005-05-28 22:22:25 +00:00
Alex Ionescu
2db9bd4682 Fix some build problems
svn path=/trunk/; revision=15633
2005-05-28 22:18:44 +00:00
Martin Fuchs
9a4b9913ce fix case problem of sv.rc third (and hopefully last ;-) time for unix+windows builds
svn path=/trunk/; revision=15632
2005-05-28 22:12:40 +00:00
Gé van Geldorp
bf1ac08f8f Make compiler happy
svn path=/trunk/; revision=15631
2005-05-28 22:08:49 +00:00
Gé van Geldorp
99a53a6f13 Robert Shearman <rob@codeweavers.com>
- Rename DllRegisterServer and DllUnregisterServer to avoid confusion
  with the COM functions of different signatures.

svn path=/trunk/; revision=15630
2005-05-28 22:04:24 +00:00
Gé van Geldorp
2ba2487f4b Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
Mike McCormack <mike@codeweavers.com>
- Make WINMM_IData statically allocated.
- Make multimedia threads high priority.
Robert Reif <reif@earthlink.net>
- Change FIXME to WARN.
- Set thread priority for timer thread.
- Add timer thread priority test.

svn path=/trunk/; revision=15629
2005-05-28 22:01:15 +00:00
James Tabor
ae660b3636 Added def to xml file.
svn path=/trunk/; revision=15628
2005-05-28 22:00:46 +00:00
James Tabor
bcc09d453e Added def to xml file.
svn path=/trunk/; revision=15627
2005-05-28 22:00:27 +00:00
Alex Ionescu
da2d081ecb use right optimization setting
svn path=/trunk/; revision=15626
2005-05-28 21:46:37 +00:00
Gé van Geldorp
9259eba707 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Troy Rollo <wine@troy.rollo.name>
- Implement URLMonikerImpl_BindToStorage.
- Correct bug truncating downloaded files to 4096 bytes.
Jacek Caban <jack@itma.pwr.wroc.pl>
- Separated IBinding and IMoniker interfaces.
Mike McCormack <mike@codeweavers.com>
- Add the missing interface method PromptAction to
  IInternetZoneManager.
- Stub implementation for GetSoftwareUpdateInfo.
Francois Gouget <fgouget@free.fr>
- Update win32.api to match the current sources.
- Declare CoGetClassObjectFromURL() in urlmon.h.
Christian Costa <titan.costa@wanadoo.fr>
- Added stub implementation for CoGetClassObjectFromURL.

svn path=/trunk/; revision=15625
2005-05-28 21:44:21 +00:00
James Tabor
d07eefd752 Temp Fix until I figure out what is wrong with Asserts.
svn path=/trunk/; revision=15624
2005-05-28 21:40:01 +00:00
Gé van Geldorp
dfe4710889 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- Test cases for URL_UNESCAPE and small fix.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=15623
2005-05-28 21:39:03 +00:00
James Tabor
3c412fecf4 Add Usbport to new build system.
svn path=/trunk/; revision=15622
2005-05-28 21:38:59 +00:00
James Tabor
b39c62c8bb Add Usbport to new build system.
svn path=/trunk/; revision=15621
2005-05-28 21:38:05 +00:00
Gé van Geldorp
74c1a38507 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Robert Shearman <rob@codeweavers.com>
- Rename MODULENAME_Dll* functions to Dll* for better consistency and
  type checking.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use SUBLANG_NEUTRAL for French resources.

svn path=/trunk/; revision=15620
2005-05-28 21:34:33 +00:00
Magnus Olsen
e9c01796ad fix compilings warings
svn path=/trunk/; revision=15619
2005-05-28 21:32:23 +00:00
James Tabor
522e3d74e0 Add Usbhub to new build system.
svn path=/trunk/; revision=15618
2005-05-28 21:30:37 +00:00
Gé van Geldorp
05e1c2d4b7 Ge van Geldorp <gvg@reactos.com>
- Overlay icons for .lnk files with a small arrow in the lower left
  corner.
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
- Comment out stub WEP entry points so that we can call WEP for builtin
  dlls too.
Juan Lang <juan_lang@yahoo.com>
- Fixes to IShellFolder::GetAttributesOf implementations, spotted by
  silverblade_:
  - a count of zero is allowed to GetAttributesOf if apidl is NULL
  - SFGAO_VALIDATE must be cleared upon return
- only log unsupported flags in ShellExecute
- environment variables are expanded, so SEE_MASK_DOENVSUBST is
  supported
Michael Jung <mjung@iss.tu-darmstadt.de>
- Add a new CLSID for UnixDosFolder, which is identical to UnixFolder,
  but does unix <-> dos path conversion for GetDisplayNameOf and
  ParseDisplayName.
- Make the root of the shell extension map to the root of the unix
  filesystem.
- More robustly query the SHGDN_FORPARSING flag in the shell32's folders
  GetDisplayNameOf methods.
- Fixed GetDisplayNameOf method to not depend on incorrect behaviour
  regarding the SHGDN_INFOLDER flag.
- Fixed MyComputer's GetDisplayNameOf method.
- Return a cloned PIDL by SHBrowseForFolder to avoid heap corruption.
- Fixed incorrect IShellFolder::EnumOjects API usage.
- Support for regular files (as opposed to directories).
- Display a drive icon for the unix root directory.
- Consider only the GIL_FORSHORTCUT flag in SIC_CompareEntries.
Stefan Doesinger <stefandoesinger@gmx.at>
- Handle cidl==0 in shfldr_desktop, shfldr_fs and shfldr_mycomp.
- Remove the dwAttributes member from the IGenericSFImpl class, it's
  not needed and can't be initialised in Initialize and InitializeEx.
Mike McCormack <mike@codeweavers.com>
- Split SHGetFileInfoW into two functions.
- Remove static variables in SHBrowseForFolder implementation.
- Split up the window procedure.
- Remove some unused include files.
- MSI advertised shortcuts don't require a product ID.
Peter Berg Larsen <pebl@math.ku.dk>
- Rewritten DoEnvironmentSubst16.
Kouji Sasaki <taro-x@justsystem.co.jp>
- Added the processing for determination of SFGAO_HASSUBFOLDER flag in
  SHELL32_GetItemAttribute function.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Huw Davies <huw@codeweavers.com>
- It makes no sense to have a left pointing arrow as the desktop icon.
  Replace it with something more appropiate.
Mike Hearn <mh@codeweavers.com>
- Fix SHELL_GetPathFromIDList[AW] to return the desktop path given an
  empty PIDL.

svn path=/trunk/; revision=15617
2005-05-28 21:30:32 +00:00
James Tabor
1a3b44f52a Add Usbd to new build system.
svn path=/trunk/; revision=15616
2005-05-28 21:30:02 +00:00
James Tabor
eeec0bf547 Add Usb Directory to new build system.
svn path=/trunk/; revision=15615
2005-05-28 21:29:20 +00:00
James Tabor
edd06a247e Add Usb Directory to new build system.
svn path=/trunk/; revision=15614
2005-05-28 21:28:11 +00:00
Magnus Olsen
a205dac113 remove soem warings for optimze build
svn path=/trunk/; revision=15613
2005-05-28 21:16:34 +00:00
Aleksey Bragin
282184ee88 Added vfatxlib support in the new build system
svn path=/trunk/; revision=15612
2005-05-28 21:08:56 +00:00
9988 changed files with 71145 additions and 3124839 deletions

View File

@@ -2,19 +2,22 @@
#ifndef __WIN32K_BITMAPS_H
#define __WIN32K_BITMAPS_H
#include <win32k/dc.h>
#include <win32k/gdiobj.h>
/* GDI logical bitmap object */
typedef struct _BITMAPOBJ
{
SURFOBJ SurfObj;
FLONG flHooks;
FLONG flFlags;
SIZE dimension; /* For SetBitmapDimension(), do NOT use
to get width/height of bitmap, use
bitmap.bmWidth/bitmap.bmHeight for
that */
SIZE dimension; /* For SetBitmapDimension(), do NOT use
to get width/height of bitmap, use
bitmap.bmWidth/bitmap.bmHeight for
that */
#ifdef NTOS_MODE_USER
PVOID BitsLock;
#else
PFAST_MUTEX BitsLock; /* You need to hold this lock before you touch
the actual bits in the bitmap */
#endif
/* For device-independent bitmaps: */
DIBSECTION *dib;
@@ -29,10 +32,16 @@ typedef struct _BITMAPOBJ
((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP))
#define BITMAPOBJ_FreeBitmap(hBMObj) \
GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
#define BITMAPOBJ_LockBitmap(hBMObj) GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)
#define BITMAPOBJ_UnlockBitmap(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj)
/* NOTE: Use shared locks! */
#define BITMAPOBJ_LockBitmap(hBMObj) (PBITMAPOBJ)EngLockSurface((HSURF)hBMObj)
#define BITMAPOBJ_UnlockBitmap(pBMObj) EngUnlockSurface(&pBMObj->SurfObj)
BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);
BOOL INTERNAL_CALL BITMAPOBJ_InitBitsLock(BITMAPOBJ *pBMObj);
#define BITMAPOBJ_LockBitmapBits(pBMObj) ExAcquireFastMutex((pBMObj)->BitsLock)
#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutex((pBMObj)->BitsLock)
void INTERNAL_CALL BITMAPOBJ_CleanupBitsLock(BITMAPOBJ *pBMObj);
INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp);
HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP hBitmap);
INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth);

112
inc_w32k/brush.h Normal file
View File

@@ -0,0 +1,112 @@
#ifndef __WIN32K_BRUSH_H
#define __WIN32K_BRUSH_H
#include <win32k/gdiobj.h>
/* Internal interface */
#define NB_HATCH_STYLES 6
/*
* The layout of this structure is taken from "Windows Graphics Programming"
* book written by Feng Yuan.
*
* DON'T MODIFY THIS STRUCTURE UNLESS REALLY NEEDED AND EVEN THEN ASK ON
* A MAILING LIST FIRST.
*/
typedef struct
{
ULONG AttrFlags;
COLORREF lbColor;
} BRUSHATTR, *PBRUSHATTR;
typedef struct
{
ULONG ulStyle;
HBITMAP hbmPattern;
HANDLE hbmClient;
ULONG flAttrs;
ULONG ulBrushUnique;
BRUSHATTR *pBrushAttr;
BRUSHATTR BrushAttr;
POINT ptOrigin;
ULONG bCacheGrabbed;
COLORREF crBack;
COLORREF crFore;
ULONG ulPalTime;
ULONG ulSurfTime;
PVOID ulRealization;
ULONG Unknown4C[3];
POINT ptPenWidth;
ULONG ulPenStyle;
DWORD *pStyle;
ULONG dwStyleCount;
ULONG Unknown6C;
} GDIBRUSHOBJ, *PGDIBRUSHOBJ;
typedef struct
{
BRUSHOBJ BrushObject;
PGDIBRUSHOBJ GdiBrushObject;
XLATEOBJ *XlateObject;
} GDIBRUSHINST, *PGDIBRUSHINST;
/* GDI Brush Attributes */
#define GDIBRUSH_NEED_BK_CLR 0x0002 /* Background color is needed */
#define GDIBRUSH_DITHER_OK 0x0004 /* Allow color dithering */
#define GDIBRUSH_IS_SOLID 0x0010 /* Solid brush */
#define GDIBRUSH_IS_HATCH 0x0020 /* Hatch brush */
#define GDIBRUSH_IS_BITMAP 0x0040 /* DDB pattern brush */
#define GDIBRUSH_IS_DIB 0x0080 /* DIB pattern brush */
#define GDIBRUSH_IS_NULL 0x0100 /* Null/hollow brush */
#define GDIBRUSH_IS_GLOBAL 0x0200 /* Stock objects */
#define GDIBRUSH_IS_PEN 0x0400 /* Pen */
#define GDIBRUSH_IS_OLDSTYLEPEN 0x0800 /* Geometric pen */
#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */
#define GDIBRUSH_CACHED_IS_SOLID 0x80000000
#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH))
#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)
#define BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH))
#define BRUSHOBJ_UnlockBrush(pBrush) GDIOBJ_UnlockObjByPtr(pBrush)
BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody);
HBRUSH STDCALL
NtGdiCreateBrushIndirect(
CONST LOGBRUSH *LogBrush);
HBRUSH STDCALL
NtGdiCreateDIBBrush(
CONST BITMAPINFO *BitmapInfoAndData,
UINT ColorSpec,
UINT BitmapInfoSize,
CONST VOID *PackedDIB);
HBRUSH STDCALL
NtGdiCreateHatchBrush(
INT Style,
COLORREF Color);
HBRUSH STDCALL
NtGdiCreatePatternBrush(
HBITMAP hBitmap);
HBRUSH STDCALL
NtGdiCreateSolidBrush(
COLORREF Color);
BOOL STDCALL
NtGdiFixBrushOrgEx(
VOID);
BOOL STDCALL
NtGdiSetBrushOrgEx(
HDC hDC,
INT XOrg,
INT YOrg,
LPPOINT Point);
#endif

23
inc_w32k/caret.h Normal file
View File

@@ -0,0 +1,23 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: include/win32k/caret.h
* PURPOSE: GDI32/Win32k Caret interface
* PROGRAMMER:
*
*/
#ifndef WIN32K_CARET_H_INCLUDED
#define WIN32K_CARET_H_INCLUDED
typedef struct _THRDCARETINFO
{
HWND hWnd;
HBITMAP Bitmap;
POINT Pos;
SIZE Size;
BYTE Visible;
BYTE Showing;
} THRDCARETINFO, *PTHRDCARETINFO;
#endif /* WIN32K_FONT_H_INCLUDED */

View File

@@ -1,8 +1,6 @@
#ifndef __WIN32K_COORD_H
#define __WIN32K_COORD_H
#include "dc.h"
BOOL
STDCALL
NtGdiCombineTransform (

95
inc_w32k/cursoricon.h Normal file
View File

@@ -0,0 +1,95 @@
#ifndef __WIN32K_CURSORICON_H
#define __WIN32K_CURSORICON_H
#include <pshpack1.h>
/* Structures for reading icon/cursor files and resources */
// Structures for reading icon files and resources
typedef struct _ICONIMAGE
{
BITMAPINFOHEADER icHeader; // DIB header
RGBQUAD icColors[1]; // Color table
BYTE icXOR[1]; // DIB bits for XOR mask
BYTE icAND[1]; // DIB bits for AND mask
} ICONIMAGE, *LPICONIMAGE;
typedef struct _CURSORIMAGE
{
BITMAPINFOHEADER icHeader; // DIB header
RGBQUAD icColors[1]; // Color table
BYTE icXOR[1]; // DIB bits for XOR mask
BYTE icAND[1]; // DIB bits for AND mask
} CURSORIMAGE, *LPCURSORIMAGE;
typedef struct
{
BYTE bWidth;
BYTE bHeight;
BYTE bColorCount;
BYTE bReserved;
} ICONRESDIR;
typedef struct
{
WORD wWidth;
WORD wHeight;
} CURSORRESDIR;
typedef struct
{
WORD wPlanes; // Number of Color Planes in the XOR image
WORD wBitCount; // Bits per pixel in the XOR image
} ICONDIR;
typedef struct
{
WORD wXHotspot; // Number of Color Planes in the XOR image
WORD wYHotspot; // Bits per pixel in the XOR image
} CURSORDIR;
typedef struct
{
BYTE bWidth; // Width, in pixels, of the icon image
BYTE bHeight; // Height, in pixels, of the icon image
BYTE bColorCount; // Number of colors in image (0 if >=8bpp)
BYTE bReserved; // Reserved ( must be 0)
union
{ ICONDIR icon;
CURSORDIR cursor;
} Info;
DWORD dwBytesInRes; // How many bytes in this resource?
DWORD dwImageOffset; // Where in the file is this image?
} CURSORICONDIRENTRY;
typedef struct
{
WORD idReserved; // Reserved (must be 0)
WORD idType; // Resource Type (1 for icons, 0 for cursors)
WORD idCount; // How many images?
CURSORICONDIRENTRY idEntries[1]; // An entry for idCount number of images
} CURSORICONDIR;
typedef struct
{
union
{ ICONRESDIR icon;
CURSORRESDIR cursor;
} ResInfo;
WORD wPlanes; // Color Planes
WORD wBitCount; // Bits per pixel
DWORD dwBytesInRes; // how many bytes in this resource?
WORD nID; // the ID
} GRPCURSORICONDIRENTRY;
typedef struct
{
WORD idReserved; // Reserved (must be 0)
WORD idType; // Resource type (1 for icons)
WORD idCount; // How many images?
GRPCURSORICONDIRENTRY idEntries[1]; // The entries for each image
} GRPCURSORICONDIR;
#include <poppack.h>
#endif

View File

@@ -2,11 +2,6 @@
#ifndef __WIN32K_DC_H
#define __WIN32K_DC_H
#include <windows.h>
#include <win32k/driver.h>
#include <win32k/gdiobj.h>
#include <win32k/path.h>
typedef struct _WIN_DC_INFO
{
int flags;
@@ -135,7 +130,11 @@ typedef struct
GDIINFO GDIInfo;
DEVINFO DevInfo;
DRIVER_FUNCTIONS DriverFunctions;
#ifdef NTOS_MODE_USER
PVOID VideoFileObject;
#else
PFILE_OBJECT VideoFileObject;
#endif
BOOLEAN PreparedDriver;
ULONG DisplayNumber;
@@ -149,10 +148,12 @@ typedef struct
/* Internal functions */
#ifndef NTOS_MODE_USER
#define DC_LockDc(hDC) \
((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
#define DC_UnlockDc(hDC) \
GDIOBJ_UnlockObj ((HGDIOBJ) hDC)
#define DC_UnlockDc(pDC) \
GDIOBJ_UnlockObjByPtr (pDC)
HDC FASTCALL RetrieveDisplayHDC(VOID);
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
@@ -167,6 +168,8 @@ VOID FASTCALL DC_SetOwnership(HDC DC, PEPROCESS Owner);
VOID FASTCALL DC_UpdateXforms(PDC dc);
BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest);
#endif
/* User entry points */
BOOL STDCALL NtGdiCancelDC(HDC hDC);
@@ -186,11 +189,6 @@ INT STDCALL NtGdiDrawEscape(HDC hDC,
INT cbInput,
LPCSTR lpszInData);
#ifndef __USE_W32API
/* FIXME: this typedef should go somewhere else... */
typedef VOID (*GOBJENUMPROC)(PVOID, LPARAM);
#endif
INT STDCALL NtGdiEnumObjects(HDC hDC,
INT ObjectType,
GOBJENUMPROC ObjectFunc,

View File

@@ -175,6 +175,8 @@ typedef struct _DRIVER_FUNCTIONS
PGD_ALPHABLEND AlphaBlend;
} DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
#ifndef NTOS_MODE_USER
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver);
PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name);
PFILE_OBJECT DRIVER_FindMPDriver(ULONG DisplayNumber);
@@ -186,3 +188,5 @@ INT DRIVER_UnreferenceDriver (LPCWSTR Name);
#endif
#endif

25
inc_w32k/font.h Normal file
View File

@@ -0,0 +1,25 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: include/win32k/font.h
* PURPOSE: GDI32/Win32k font interface
* PROGRAMMER:
*
*/
#ifndef WIN32K_FONT_H_INCLUDED
#define WIN32K_FONT_H_INCLUDED
typedef struct tagFONTFAMILYINFO
{
ENUMLOGFONTEXW EnumLogFontEx;
NEWTEXTMETRICEXW NewTextMetricEx;
DWORD FontType;
} FONTFAMILYINFO, *PFONTFAMILYINFO;
int STDCALL NtGdiGetFontFamilyInfo(HDC Dc, LPLOGFONTW LogFont, PFONTFAMILYINFO Info, DWORD Size);
BOOL STDCALL NtGdiTranslateCharsetInfo(PDWORD Src, LPCHARSETINFO CSI, DWORD Flags);
DWORD STDCALL NtGdiGetFontData(HDC,DWORD,DWORD,LPVOID,DWORD);
#endif /* WIN32K_FONT_H_INCLUDED */

View File

@@ -6,8 +6,6 @@
#ifndef __WIN32K_GDIOBJ_H
#define __WIN32K_GDIOBJ_H
#include <ddk/ntddk.h>
/* base address where the handle table is mapped to */
#define GDI_HANDLE_TABLE_BASE_ADDRESS (0x400000)
@@ -60,14 +58,20 @@
typedef PVOID PGDIOBJ;
#ifndef NTOS_MODE_USER
typedef BOOL (INTERNAL_CALL *GDICLEANUPPROC)(PVOID ObjectBody);
#endif
/*!
* GDI object header. This is a part of any GDI object
*/
typedef struct _GDIOBJHDR
{
#ifdef NTOS_MODE_USER
PVOID LockingThread;
#else
PETHREAD LockingThread; /* only assigned if a thread is holding the lock! */
#endif
ULONG Locks;
#ifdef GDI_DEBUG
const char* createdfile;
@@ -77,10 +81,13 @@ typedef struct _GDIOBJHDR
#endif
} GDIOBJHDR, *PGDIOBJHDR;
#ifndef NTOS_MODE_USER
BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle);
void INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS Owner);
void INTERNAL_CALL GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo);
BOOL INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
VOID INTERNAL_CALL GDIOBJ_UnlockObjByPtr(PGDIOBJ Object);
#define GDIOBJ_GetObjectType(Handle) \
GDI_HANDLE_GET_TYPE(Handle)
@@ -91,26 +98,28 @@ BOOL INTERNAL_CALL GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj);
#define GDIOBJ_AllocObj(ty) GDIOBJ_AllocObjDbg(__FILE__,__LINE__,ty)
#define GDIOBJ_FreeObj(obj,ty) GDIOBJ_FreeObjDbg(__FILE__,__LINE__,obj,ty)
#define GDIOBJ_LockObj(obj,ty) GDIOBJ_LockObjDbg(__FILE__,__LINE__,obj,ty)
#define GDIOBJ_UnlockObj(obj) GDIOBJ_UnlockObjDbg(__FILE__,__LINE__,obj)
#define GDIOBJ_ShareLockObj(obj,ty) GDIOBJ_ShareLockObjDbg(__FILE__,__LINE__,obj,ty)
HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObjDbg(const char* file, int line, ULONG ObjectType);
BOOL INTERNAL_CALL GDIOBJ_FreeObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
PGDIOBJ INTERNAL_CALL GDIOBJ_LockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
BOOL INTERNAL_CALL GDIOBJ_UnlockObjDbg (const char* file, int line, HGDIOBJ hObj);
PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObjDbg (const char* file, int line, HGDIOBJ hObj, DWORD ObjectType);
#else /* !GDI_DEBUG */
HGDIOBJ INTERNAL_CALL GDIOBJ_AllocObj(ULONG ObjectType);
BOOL INTERNAL_CALL GDIOBJ_FreeObj (HGDIOBJ hObj, DWORD ObjectType);
PGDIOBJ INTERNAL_CALL GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType);
BOOL INTERNAL_CALL GDIOBJ_UnlockObj (HGDIOBJ hObj);
PGDIOBJ INTERNAL_CALL GDIOBJ_ShareLockObj (HGDIOBJ hObj, DWORD ObjectType);
#endif /* GDI_DEBUG */
PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
#endif
#define GDIOBJFLAG_DEFAULT (0x0)
#define GDIOBJFLAG_IGNOREPID (0x1)
#define GDIOBJFLAG_IGNORELOCK (0x2)
PVOID INTERNAL_CALL GDI_MapHandleTable(PEPROCESS Process);
#endif

View File

@@ -5,14 +5,18 @@
#define INTERNAL_CALL STDCALL
#endif
#include <win32k/bitmaps.h>
#include <win32k/brush.h>
#include <win32k/callback.h>
#include <win32k/caret.h>
#include <win32k/cliprgn.h>
#include <win32k/color.h>
#include <win32k/coord.h>
#include <win32k/cursoricon.h>
#include <win32k/path.h>
#include <win32k/driver.h>
#include <win32k/dc.h>
#include <win32k/debug.h>
#include <win32k/coord.h>
#include <win32k/bitmaps.h>
//#include <win32k/debug.h>
#include <win32k/fillshap.h>
#include <win32k/font.h>
#include <win32k/icm.h>
@@ -22,7 +26,6 @@
#include <win32k/misc.h>
#include <win32k/ntuser.h>
#include <win32k/paint.h>
#include <win32k/path.h>
#include <win32k/pen.h>
#include <win32k/print.h>
#include <win32k/region.h>

250
inc_w32k/menu.h Normal file
View File

@@ -0,0 +1,250 @@
/* $Id$ */
#ifndef WIN32K_MENU_H_INCLUDED
#define WIN32K_MENU_H_INCLUDED
typedef struct tagROSMENUINFO {
/* ----------- MENUINFO ----------- */
DWORD cbSize;
DWORD fMask;
DWORD dwStyle;
UINT cyMax;
HBRUSH hbrBack;
DWORD dwContextHelpID;
ULONG_PTR dwMenuData;
/* ----------- Extra ----------- */
HMENU Self; /* Handle of this menu */
WORD Flags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
UINT FocusedItem; /* Currently focused item */
UINT MenuItemCount; /* Number of items in the menu */
HWND Wnd; /* Window containing the menu */
WORD Width; /* Width of the whole menu */
WORD Height; /* Height of the whole menu */
HWND WndOwner; /* window receiving the messages for ownerdraw */
BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */
} ROSMENUINFO, *PROSMENUINFO;
/* (other FocusedItem values give the position of the focused item) */
#define NO_SELECTED_ITEM 0xffff
typedef struct tagROSMENUITEMINFO
{
/* ----------- MENUITEMINFOW ----------- */
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
LPWSTR dwTypeData;
UINT cch;
HBITMAP hbmpItem;
/* ----------- Extra ----------- */
RECT Rect; /* Item area (relative to menu window) */
UINT XTab; /* X position of text after Tab */
} ROSMENUITEMINFO, *PROSMENUITEMINFO;
typedef struct _SETMENUITEMRECT
{
UINT uItem;
BOOL fByPosition;
RECT rcRect;
} SETMENUITEMRECT, *PSETMENUITEMRECT;
DWORD
STDCALL
NtUserBuildMenuItemList(
HMENU hMenu,
PVOID Buffer,
ULONG nBufSize,
DWORD Reserved);
DWORD
STDCALL
NtUserCheckMenuItem(
HMENU hmenu,
UINT uIDCheckItem,
UINT uCheck);
HMENU
STDCALL
NtUserCreateMenu(BOOL PopupMenu);
BOOL
STDCALL
NtUserDeleteMenu(
HMENU hMenu,
UINT uPosition,
UINT uFlags);
BOOL
STDCALL
NtUserDestroyMenu(
HMENU hMenu);
DWORD
STDCALL
NtUserDrawMenuBarTemp(
HWND hWnd,
HDC hDC,
PRECT hRect,
HMENU hMenu,
HFONT hFont);
UINT
STDCALL
NtUserEnableMenuItem(
HMENU hMenu,
UINT uIDEnableItem,
UINT uEnable);
DWORD
STDCALL
NtUserInsertMenuItem(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
LPCMENUITEMINFOW lpmii);
BOOL
STDCALL
NtUserEndMenu(VOID);
UINT STDCALL
NtUserGetMenuDefaultItem(
HMENU hMenu,
UINT fByPos,
UINT gmdiFlags);
BOOL
STDCALL
NtUserGetMenuBarInfo(
HWND hwnd,
LONG idObject,
LONG idItem,
PMENUBARINFO pmbi);
UINT
STDCALL
NtUserGetMenuIndex(
HMENU hMenu,
UINT wID);
BOOL
STDCALL
NtUserGetMenuItemRect(
HWND hWnd,
HMENU hMenu,
UINT uItem,
LPRECT lprcItem);
HMENU
STDCALL
NtUserGetSystemMenu(
HWND hWnd,
BOOL bRevert);
BOOL
STDCALL
NtUserHiliteMenuItem(
HWND hwnd,
HMENU hmenu,
UINT uItemHilite,
UINT uHilite);
BOOL
STDCALL
NtUserMenuInfo(
HMENU hmenu,
PROSMENUINFO lpmi,
BOOL fsog
);
int
STDCALL
NtUserMenuItemFromPoint(
HWND hWnd,
HMENU hMenu,
DWORD X,
DWORD Y);
BOOL
STDCALL
NtUserMenuItemInfo(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
PROSMENUITEMINFO lpmii,
BOOL fsog
);
BOOL
STDCALL
NtUserRemoveMenu(
HMENU hMenu,
UINT uPosition,
UINT uFlags);
BOOL
STDCALL
NtUserSetMenu(
HWND hWnd,
HMENU hMenu,
BOOL bRepaint);
BOOL
STDCALL
NtUserSetMenuContextHelpId(
HMENU hmenu,
DWORD dwContextHelpId);
BOOL
STDCALL
NtUserSetMenuDefaultItem(
HMENU hMenu,
UINT uItem,
UINT fByPos);
BOOL
STDCALL
NtUserSetMenuFlagRtoL(
HMENU hMenu);
BOOL
STDCALL
NtUserSetSystemMenu(
HWND hWnd,
HMENU hMenu);
DWORD
STDCALL
NtUserThunkedMenuInfo(
HMENU hMenu,
LPCMENUINFO lpcmi);
DWORD
STDCALL
NtUserThunkedMenuItemInfo(
HMENU hMenu,
UINT uItem,
BOOL fByPosition,
BOOL bInsert,
LPMENUITEMINFOW lpmii,
PUNICODE_STRING lpszCaption);
BOOL
STDCALL
NtUserTrackPopupMenuEx(
HMENU hmenu,
UINT fuFlags,
int x,
int y,
HWND hwnd,
LPTPMPARAMS lptpm);
#endif /* WIN32K_MENU_H_INCLUDED */

View File

@@ -6,8 +6,5 @@
#define W32PF_MANUALGUICHECK (0x0002)
#define W32PF_CREATEDWINORDC (0x0004)
VOID
FASTCALL
DestroyThreadWindows(struct _ETHREAD *Thread);
#endif /* __WIN32K_MISC_H */

View File

@@ -2,10 +2,6 @@
#ifndef __WIN32K_NTDDRAW_H
#define __WIN32K_NTDDRAW_H
#include <windows.h>
#include <ddk/ddrawint.h>
#include <ddk/d3dnthal.h>
#ifdef __cplusplus
extern "C" {
#endif

1837
inc_w32k/ntuser.h Normal file

File diff suppressed because it is too large Load Diff

43
inc_w32k/paint.h Normal file
View File

@@ -0,0 +1,43 @@
#ifndef __WIN32K_PAINT_H
#define __WIN32K_PAINT_H
typedef struct _PATRECT {
RECT r;
HBRUSH hBrush;
} PATRECT, * PPATRECT;
BOOL STDCALL
NtGdiPatBlt(
HDC hDC,
INT XLeft,
INT YLeft,
INT Width,
INT Height,
DWORD ROP);
BOOL STDCALL
NtGdiPolyPatBlt(
HDC hDC,
DWORD dwRop,
PPATRECT pRects,
INT cRects,
ULONG Reserved);
BOOL STDCALL
NtGdiPatBlt(
HDC hDC,
INT XLeft,
INT YLeft,
INT Width,
INT Height,
DWORD ROP);
BOOL STDCALL NtGdiGdiFlush (VOID);
DWORD STDCALL NtGdiGdiGetBatchLimit (VOID);
DWORD STDCALL NtGdiGdiSetBatchLimit (DWORD Limit);
UINT STDCALL NtGdiGetBoundsRect (HDC hDC, LPRECT Bounds, UINT Flags);
COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
UINT STDCALL NtGdiSetBoundsRect (HDC hDC, CONST PRECT Bounds, UINT Flags);
#endif

View File

@@ -9,7 +9,7 @@
#define PENOBJ_AllocPen() ((HPEN)GDIOBJ_AllocObj(GDI_OBJECT_TYPE_PEN))
#define PENOBJ_FreePen(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN)
#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_PEN))
#define PENOBJ_UnlockPen(hBMObj) GDIOBJ_UnlockObj((HGDIOBJ) hBMObj)
#define PENOBJ_UnlockPen(pPenObj) GDIOBJ_UnlockObjByPtr(pPenObj)
HPEN STDCALL
NtGdiCreatePen(

View File

@@ -13,7 +13,7 @@ typedef struct _ROSRGNDATA {
#define RGNDATA_FreeRgn(hRgn) GDIOBJ_FreeObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
#define RGNDATA_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
#define RGNDATA_UnlockRgn(hRgn) GDIOBJ_UnlockObj((HGDIOBJ)hRgn)
#define RGNDATA_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr(pRgn)
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);

View File

@@ -16,7 +16,7 @@ typedef struct
((HFONT) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_FONT))
#define TEXTOBJ_FreeText(hBMObj) GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT)
#define TEXTOBJ_LockText(hBMObj) ((PTEXTOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_FONT))
#define TEXTOBJ_UnlockText(hBMObj) GDIOBJ_UnlockObj ((HGDIOBJ) hBMObj)
#define TEXTOBJ_UnlockText(pBMObj) GDIOBJ_UnlockObjByPtr (pBMObj)
NTSTATUS FASTCALL TextIntRealizeFont(HFONT FontHandle);
NTSTATUS FASTCALL TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont);

View File

@@ -1,510 +0,0 @@
// irc_test.cpp
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <time.h>
#include <stdio.h>
#include "File.h"
#include "ssprintf.h"
#include "trim.h"
#include "IRCClient.h"
using std::string;
using std::vector;
#if defined(_DEBUG) && 0
const char* BOTNAME = "RoyBot";
const char* CHANNEL = "#RoyBotTest";
#else
const char* BOTNAME = "ArchBlackmann";
const char* CHANNEL = "#ReactOS";
#endif
//vector<string> tech, module, dev, stru, period, status, type, func, irql, curse, cursecop;
class List
{
public:
string name;
bool macro;
std::vector<std::string> list;
string tag;
int last;
List() { last = -1; }
List ( const char* _name, bool _macro ) : name(_name), macro(_macro)
{
tag = ssprintf("%%%s%%",_name);
last = -1;
}
};
vector<List> lists;
vector<string> ops;
void ImportList ( const char* listname, bool macro )
{
lists.push_back ( List ( listname, macro ) );
List& list = lists.back();
File f ( ssprintf("%s.txt",listname).c_str(), "r" );
string line;
while ( f.next_line ( line, true ) )
list.list.push_back ( line );
}
const char* ListRand ( List& list )
{
vector<string>& l = list.list;
if ( !l.size() )
{
static string nothing;
nothing = ssprintf ( "<list '%s' empty>", list.name.c_str() );
return nothing.c_str();
}
else if ( l.size() == 1 )
return l[0].c_str();
int sel = list.last;
while ( sel == list.last )
sel = rand()%l.size();
list.last = sel;
return l[sel].c_str();
}
const char* ListRand ( int i )
{
return ListRand ( lists[i] );
}
int GetListIndex ( const char* listname )
{
for ( int i = 0; i < lists.size(); i++ )
{
if ( !stricmp ( lists[i].name.c_str(), listname ) )
return i;
}
return -1;
}
List& GetList ( const char* listname )
{
return lists[GetListIndex(listname)];
}
const char* ListRand ( const char* list )
{
int i = GetListIndex ( list );
if ( i < 0 )
return NULL;
return ListRand(i);
}
string TaggedReply ( const char* listname )
{
string t = ListRand(listname);
string out;
const char* p = t.c_str();
while ( *p )
{
if ( *p == '%' )
{
bool found = false;
for ( int i = 0; i < lists.size() && !found; i++ )
{
if ( lists[i].macro && !strnicmp ( p, lists[i].tag.c_str(), lists[i].tag.size() ) )
{
out += ListRand(i);
p += lists[i].tag.size();
found = true;
}
}
if ( !found )
out += *p++;
}
const char* p2 = strchr ( p, '%' );
if ( !p2 )
p2 = p + strlen(p);
if ( p2 > p )
{
out += string ( p, p2-p );
p = p2;
}
}
return out;
}
string gobble ( string& s, const char* delim )
{
const char* p = s.c_str();
p += strspn ( p, delim );
const char* p2 = strpbrk ( p, delim );
if ( !p2 ) p2 = p + strlen(p);
string out ( p, p2-p );
p2 += strspn ( p2, delim );
s = string ( p2 );
return out;
}
bool isop ( const string& who )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == who )
return true;
}
return false;
}
// do custom stuff with the IRCClient from your subclass via the provided callbacks...
class MyIRCClient : public IRCClient
{
File flog;
public:
MyIRCClient()
{
flog.open ( "arch.log", "w+" );
}
// see IRCClient.h for documentation on these callbacks...
bool OnConnected()
{
return true;
}
bool OnJoin ( const string& user, const string& channel )
{
printf ( "user '%s' joined channel '%s'\n", user.c_str(), channel.c_str() );
return true;
}
bool OnPart ( const std::string& user, const std::string& channel )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == user )
{
printf ( "remove '%s' to ops list\n", user.c_str() );
ops.erase ( &ops[i] );
}
}
return true;
}
bool OnNick ( const std::string& oldNick, const std::string& newNick )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == oldNick )
{
printf ( "op '%s' changed nick to '%s'\n", oldNick.c_str(), newNick.c_str() );
ops[i] = newNick;
return true;
}
}
return true;
}
bool OnEndChannelUsers ( const string& channel )
{
return true;
}
bool OnPrivMsg ( const string& from, const string& text )
{
printf ( "<%s> %s\n", from.c_str(), text.c_str() );
flog.printf ( "<%s> %s\n", from.c_str(), text.c_str() );
if ( strnicmp ( text.c_str(), "!say ", 5 ) || !isop(from) )
return PrivMsg ( from, "hey, your tongue doesn't belong there!" );
string say = trim(&text[5]);
if ( !strnicmp ( say.c_str(), "/me ", 4 ) )
return Action ( CHANNEL, trim(&say[4]) );
else
return PrivMsg ( CHANNEL, trim(say) );
}
bool OnChannelMsg ( const string& channel, const string& from, const string& text )
{
printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
flog.printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
bool found_name = false;
string text2 ( text );
strlwr ( &text2[0] );
if ( !strnicmp ( text.c_str(), BOTNAME, strlen(BOTNAME) ) )
found_name = true;
else if ( !strnicmp ( text.c_str(), "arch ", 5 ) )
found_name = true;
if ( found_name )
{
string s ( text );
gobble ( s, " \t" ); // remove bot name
found_name = true;
if ( s[0] == '!' )
{
bool from_op = isop(from);
string cmd = gobble ( s, " \t" );
if ( !from_op )
{
if ( cmd == "!grovel" )
{
string out = ssprintf(TaggedReply("nogrovel").c_str(),from.c_str());
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
return PrivMsg ( channel, ssprintf("%s: I don't take commands from non-ops",from.c_str()) );
}
if ( cmd == "!add" )
{
string listname = gobble ( s, " \t" );
int i = GetListIndex ( listname.c_str() );
if ( i == -1 )
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
List& list = lists[i];
if ( s[0] == '\"' || s[0] == '\'' )
{
char delim = s[0];
const char* p = &s[1];
const char* p2 = strchr ( p, delim );
if ( !p2 )
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
s = string ( p, p2-p );
}
for ( i = 0; i < list.list.size(); i++ )
{
if ( list.list[i] == s )
return PrivMsg ( channel, ssprintf("%s: entry already exists in list '%s'",from.c_str(),listname.c_str()) );
}
if ( !stricmp ( listname.c_str(), "curse" ) )
strlwr ( &s[0] );
list.list.push_back ( s );
{
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
for ( i = 0; i < list.list.size(); i++ )
f.printf ( "%s\n", list.list[i].c_str() );
}
return PrivMsg ( channel, ssprintf("%s: entry added to list '%s'",from.c_str(),listname.c_str()) );
}
else if ( cmd == "!remove" )
{
string listname = gobble ( s, " \t" );
int i = GetListIndex ( listname.c_str() );
if ( i == -1 )
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
List& list = lists[i];
if ( s[0] == '\"' || s[0] == '\'' )
{
char delim = s[0];
const char* p = &s[1];
const char* p2 = strchr ( p, delim );
if ( !p2 )
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
s = string ( p, p2-p );
}
for ( i = 0; i < list.list.size(); i++ )
{
if ( list.list[i] == s )
{
list.list.erase ( &list.list[i] );
{
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
for ( i = 0; i < list.list.size(); i++ )
f.printf ( "%s\n", list.list[i].c_str() );
}
return PrivMsg ( channel, ssprintf("%s: entry removed from list '%s'",from.c_str(),listname.c_str()) );
}
}
return PrivMsg ( channel, ssprintf("%s: entry doesn't exist in list '%s'",from.c_str(),listname.c_str()) );
}
else if ( cmd == "!grovel" )
{
string out = ssprintf(TaggedReply("grovel").c_str(),from.c_str());
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
else if ( cmd == "!kiss" )
{
if ( s.size() )
return Action ( channel, ssprintf("kisses %s",s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else if ( cmd == "!hug" )
{
if ( s.size() )
return Action ( channel, ssprintf("hugs %s",s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else if ( cmd == "!give" )
{
string who = gobble(s," \t");
if ( who.size() && s.size() )
return Action ( channel, ssprintf("gives %s a %s",who.c_str(),s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else
{
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
}
}
bool found_curse = false;
static vector<string>& curse = GetList("curse").list;
text2 = ssprintf(" %s ",text2.c_str());
for ( int i = 0; i < curse.size() && !found_curse; i++ )
{
if ( strstr ( text2.c_str(), curse[i].c_str() ) )
found_curse = true;
}
if ( found_curse )
{
static List& cursecop = GetList("cursecop");
return PrivMsg ( channel, ssprintf("%s: %s", from.c_str(), ListRand(cursecop)) );
}
else if ( found_name )
{
string out = ssprintf("%s: %s", from.c_str(), TaggedReply("tech").c_str());
flog.printf ( "TECH-REPLY: %s\n", out.c_str() );
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
return true;
}
bool OnChannelMode ( const string& channel, const string& mode )
{
//printf ( "OnChannelMode(%s,%s)\n", channel.c_str(), mode.c_str() );
return true;
}
bool OnUserModeInChannel ( const string& src, const string& channel, const string& mode, const string& target )
{
printf ( "OnUserModeInChannel(%s,%s,%s,%s)\n", src.c_str(), channel.c_str(), mode.c_str(), target.c_str() );
const char* p = mode.c_str();
if ( !p )
return true;
while ( *p )
{
switch ( *p++ )
{
case '+':
while ( *p != 0 && *p != ' ' )
{
if ( *p == 'o' )
{
printf ( "adding '%s' to ops list\n", target.c_str() );
ops.push_back ( target );
}
break;
}
break;
case '-':
while ( *p != 0 && *p != ' ' )
{
if ( *p == 'o' )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == target )
{
printf ( "remove '%s' to ops list\n", target.c_str() );
ops.erase ( &ops[i] );
}
}
break;
}
}
}
}
return true;
}
bool OnMode ( const string& user, const string& mode )
{
//printf ( "OnMode(%s,%s)\n", user.c_str(), mode.c_str() );
return true;
}
bool OnChannelUsers ( const string& channel, const vector<string>& users )
{
//printf ( "[%s has %i users]: ", channel.c_str(), users.size() );
for ( int i = 0; i < users.size(); i++ )
{
if ( users[i][0] == '@' )
ops.push_back ( &users[i][1] );
/*if ( i )
printf ( ", " );
printf ( "%s", users[i].c_str() );*/
}
//printf ( "\n" );
return true;
}
};
int main ( int argc, char** argv )
{
srand ( time(NULL) );
ImportList ( "dev", true );
ImportList ( "func", true );
ImportList ( "dev", true );
ImportList ( "func", true );
ImportList ( "irql", true );
ImportList ( "module", true );
ImportList ( "period", true );
ImportList ( "status", true );
ImportList ( "stru", true );
ImportList ( "type", true );
ImportList ( "tech", false );
ImportList ( "curse", false );
ImportList ( "cursecop", false );
ImportList ( "grovel", false );
ImportList ( "nogrovel", false );
#ifdef _DEBUG
printf ( "initializing IRCClient debugging\n" );
IRCClient::SetDebug ( true );
#endif//_DEBUG
printf ( "calling suStartup()\n" );
suStartup();
printf ( "creating IRCClient object\n" );
MyIRCClient irc;
printf ( "connecting to freenode\n" );
//const char* server = "212.204.214.114";
const char* server = "irc.freenode.net";
if ( !irc.Connect ( server ) ) // irc.freenode.net
{
printf ( "couldn't connect to server\n" );
return -1;
}
printf ( "sending user command\n" );
if ( !irc.User ( BOTNAME, "", "irc.freenode.net", BOTNAME ) )
{
printf ( "USER command failed\n" );
return -1;
}
printf ( "sending nick\n" );
if ( !irc.Nick ( BOTNAME ) )
{
printf ( "NICK command failed\n" );
return -1;
}
printf ( "setting mode\n" );
if ( !irc.Mode ( "+i" ) )
{
printf ( "MODE command failed\n" );
return -1;
}
printf ( "joining channel\n" );
if ( !irc.Join ( CHANNEL ) )
{
printf ( "JOIN command failed\n" );
return -1;
}
printf ( "entering irc client processor\n" );
irc.Run ( false ); // do the processing in this thread...
return 0;
}

View File

@@ -1,212 +0,0 @@
# Microsoft Developer Studio Project File - Name="ArchBlackmann" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=ArchBlackmann - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ArchBlackmann.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ArchBlackmann.mak" CFG="ArchBlackmann - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ArchBlackmann - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "ArchBlackmann - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ArchBlackmann - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "ArchBlackmann - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "ArchBlackmann - Win32 Release"
# Name "ArchBlackmann - Win32 Debug"
# Begin Source File
SOURCE=.\ArchBlackmann.cpp
# End Source File
# Begin Source File
SOURCE=.\auto_ptr.h
# End Source File
# Begin Source File
SOURCE=.\auto_vector.h
# End Source File
# Begin Source File
SOURCE=.\base64.cpp
# End Source File
# Begin Source File
SOURCE=.\base64.h
# End Source File
# Begin Source File
SOURCE=.\chomp.cpp
# End Source File
# Begin Source File
SOURCE=.\chomp.h
# End Source File
# Begin Source File
SOURCE=.\cram_md5.cpp
# End Source File
# Begin Source File
SOURCE=.\cram_md5.h
# End Source File
# Begin Source File
SOURCE=.\File.cpp
# End Source File
# Begin Source File
SOURCE=.\File.h
# End Source File
# Begin Source File
SOURCE=.\IRCClient.cpp
# End Source File
# Begin Source File
SOURCE=.\IRCClient.h
# End Source File
# Begin Source File
SOURCE=.\MD5.cpp
# End Source File
# Begin Source File
SOURCE=.\MD5.h
# End Source File
# Begin Source File
SOURCE=.\panic.cpp
# End Source File
# Begin Source File
SOURCE=.\panic.h
# End Source File
# Begin Source File
SOURCE=.\QueueT.h
# End Source File
# Begin Source File
SOURCE=.\Reli.h
# End Source File
# Begin Source File
SOURCE=.\ReliMT.cpp
# End Source File
# Begin Source File
SOURCE=.\ReliMT.h
# End Source File
# Begin Source File
SOURCE=.\SockUtils.cpp
# End Source File
# Begin Source File
SOURCE=.\SockUtils.h
# End Source File
# Begin Source File
SOURCE=.\SplitJoin.cpp
# End Source File
# Begin Source File
SOURCE=.\SplitJoin.h
# End Source File
# Begin Source File
SOURCE=.\ssprintf.cpp
# End Source File
# Begin Source File
SOURCE=.\ssprintf.h
# End Source File
# Begin Source File
SOURCE=.\ThreadPool.cpp
# End Source File
# Begin Source File
SOURCE=.\ThreadPool.h
# End Source File
# Begin Source File
SOURCE=.\trim.cpp
# End Source File
# Begin Source File
SOURCE=.\trim.h
# End Source File
# Begin Source File
SOURCE=.\verify.h
# End Source File
# End Target
# End Project

View File

@@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "ArchBlackmann"=.\ArchBlackmann.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -1,265 +0,0 @@
// File.cpp
// (C) 2002-2004 Royce Mitchell III
// Dually licensed under BSD & LGPL
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <stdio.h>
#include <stdarg.h>
#include "File.h"
#ifndef nelem
#define nelem(x) ( sizeof(x) / sizeof(x[0]) )
#endif//nelem
using File::filesize_t;
using File::fileoff_t;
fileoff_t File::seek ( fileoff_t offset )
{
#ifdef WIN32
if ( _f->_flag & _IOWRT ) // is there pending output?
fflush ( _f );
// reset "buffered input" variables
_f->_cnt = 0;
_f->_ptr = _f->_base;
// make sure we're going forward
if ( _f->_flag & _IORW )
_f->_flag &= ~(_IOREAD|_IOWRT);
return _lseeki64 ( _fileno(_f), offset, SEEK_SET );
#else//UNIX
return lseek64 ( fileno(_f), offset, SEEK_SET );
#endif
}
std::string File::getline ( bool strip_crlf /*= false*/ )
{
std::string s = "";
char buf[256];
for ( ;; )
{
*buf = 0;
fgets ( buf, nelem(buf)-1, _f );
if ( !*buf )
break;
s += buf;
if ( strchr ( "\r\n", buf[strlen(buf)-1] ) )
break;
}
if ( strip_crlf && s.size() )
{
char* p = strpbrk ( &s[0], "\r\n" );
if ( p )
{
*p = '\0';
s.resize ( p-&s[0] );
}
}
return s;
}
std::wstring File::wgetline ( bool strip_crlf /*= false*/ )
{
std::wstring s = L"";
wchar_t buf[256];
for ( ;; )
{
*buf = 0;
fgetws ( buf, nelem(buf)-1, _f );
if ( !*buf )
break;
s += buf;
if ( wcschr ( L"\r\n", buf[wcslen(buf)-1] ) )
break;
}
if ( strip_crlf && s.size() )
{
wchar_t* p = wcspbrk ( &s[0], L"\r\n" );
if ( p )
{
*p = L'\0';
s.resize ( (p-&s[0])/sizeof(wchar_t) );
}
}
return s;
}
// this function searches for the next end-of-line and puts all data it
// finds until then in the 'line' parameter.
//
// call continuously until the function returns false ( no more data )
bool File::next_line ( std::string& line, bool strip_crlf )
{
line = getline(strip_crlf);
// indicate that we're done *if*:
// 1) there's no more data, *and*
// 2) we're at the end of the file
return line.size()>0 || !eof();
}
bool File::next_line ( std::wstring& line, bool strip_crlf )
{
line = wgetline ( strip_crlf );
return line.size()>0 || !eof();
}
/*
example usage:
bool mycallback ( const std::string& line, int line_number, long lparam )
{
std::cout << line << std::endl;
return true; // continue enumeration
}
File f ( "file.txt", "rb" ); // open file for binary read-only ( i.e. "rb" )
f.enum_lines ( mycallback, 0, true );
*/
/*bool File::enum_lines ( bool (*callback)(const std::string& line, int line_number, long lparam), long lparam, bool strip_crlf )
{
int line_number = 0;
for ( ;; )
{
std::string s = getline(strip_crlf);
line_number++;
if ( !s.size() )
{
if ( eof() )
return true;
else
continue;
}
if ( !(*callback) ( s, line_number, lparam ) )
return false;
}
}*/
filesize_t File::length() const
{
#ifdef WIN32
return _filelengthi64 ( _fileno(_f) );
#elif defined(UNIX)
struct stat64 file_stat;
verify(fstat64(fileno(_f), &file_stat) == 0);
return file_stat.st_size;
#endif
}
void File::close()
{
if ( _f )
{
fclose(_f);
_f = 0;
}
}
void File::printf ( const char* fmt, ... )
{
va_list arg;
int done;
va_start(arg, fmt);
assert(_f);
done = vfprintf ( _f, fmt, arg );
va_end(arg);
}
/*static*/ bool File::LoadIntoString ( std::string& s, const std::string& filename )
{
File in ( filename, "rb" );
if ( !in.isopened() )
return false;
filesize_t flen = in.length();
size_t len = size_t(flen);
if ( len != flen )
return false; // file too big...
s.resize ( len + 1 );
if ( !in.read ( &s[0], len ) )
return false;
s[len] = '\0';
s.resize ( len );
return true;
}
/*static*/ bool File::LoadIntoString ( std::string& s, const std::wstring& filename )
{
File in ( filename, L"rb" );
if ( !in.isopened() )
return false;
filesize_t flen = in.length();
size_t len = size_t(flen);
if ( len != flen )
return false; // file too big...
s.resize ( len + 1 );
if ( !in.read ( &s[0], len ) )
return false;
s[len] = '\0';
s.resize ( len );
return true;
}
/*static*/ bool File::SaveFromString ( const std::string& filename, const std::string& s, bool binary )
{
File out ( filename, binary ? "wb" : "w" );
if ( !out.isopened() )
return false;
out.write ( s.c_str(), s.size() );
return true;
}
/*static*/ bool File::SaveFromString ( const std::wstring& filename, const std::string& s, bool binary )
{
File out ( filename, binary ? L"wb" : L"w" );
if ( !out.isopened() )
return false;
out.write ( s.c_str(), s.size() );
return true;
}
/*static*/ bool File::SaveFromBuffer ( const std::string& filename, const char* buf, size_t buflen, bool binary )
{
File out ( filename, binary ? "wb" : "w" );
if ( !out.isopened() )
return false;
out.write ( buf, buflen );
return true;
}
/*static*/ bool File::SaveFromBuffer ( const std::wstring& filename, const char* buf, size_t buflen, bool binary )
{
File out ( filename, binary ? L"wb" : L"w" );
if ( !out.isopened() )
return false;
out.write ( buf, buflen );
return true;
}
/*static*/ std::string File::TempFileName ( const std::string& prefix )
{
#ifdef WIN32
std::string s ( _tempnam ( ".", prefix.c_str() ) );
return s;
#else
// FIXME
return string("");
#endif
}
/*static*/ std::wstring File::TempFileName ( const std::wstring& prefix )
{
#ifdef WIN32
std::wstring s ( _wtempnam ( L".", prefix.c_str() ) );
return s;
#else
// FIXME
return std::wstring(L"");
#endif
}

View File

@@ -1,173 +0,0 @@
// File.h
// (C) 2002-2004 Royce Mitchell III
// Dually licensed under BSD & LGPL
#ifndef FILE_H
#define FILE_H
#ifdef WIN32
# include <stdio.h> // fgetc
# include <io.h>
#elif defined(UNIX)
# include <sys/stat.h>
# include <unistd.h>
#endif
#include <assert.h>
#include <string>
class File
{
public:
#ifdef _MSC_VER
typedef __int64 fileoff_t;
typedef unsigned __int64 filesize_t;
#else//_MSC_VER
typedef __off64_t fileoff_t;
typedef __size64_t filesize_t;
#endif//_MSC_VER
File() : _f(0)
{
}
File ( const std::string& filename, const char* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const std::wstring& filename, const wchar_t* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const char* filename, const char* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const wchar_t* filename, const wchar_t* mode ) : _f(0)
{
open ( filename, mode );
}
~File()
{
close();
}
bool open ( const std::string& filename, const char* mode )
{
assert ( !_f );
return ( _f = fopen ( filename.c_str(), mode ) ) != 0;
}
bool open ( const std::wstring& filename, const wchar_t* mode )
{
assert ( !_f );
return ( _f = _wfopen ( filename.c_str(), mode ) ) != 0;
}
bool open ( const char* filename, const char* mode )
{
assert ( !_f );
return ( _f = fopen ( filename, mode ) ) != 0;
}
bool open ( const wchar_t* filename, const wchar_t* mode )
{
assert ( !_f );
return ( _f = _wfopen ( filename, mode ) ) != 0;
}
fileoff_t seek ( fileoff_t offset );
int get()
{
return fgetc ( _f );
}
bool put ( int c )
{
return fputc ( c, _f ) != EOF;
}
std::string getline ( bool strip_crlf = false );
std::wstring wgetline ( bool strip_crlf = false );
// this function searches for the next end-of-line and puts all data it
// finds until then in the 'line' parameter.
//
// call continuously until the function returns false ( no more data )
bool next_line ( std::string& line, bool strip_crlf );
bool next_line ( std::wstring& line, bool strip_crlf );
bool read ( void* data, unsigned len )
{
return len == fread ( data, 1, len, _f );
}
bool write ( const void* data, unsigned len )
{
return len == fwrite ( data, 1, len, _f );
}
bool write ( const std::string& data )
{
return data.length() == fwrite ( data.c_str(), 1, data.length(), _f );
}
bool write ( const std::wstring& data )
{
return data.length() == fwrite ( data.c_str(), sizeof(data[0]), data.length(), _f );
}
filesize_t length() const;
void close();
bool isopened() const
{
return _f != 0;
}
bool is_open() const
{
return _f != 0;
}
bool eof() const
{
return feof(_f) ? true : false;
}
FILE* operator * ()
{
return _f;
}
operator FILE*()
{
return _f;
}
void printf ( const char* fmt, ... );
void printf ( const wchar_t* fmt, ... );
static bool LoadIntoString ( std::string& s, const std::string& filename );
static bool LoadIntoString ( std::string& s, const std::wstring& filename );
static bool SaveFromString ( const std::string& filename, const std::string& s, bool binary );
static bool SaveFromString ( const std::wstring& filename, const std::string& s, bool binary );
static bool SaveFromBuffer ( const std::string& filename, const char* buf, size_t buflen, bool binary );
static bool SaveFromBuffer ( const std::wstring& filename, const char* buf, size_t buflen, bool binary );
static std::string TempFileName ( const std::string& prefix );
static std::wstring TempFileName ( const std::wstring& prefix );
private:
File(const File&) {}
const File& operator = ( const File& ) { return *this; }
FILE * _f;
};
#endif//FILE_H

View File

@@ -1,373 +0,0 @@
// IRCClient.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <vector>
#include <sstream>
#include "IRCClient.h"
#include "md5.h"
#include "cram_md5.h"
#include "trim.h"
#include "chomp.h"
#include "SplitJoin.h"
#include "base64.h"
using std::string;
using std::stringstream;
using std::vector;
bool IRCClient::_debug = true;
IRCClient::IRCClient()
: _timeout(10*60*1000), _inRun(false)
{
}
bool IRCClient::Connect ( const string& server, short port )
{
string buf;
Close();
Attach ( suTcpSocket() );
if ( !suConnect ( *this, server.c_str(), port ) )
return false;
return true;
}
bool
IRCClient::User ( const string& user, const string& mode,
const string& network, const string& realname )
{
string buf;
buf = "USER " + user + " \"" + mode + "\" \"" + network + "\" :" + realname + "\n";
return Send ( buf );
}
bool
IRCClient::Nick ( const string& nick )
{
_nick = nick;
return Send ( "NICK " + _nick + "\n" );
}
bool
IRCClient::Mode ( const string& mode )
{
return Send ( "MODE " + _nick + " " + mode + "\n" );
}
bool
IRCClient::Names ( const string& channel )
{
return Send ( "NAMES " + channel + "\n" );
}
bool
IRCClient::Mode ( const string& channel, const string& mode, const string& target )
{
return Send ( "MODE " + channel + " " + mode + " " + target + "\n" );
}
bool
IRCClient::Join ( const string& channel )
{
return Send ( "JOIN " + channel + "\n" );
}
bool
IRCClient::PrivMsg ( const string& to, const string& text )
{
return Send ( "PRIVMSG " + to + " :" + text + '\n' );
}
bool
IRCClient::Action ( const string& to, const string& text )
{
return Send ( "PRIVMSG " + to + " :" + (char)1 + "ACTION " + text + (char)1 + '\n' );
}
bool
IRCClient::Part ( const string& channel, const string& text )
{
return Send ( "PART " + channel + " :" + text + "\n" );
}
bool
IRCClient::Quit ( const string& text )
{
return Send( "QUIT :" + text + "\n");
}
bool IRCClient::_Recv ( string& buf )
{
bool b = (recvUntil ( buf, '\n', _timeout ) > 0);
if ( b && _debug )
{
printf ( ">> %s", buf.c_str() );
if ( buf[buf.length()-1] != '\n' )
printf ( "\n" );
}
return b;
}
bool IRCClient::Send ( const string& buf )
{
if ( _debug )
{
printf ( "<< %s", buf.c_str() );
if ( buf[buf.length()-1] != '\n' )
printf ( "\n" );
}
return ( buf.length() == (size_t)send ( *this, buf.c_str(), buf.length(), 0 ) );
}
bool IRCClient::OnPing( const string& text )
{
return Send( "PONG " + text + "\n" );
}
int THREADAPI IRCClient::Callback ( IRCClient* irc )
{
return irc->Run ( false );
}
int IRCClient::Run ( bool launch_thread )
{
if ( (SOCKET)*this == INVALID_SOCKET )
return 0;
if ( _inRun ) return 1;
if ( launch_thread )
{
ThreadPool::Instance().Launch ( (ThreadPoolFunc*)IRCClient::Callback, this );
return 1;
}
_inRun = true;
if ( _debug ) printf ( "IRCClient::Run() - waiting for responses\n" );
string buf;
while ( _Recv(buf) )
{
if ( !strnicmp ( buf.c_str(), "NOTICE ", 7 ) )
{
//printf ( "recv'd NOTICE msg...\n" );
// TODO...
//OnAuth (
}
else if ( !strnicmp ( buf.c_str(), "PING ", 5 ) )
{
const char* p = &buf[5]; // point to first char after "PING "
while ( *p == ':' ) // then read past the colons
p++;
const char* p2 = strpbrk ( p, "\r\n" ); // find the end of line
string text ( p, p2-p ); // and set the text
OnPing( text );
}
else if ( buf[0] == ':' )
{
const char* p = &buf[1]; // skip first colon...
const char* p2 = strpbrk ( p, " !" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 0: ", buf.c_str() );
continue;
}
string src ( p, p2-p );
if ( !src.length() )
{
printf ( "!!!:OnRecv failure 0.5: %s", buf.c_str() );
continue;
}
p = p2 + 1;
if ( *p2 == '!' )
{
p2 = strchr ( p, ' ' );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 1: %s", buf.c_str() );
continue;
}
//string srchost ( p, p2-p );
p = p2 + 1;
}
p2 = strchr ( p, ' ' );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 2: %s", buf.c_str() );
continue;
}
string cmd ( p, p2-p );
p = p2 + 1;
p2 = strpbrk ( p, " :" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 3: %s", buf.c_str() );
continue;
}
string tgt ( p, p2-p );
p = p2 + 1;
p += strspn ( p, " " );
if ( *p == '=' )
{
p++;
p += strspn ( p, " " );
}
if ( *p == ':' )
p++;
p2 = strpbrk ( p, "\r\n" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 4: %s", buf.c_str() );
continue;
}
string text ( p, p2-p );
strlwr ( &cmd[0] );
if ( cmd == "privmsg" )
{
if ( !tgt.length() )
{
printf ( "!!!:OnRecv failure 5 (PRIVMSG w/o target): %s", buf.c_str() );
continue;
}
if ( *p == 1 )
{
p++;
p2 = strchr ( p, ' ' );
if ( !p2 ) p2 = p + strlen(p);
cmd = string ( p, p2-p );
strlwr ( &cmd[0] );
p = p2 + 1;
p2 = strchr ( p, 1 );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 6 (no terminating \x01 for initial \x01 found: %s", buf.c_str() );
continue;
}
text = string ( p, p2-p );
if ( cmd == "action" )
{
if ( tgt[0] == '#' )
OnChannelAction ( tgt, src, text );
else
OnPrivAction ( src, text );
}
else
{
printf ( "!!!:OnRecv failure 7 (unrecognized \x01 command '%s': %s", cmd.c_str(), buf.c_str() );
continue;
}
}
else
{
if ( tgt[0] == '#' )
OnChannelMsg ( tgt, src, text );
else
OnPrivMsg ( src, text );
}
}
else if ( cmd == "mode" )
{
// two diff. kinds of mode notifications...
//printf ( "[MODE] src='%s' cmd='%s' tgt='%s' text='%s'", src.c_str(), cmd.c_str(), tgt.c_str(), text.c_str() );
//OnMode (
// self mode change:
// [MODE] src=Nick cmd=mode tgt=Nick text=+i
// channel mode change:
// [MODE] src=Nick cmd=mode tgt=#Channel text=+o Nick
if ( tgt[0] == '#' )
{
p = text.c_str();
p2 = strchr ( p, ' ' );
if ( p2 && *p2 )
{
string mode ( p, p2-p );
p = p2 + 1;
p += strspn ( p, " " );
OnUserModeInChannel ( src, tgt, mode, trim(p) );
}
else
OnChannelMode ( tgt, text );
}
else
OnMode ( tgt, text );
}
else if ( cmd == "join" )
{
OnJoin ( src, text );
}
else if ( cmd == "part" )
{
OnPart ( src, text );
}
else if ( cmd == "nick" )
{
OnNick ( src, text );
}
else if ( isdigit(cmd[0]) )
{
int i = atoi(cmd.c_str());
switch ( i )
{
case 1: // "Welcome!" - i.e. it's okay to issue commands now...
OnConnected();
break;
case 353: // user list for channel....
{
p = text.c_str();
p2 = strpbrk ( p, " :" );
if ( !p2 ) continue;
string channel ( p, p2-p );
p = strchr ( p2, ':' );
if ( !p ) continue;
p++;
vector<string> users;
while ( *p )
{
p2 = strchr ( p, ' ' );
if ( !p2 )
p2 = p + strlen(p);
users.push_back ( string ( p, p2-p ) );
p = p2+1;
p += strspn ( p, " " );
}
OnChannelUsers ( channel, users );
}
break;
case 366: // END of user list for channel
{
p = text.c_str();
p2 = strpbrk ( p, " :" );
if ( !p2 ) continue;
string channel ( p, p2-p );
OnEndChannelUsers ( channel );
}
break;
default:
if ( _debug ) printf ( "unknown command %i: %s", i, buf.c_str() );
break;
}
}
else
{
if ( strstr ( buf.c_str(), "ACTION" ) )
{
printf ( "ACTION: " );
for ( int i = 0; i < buf.size(); i++ )
printf ( "%c(%xh)", buf[i], (unsigned)(unsigned char)buf[i] );
}
else if ( _debug ) printf ( "unrecognized ':' response: %s", buf.c_str() );
}
}
else
{
if ( _debug ) printf ( "unrecognized irc msg: %s", buf.c_str() );
}
//OnRecv ( buf );
}
if ( _debug ) printf ( "IRCClient::Run() - exiting\n" );
_inRun = false;
return 0;
}

View File

@@ -1,140 +0,0 @@
// IRCClient.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef IRCCLIENT_H
#define IRCCLIENT_H
#include <string>
#include <vector>
#include "SockUtils.h"
#include "ThreadPool.h"
class IRCClient : public suBufferedRecvSocket
{
public:
IRCClient();
static bool GetDebug() { return _debug; }
static bool SetDebug ( bool debug ) { bool old = _debug; _debug = debug; return old; }
// connect to server ( record greeting for apop if it exists )
bool Connect ( const std::string& server, short port = 6667 );
bool Running() { return _inRun; }
////////////////////////// IRC Client Protocol commands ///////////////////////
// first thing you must call... mode can be ""
// network can be same as name of server used in Connect() above
bool User ( const std::string& user, const std::string& mode,
const std::string& network, const std::string& realname );
// change nick...
bool Nick ( const std::string& nick );
// change mode for self...
bool Mode ( const std::string& mode );
// set someone's mode in channel ( like oping someone )
bool Mode ( const std::string& channel, const std::string& mode, const std::string& target );
// request a list of names of clients in a channel
bool Names ( const std::string& channel );
// join a channel...
bool Join ( const std::string& channel );
// send message to someone or some channel
bool PrivMsg ( const std::string& to, const std::string& text );
// send /me to someone or some channel
bool Action ( const std::string& to, const std::string& text );
// leave a channel
bool Part ( const std::string& channel, const std::string& text );
// log off
bool Quit ( const std::string& text );
////////////////////// callback functions ////////////////////////////
// OnConnected: you just successfully logged into irc server
virtual bool OnConnected() = 0;
virtual bool OnNick ( const std::string& oldNick, const std::string& newNick ) { return true; }
// OnJoin: someone just successfully joined a channel you are in ( also sent when you successfully join a channel )
virtual bool OnJoin ( const std::string& user, const std::string& channel ) { return true; }
// OnPart: someone just left a channel you are in
virtual bool OnPart ( const std::string& user, const std::string& channel ) { return true; }
// OnPrivMsg: you just received a private message from a user
virtual bool OnPrivMsg ( const std::string& from, const std::string& text ) { return true; }
virtual bool OnPrivAction ( const std::string& from, const std::string& text ) { return true; }
// OnChannelMsg: you just received a chat line in a channel
virtual bool OnChannelMsg ( const std::string& channel, const std::string& from,
const std::string& text ) { return true; }
// OnChannelAction: you just received a "/me" line in a channel
virtual bool OnChannelAction ( const std::string& channel, const std::string& from,
const std::string& text ) { return true; }
// OnChannelMode: notification of a change of a channel's mode
virtual bool OnChannelMode ( const std::string& channel, const std::string& mode )
{ return true; }
// OnUserModeInChannel: notification of a mode change of a user with respect to a channel.
// f.ex.: this will be called when someone is oped in a channel.
virtual bool OnUserModeInChannel ( const std::string& src, const std::string& channel,
const std::string& mode, const std::string& target ) { return true; }
// OnMode: you will receive this when you change your own mode, at least...
virtual bool OnMode ( const std::string& user, const std::string& mode ) { return true; }
// notification of what users are in a channel ( you may get multiple of these... )
virtual bool OnChannelUsers ( const std::string& channel, const std::vector<std::string>& users )
{ return true; }
// notification that you have received the entire list of users for a channel
virtual bool OnEndChannelUsers ( const std::string& channel ) { return true; }
// OnPing - default implementation replies to PING with a valid PONG. required on some systems to
// log in. Most systems require a response in order to stay connected, used to verify a client hasn't
// dropped.
virtual bool OnPing ( const std::string& text );
////////////////////// other functions ////////////////////////////
// this is for sending data to irc server. it's public in case you need to send some
// command not supported by this base class...
bool Send ( const std::string& buf );
// if launch_thread is true, this function will spawn a thread that will process
// incoming packets until the socket dies.
// otherwise ( launch_thread is false ) this function will do that processing
// in *this* thread, and not return until the socket dies.
int Run ( bool launch_thread );
////////////////////// private stuff ////////////////////////////
private:
bool _Recv ( std::string& buf );
static int THREADAPI Callback ( IRCClient* irc );
static bool _debug;
std::string _nick;
int _timeout;
std::string _apop_challenge;
volatile bool _inRun;
// disable copy semantics
IRCClient ( const IRCClient& );
IRCClient& operator = ( const IRCClient& );
};
#endif//IRCCLIENT_H

View File

@@ -1,418 +0,0 @@
// MD5.CPP - RSA Data Security, Inc., MD5 message-digest algorithm
/*
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
//#include <assert.h>
#include <memory.h>
#include <ctype.h>
#include <vector>
#include "MD5.h"
using std::string;
using std::vector;
// Constants for MD5Transform routine.
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21
static void MD5Transform ( UINT4 [4], const uchar [64] );
static void Encode ( unsigned char *, UINT4 *, unsigned int );
static void Decode ( UINT4 *, const uchar *, unsigned int );
static unsigned char PADDING[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// F, G, H and I are basic MD5 functions.
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
// ROTATE_LEFT rotates x left n bits.
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
// Rotation is separate from addition to prevent recomputation.
#define FF(a, b, c, d, x, s, ac) { \
(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
// MD5 initialization. Begins an MD5 operation, writing a new context.
void MD5Init (
MD5_CTX *context ) // context
{
context->count[0] = context->count[1] = 0;
// Load magic initialization constants.
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
// MD5 block update operation. Continues an MD5 message-digest
// operation, processing another message block, and updating the
// context.
void MD5Update (
MD5_CTX *context, // context
const char *input_, // input block
unsigned int inputLen ) // length of input block
{
unsigned int i, index, partLen;
const uchar* input = (const uchar*)input_;
// Compute number of bytes mod 64
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
// Update number of bits
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
// Transform as many times as possible.
if (inputLen >= partLen)
{
memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
index = 0;
}
else
i = 0;
// Buffer remaining input
memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
inputLen-i);
}
// MD5 finalization. Ends an MD5 message-digest operation, writing the
// the message digest and zeroizing the context.
void MD5Final (
unsigned char digest[16], // message digest
MD5_CTX *context ) // context
{
uchar bits[8];
unsigned int index, padLen;
// Save number of bits
Encode (bits, context->count, 8);
// Pad out to 56 mod 64.
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
MD5Update (context, (const char*)PADDING, padLen);
// Append length (before padding)
MD5Update (context, (const char*)bits, 8);
// Store state in digest
Encode (digest, context->state, 16);
// Zeroize sensitive information.
memset ((POINTER)context, 0, sizeof (*context));
}
// MD5 basic transformation. Transforms state based on block.
static void MD5Transform (
UINT4 state[4],
const uchar block[64] )
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode (x, block, 64);
// Round 1
FF (a, b, c, d, x[ 0], S11, 0xd76aa478); // 1
FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); // 2
FF (c, d, a, b, x[ 2], S13, 0x242070db); // 3
FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); // 4
FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); // 5
FF (d, a, b, c, x[ 5], S12, 0x4787c62a); // 6
FF (c, d, a, b, x[ 6], S13, 0xa8304613); // 7
FF (b, c, d, a, x[ 7], S14, 0xfd469501); // 8
FF (a, b, c, d, x[ 8], S11, 0x698098d8); // 9
FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); // 10
FF (c, d, a, b, x[10], S13, 0xffff5bb1); // 11
FF (b, c, d, a, x[11], S14, 0x895cd7be); // 12
FF (a, b, c, d, x[12], S11, 0x6b901122); // 13
FF (d, a, b, c, x[13], S12, 0xfd987193); // 14
FF (c, d, a, b, x[14], S13, 0xa679438e); // 15
FF (b, c, d, a, x[15], S14, 0x49b40821); // 16
// Round 2
GG (a, b, c, d, x[ 1], S21, 0xf61e2562); // 17
GG (d, a, b, c, x[ 6], S22, 0xc040b340); // 18
GG (c, d, a, b, x[11], S23, 0x265e5a51); // 19
GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); // 20
GG (a, b, c, d, x[ 5], S21, 0xd62f105d); // 21
GG (d, a, b, c, x[10], S22, 0x2441453); // 22
GG (c, d, a, b, x[15], S23, 0xd8a1e681); // 23
GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); // 24
GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); // 25
GG (d, a, b, c, x[14], S22, 0xc33707d6); // 26
GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); // 27
GG (b, c, d, a, x[ 8], S24, 0x455a14ed); // 28
GG (a, b, c, d, x[13], S21, 0xa9e3e905); // 29
GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); // 30
GG (c, d, a, b, x[ 7], S23, 0x676f02d9); // 31
GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); // 32
// Round 3
HH (a, b, c, d, x[ 5], S31, 0xfffa3942); // 33
HH (d, a, b, c, x[ 8], S32, 0x8771f681); // 34
HH (c, d, a, b, x[11], S33, 0x6d9d6122); // 35
HH (b, c, d, a, x[14], S34, 0xfde5380c); // 36
HH (a, b, c, d, x[ 1], S31, 0xa4beea44); // 37
HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); // 38
HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); // 39
HH (b, c, d, a, x[10], S34, 0xbebfbc70); // 40
HH (a, b, c, d, x[13], S31, 0x289b7ec6); // 41
HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); // 42
HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); // 43
HH (b, c, d, a, x[ 6], S34, 0x4881d05); // 44
HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); // 45
HH (d, a, b, c, x[12], S32, 0xe6db99e5); // 46
HH (c, d, a, b, x[15], S33, 0x1fa27cf8); // 47
HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); // 48
// Round 4
II (a, b, c, d, x[ 0], S41, 0xf4292244); // 49
II (d, a, b, c, x[ 7], S42, 0x432aff97); // 50
II (c, d, a, b, x[14], S43, 0xab9423a7); // 51
II (b, c, d, a, x[ 5], S44, 0xfc93a039); // 52
II (a, b, c, d, x[12], S41, 0x655b59c3); // 53
II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); // 54
II (c, d, a, b, x[10], S43, 0xffeff47d); // 55
II (b, c, d, a, x[ 1], S44, 0x85845dd1); // 56
II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); // 57
II (d, a, b, c, x[15], S42, 0xfe2ce6e0); // 58
II (c, d, a, b, x[ 6], S43, 0xa3014314); // 59
II (b, c, d, a, x[13], S44, 0x4e0811a1); // 60
II (a, b, c, d, x[ 4], S41, 0xf7537e82); // 61
II (d, a, b, c, x[11], S42, 0xbd3af235); // 62
II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); // 63
II (b, c, d, a, x[ 9], S44, 0xeb86d391); // 64
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
// Zeroize sensitive information.
memset ((POINTER)x, 0, sizeof (x));
}
// Encodes input (UINT4) into output (unsigned char). Assumes len is
// a multiple of 4.
static void Encode (
unsigned char *output,
UINT4 *input,
unsigned int len )
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
// Decodes input (unsigned char) into output (UINT4). Assumes len is
// a multiple of 4.
static void Decode (
UINT4 *output,
const uchar *input,
unsigned int len )
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
void digest2ascii ( char *ascii, const unsigned char *digest )
{
int i;
static char* table = "0123456789abcdef";
for ( i = 0; i < 16; i++ )
{
*ascii++ = table[(*digest)>>4];
*ascii++ = table[(*digest++)%16];
}
*ascii++ = 0;
}
void ascii2digest ( unsigned char *digest, const char *ascii )
{
int i;
#define CONV(c) (unsigned char)( (toupper(c)>='A') ? (toupper(c)+10-'A') : ((c)-'0') )
#define MAKECHAR(a,b) ((CONV(a)%16)<<4)|(CONV(b)%16)
for ( i = 0; i < 16; i++ )
{
*digest++ = MAKECHAR(ascii[0],ascii[1]);
ascii += 2;
}
}
#ifdef __cplusplus
MD5::MD5()
{
Init();
}
void MD5::Init()
{
MD5Init(&_ctx);
}
void MD5::Update ( const string& s )
{
MD5Update ( &_ctx, s.c_str(), s.size() );
}
string MD5::Final ( char* digest )
{
vector<uchar> v;
v.resize(16);
MD5Final ( &v[0], &_ctx );
if ( digest )
memmove ( digest, &v[0], 16 );
string s;
static char* tohex = "0123456789abcdef";
for ( int i = 0; i < 16; i++ )
{
uchar c = v[i];
s += tohex[ (c>>4) & 0xF ];
s += tohex[ c & 0xF ];
}
return s;
}
string MD5Hex ( const string& s )
{
MD5 md5;
md5.Update ( s );
return md5.Final();
}
string MD5Bin ( const string& s )
{
MD5 md5;
md5.Update ( s );
char digest[16];
md5.Final ( digest );
return string ( digest, 16 );
}
string HMAC_MD5 ( const string& key, const string& text, char* out_bin )
{
MD5 md5;
char k_ipad[65]; // inner padding - key XORd with ipad
char k_opad[65]; // outer padding - key XORd with opad
string tmp;
char digest[16];
int i;
// if key is longer than 64 bytes reset it to key=MD5(key)
if ( key.length() > 64 )
{
md5.Init();
md5.Update ( key );
md5.Final ( digest );
tmp = string ( digest, 16 );
}
else
tmp = key;
// start out by storing key in pads
memset ( k_ipad, 0, sizeof(k_ipad) );
memset ( k_opad, 0, sizeof(k_opad) );
memcpy ( k_ipad, tmp.c_str(), tmp.length() );
memcpy ( k_opad, tmp.c_str(), tmp.length() );
// XOR key with ipad and opad values
for ( i=0; i<64; i++ )
{
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
}
// "inner" MD5
md5.Init();
md5.Update(k_ipad);
md5.Update(text);
md5.Final ( digest );
// "outer" MD5
md5.Init();
md5.Update(k_opad);
md5.Update(string(digest,16));
return md5.Final(out_bin);
}
#endif//__cplusplus

View File

@@ -1,95 +0,0 @@
// MD5.H - header file for MD5.CPP
/*
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef __MD5_H
#define __MD5_H
#ifdef __cplusplus
#include <string>
#endif//__cplusplus
#ifndef uchar
#define uchar unsigned char
#endif//uchar
#ifndef ushort
#define ushort unsigned short
#endif//ushort
#ifndef ulong
#define ulong unsigned long
#endif//ulong
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
typedef uchar *POINTER; // POINTER defines a generic pointer type
typedef ushort UINT2; // UINT2 defines a two byte word
typedef ulong UINT4; // UINT4 defines a four byte word
// MD5 context.
typedef struct
{
UINT4 state[4]; // state (ABCD)
UINT4 count[2]; // number of bits, modulo 2^64 (lsb first)
unsigned char buffer[64]; // input buffer
} MD5_CTX;
void MD5Init ( MD5_CTX * );
void MD5Update ( MD5_CTX *, const char *, unsigned int );
void MD5Final ( uchar [16], MD5_CTX * );
void digest2ascii ( char *ascii, const uchar *digest );
void ascii2digest ( uchar *digest, const char *ascii );
#ifdef __cplusplus
} // extern "C"
class MD5
{
public:
MD5();
void Init();
void Update ( const std::string& s );
std::string Final ( char* digest = 0 );
private:
MD5_CTX _ctx;
};
std::string MD5Hex ( const std::string& s );
std::string MD5Bin ( const std::string& s );
std::string HMAC_MD5 (
const std::string& key,
const std::string& text,
char* out_bin = NULL );
#endif//__cplusplus
#endif//__MD5_H

View File

@@ -1,315 +0,0 @@
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Any attempt to sell WFC in source code form must have the permission
** of the original author. You can produce commercial executables with
** WFC but you can't sell WFC.
**
** Copyright, 2000, Samuel R. Blackburn
**
** NOTE: I modified the info block below so it hopefully wouldn't conflict
** with the original file. Royce Mitchell III
*/
#ifndef QUEUET_CLASS_HEADER
#define QUEUET_CLASS_HEADER
#include "ReliMT.h"
#ifdef WIN32
#include <sys/types.h> // off_t
#define HEAPCREATE(size) m_Heap = ::HeapCreate ( HEAP_NO_SERIALIZE, size, 0 )
#define HEAPALLOC(size) ::HeapAlloc ( m_Heap, HEAP_NO_SERIALIZE, size )
#define HEAPREALLOC(p,size) ::HeapReAlloc( m_Heap, HEAP_NO_SERIALIZE, p, size )
#define HEAPFREE(p) ::HeapFree ( m_Heap, HEAP_NO_SERIALIZE, p )
#define HEAPDESTROY() ::HeapDestroy ( m_Heap ); m_Heap = 0;
#else
#define HEAPCREATE(size)
#define HEAPALLOC(size) malloc(size)
#define HEAPREALLOC(p,size) realloc(p,size);
#define HEAPFREE(p) free(p)
#define HEAPDESTROY()
#endif
template <class T>
class CQueueT : public Uncopyable
{
protected:
// What we want to protect
Mutex m_AddMutex;
Mutex m_GetMutex;
T* m_Items;
off_t m_AddIndex;
off_t m_GetIndex;
size_t m_Size;
#ifdef WIN32
HANDLE m_Heap;
#endif//WIN32
inline void m_GrowBy ( size_t number_of_new_items );
public:
inline CQueueT ( size_t initial_size = 1024 );
inline ~CQueueT();
inline bool Add( const T& new_item );
inline void Empty() { m_AddIndex = 0; m_GetIndex = 0; };
inline bool Get( T& item );
inline size_t GetLength() const;
inline size_t GetMaximumLength() const { return( m_Size ); };
inline bool AddArray ( const T* new_items, int item_count );
inline int GetArray ( T* items, const int maxget, const T& tEnd );
inline bool Contains ( const T& t );
};
template <class T>
inline CQueueT<T>::CQueueT ( size_t initial_size )
{
m_AddIndex = 0;
m_GetIndex = 0;
m_Items = NULL;
if ( initial_size == 0 )
initial_size = 1;
/*
** 1999-11-05
** We create our own heap because all of the pointers used are allocated
** and freed be us. We don't have to worry about a non-serialized thread
** accessing something we allocated. Because of this, we can perform our
** memory allocations in a heap dedicated to queueing. This means when we
** have to allocate more memory, we don't have to wait for all other threads
** to pause while we allocate from the shared heap (like the C Runtime heap)
*/
HEAPCREATE( ( ( ( 2 * initial_size * sizeof(T) ) < 65536 ) ? 65536 : (2 * initial_size * sizeof(T) ) ) );
m_Items = (T*)HEAPALLOC ( initial_size * sizeof(T) );
m_Size = ( m_Items == NULL ) ? 0 : initial_size;
}
template <class T>
inline CQueueT<T>::~CQueueT()
{
m_AddIndex = 0;
m_GetIndex = 0;
m_Size = 0;
if ( m_Items != NULL )
{
HEAPFREE(m_Items);
m_Items = NULL;
}
HEAPDESTROY();
}
template <class T>
inline bool CQueueT<T>::Add ( const T& item )
{
// Block other threads from entering Add();
Mutex::Lock addlock ( m_AddMutex );
// Add the item
m_Items[ m_AddIndex ] = item;
// 1999-12-08
// Many many thanks go to Lou Franco (lfranco@spheresoft.com)
// for finding an bug here. It rare but recreatable situations,
// m_AddIndex could be in an invalid state.
// Make sure m_AddIndex is never invalid
off_t new_add_index = ( ( m_AddIndex + 1 ) >= (off_t)m_Size ) ? 0 : m_AddIndex + 1;
if ( new_add_index == m_GetIndex )
{
// The queue is full. We need to grow.
// Stop anyone from getting from the queue
Mutex::Lock getlock ( m_GetMutex );
m_AddIndex = new_add_index;
// One last double-check.
if ( m_AddIndex == m_GetIndex )
{
m_GrowBy ( m_Size );
}
}
else
{
m_AddIndex = new_add_index;
}
return true;
}
template <class T>
inline bool CQueueT<T>::Get( T& item )
{
// Prevent other threads from entering Get()
Mutex::Lock getlock ( m_GetMutex );
if ( m_GetIndex == m_AddIndex )
{
// Let's check to see if our queue has grown too big
// If it has, then shrink it
if ( m_Size > 1024 )
{
// Yup, we're too big for our britches
Mutex::TryLock addlock ( m_AddMutex );
if ( addlock )
{
// Now, no one can add to the queue
if ( m_GetIndex == m_AddIndex ) // is queue empty?
{
// See if we can just shrink it...
T* return_value = (T*)HEAPREALLOC(m_Items,1024 * sizeof(T));
if ( return_value != NULL )
{
m_Items = (T*) return_value;
}
else
{
// Looks like we'll have to do it the hard way
HEAPFREE ( m_Items );
m_Items = (T*) HEAPALLOC ( 1024 * sizeof(T) );
}
m_Size = ( m_Items == NULL ) ? 0 : 1024;
m_AddIndex = 0;
m_GetIndex = 0;
}
else
{
// m_GetIndex != m_AddIndex, this means that someone added
// to the queue between the time we checked m_Size for being
// too big and the time we entered the add critical section.
// If this happened then we are too busy to shrink
}
}
}
return false;
}
item = m_Items[ m_GetIndex ];
// Make sure m_GetIndex is never invalid
m_GetIndex = ( ( m_GetIndex + 1 ) >= (off_t)m_Size ) ? 0 : m_GetIndex + 1;
return true;
}
template <class T>
inline int CQueueT<T>::GetArray ( T* items, const int maxget, const T& tEnd )
{
// TODO - oooh baby does this need to be optimized
// Prevent other threads from entering Get()
Mutex::Lock getlock ( m_GetMutex ); //::EnterCriticalSection( &m_GetCriticalSection );
int iResult = 0;
for ( int i = 0; i < maxget; i++ )
{
if ( !Get(items[i]) )
break;
iResult++;
if ( items[i] == tEnd )
break;
}
// Let other threads call Get() now
//::LeaveCriticalSection( &m_GetCriticalSection );
return iResult;
}
template <class T>
inline size_t CQueueT<T>::GetLength() const
{
// This is a very expensive process!
// No one can call Add() or Get() while we're computing this
size_t number_of_items_in_the_queue = 0;
Mutex::Lock addlock ( m_AddMutex );
Mutex::Lock getlock ( m_GetMutex );
number_of_items_in_the_queue = ( m_AddIndex >= m_GetIndex ) ?
( m_AddIndex - m_GetIndex ) :
( ( m_AddIndex + m_Size ) - m_GetIndex );
return number_of_items_in_the_queue;
}
template <class T>
inline void CQueueT<T>::m_GrowBy ( size_t number_of_new_items )
{
// Prevent other threads from calling Get().
// We don't need to enter the AddCriticalSection because
// m_GrowBy() is only called from Add();
T* new_array = NULL;
T* pointer_to_free = NULL;
size_t new_size = m_Size + number_of_new_items;
{ // Prevent other threads from getting
Mutex::Lock getlock ( m_GetMutex );
// 2000-05-16
// Thanks go to Royce Mitchell III (royce3@aim-controls.com) for finding
// a HUGE bug here. I was using HeapReAlloc as a short cut but my logic
// was flawed. In certain circumstances, queue items were being dropped.
new_array = (T*)HEAPALLOC ( new_size * sizeof(T) );
// Now copy all of the old items from the old queue to the new one.
// Get the entries from the get-index to the end of the array
memcpy ( new_array, &m_Items[m_GetIndex], ( m_Size - m_GetIndex ) * sizeof(T) );
// Get the entries from the beginning of the array to the add-index
memcpy ( &new_array[m_Size-m_GetIndex], m_Items, m_AddIndex * sizeof(T) );
m_AddIndex = (off_t)m_Size;
m_GetIndex = 0;
m_Size = new_size;
pointer_to_free = m_Items;
m_Items = new_array;
} // Mutex::Lock
HEAPFREE ( pointer_to_free );
}
template <class T>
inline bool CQueueT<T>::Contains ( const T& t )
{
Mutex::Lock addlock ( m_AddMutex );
Mutex::Lock getlock ( m_GetMutex );
for ( int i = m_GetIndex; i != m_AddIndex; i++ )
{
if ( i == m_Size )
i = 0;
if ( m_Items[i] == t )
return true;
}
return m_Items[m_AddIndex] == t;
}
typedef CQueueT<char> CCharQueue;
#endif // QUEUE_CLASS_HEADER

View File

@@ -1,143 +0,0 @@
// Reli.h
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef __RELI_H
#define __RELI_H
////////////////////////////////////////////////////////////////////////////////
// Assert
#undef Assert
#ifdef NDEBUG
#define Assert(exp) ((void)0)
#else
void _wassert (char* szExpr, char* szFile, int line);
#define Assert(exp) (void)( (exp) || (_wassert(#exp, __FILE__, __LINE__), 0) )
#endif /* NDEBUG */
////////////////////////////////////////////////////////////////////////////////
// Swap
template <class T>
void Swap(T a,T b)
{
T t = a;
a = b;
b = t;
}
////////////////////////////////////////////////////////////////////////////////
// Uncopyable - base class disabling copy ctors
class Uncopyable
{
public:
Uncopyable(){} // need a default ctor
private:
Uncopyable ( const Uncopyable& );
const Uncopyable& operator = ( const Uncopyable& );
};
////////////////////////////////////////////////////////////////////////////////
// SPtr - Smart Pointer's must be passed by reference or const reference
template <class T>
class SPtr : public Uncopyable
{
public:
virtual ~SPtr () { Destroy(); }
T * operator->() { return _p; }
T const * operator->() const { return _p; }
operator T&() { Assert(_p); return *_p; }
operator const T&() const { Assert(_p); return *_p; }
void Acquire ( SPtr<T>& t ) { Destroy(); Swap(_p,t._p); }
void Destroy() { if ( _p ) { delete _p; _p = 0; } }
protected:
SPtr (): _p (0) {}
explicit SPtr (T* p): _p (p) {}
T * _p;
private:
operator T* () { return _p; }
};
#define DECLARE_SPTR(cls,init,init2) \
class S##cls : public SPtr<cls> \
{ \
public: \
S##cls ( cls* p ) : SPtr<cls>(p) {} \
explicit S##cls init : SPtr<cls> (new cls init2) {} \
};
/* Example Usage of DECLARE_SPTR:
class MyClass
{
public: // can be protected
MyClass ( int i )
{
...
}
...
}; DECLARE_SPTR(MyClass,(int i),(i))
SMyClass ptr(i);
*/
#define DECLARE_SPTRV(cls) typedef SPtr<cls> S##cls;
/* Example Usage of DECLARE_SPTRV:
class MyAbstractClass
{
public: // can be protected
MyAbstractClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
}; DECLARE_SPTRV(MyAbstractClass)
SMyAbstractClass ptr ( new MySubClass(i) );
*/
#define DECLARE_PTR(cls,init,init2) \
class Ptr : public SPtr<cls> \
{ \
Ptr(cls* p) : SPtr<cls> ( p ) \
{ \
} \
Ptr init : SPtr<cls> ( new cls init2 ) {} \
};
/* Example Usage of DECLARE_PTR:
class MyClass
{
DECLARE_PTR(MyClass,(int i),(i))
public: // can be protected
MyClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
};
MyClass::Ptr ptr ( i );
*/
#define DECLARE_PTRV(cls) \
class Ptr : public SPtr<cls> \
{ \
Ptr(cls* p) : SPtr<cls> ( p ) \
{ \
} \
};
/* Example Usage of DECLARE_PTRV:
class MyAbstractClass
{
DECLARE_PTRV(MyAbstractClass)
public: // can be protected
MyAbstractClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
};
MyAbstractClass::Ptr ptr ( new MySubClass(i) );
*/
#endif//__RELI_H

View File

@@ -1,331 +0,0 @@
// ReliMT.cpp
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# define snprintf _snprintf
#elif defined(UNIX)
# include <errno.h>
# include <sys/sem.h>
#else
# error unrecognized target
#endif//WIN32|UNIX
#include "verify.h"
#include "ReliMT.h"
////////////////////////////////////////////////////////////////////////////////
// Assert
void _wassert ( char* szExpr, char* szFile, int line )
{
fprintf ( stderr, "Assertion Failure: \"%s\" in file %s, line %d", szExpr, szFile, line );
exit (-1);
}
////////////////////////////////////////////////////////////////////////////////
// Thread
Thread::Thread ( long (THREADAPI * pFun) (void* arg), void* pArg )
{
#ifdef WIN32
verify ( _handle = CreateThread (
0, // Security attributes
0, // Stack size
(DWORD (WINAPI*)(void*))pFun,
pArg,
0, // don't create suspended.
&_tid ));
#elif defined(UNIX)
// set up the thread attribute: right now, we do nothing with it.
pthread_attr_t attr;
pthread_attr_init(&attr);
// this will make the threads created by this process really concurrent
verify ( !pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) );
// create the new OS thread object
verify ( !pthread_create ( &_threadId, &attr, (void* (*) (void*))pFun, pArg ) );
verify ( !pthread_attr_destroy(&attr) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
Thread::~Thread()
{
#ifdef WIN32
verify ( CloseHandle ( _handle ) );
#elif defined(UNIX)
verify ( !pthread_cancel ( _threadId ) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
/*void Thread::Resume()
{
#ifdef WIN32
ResumeThread (_handle);
#elif defined(UNIX)
# error how to resume thread in unix?
#else
# error unrecognized target
#endif//WIN32|UNIX
}*/
void Thread::WaitForDeath()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _handle, 2000 );
ASSERT ( dw != WAIT_FAILED );
#elif defined(UNIX)
verify ( !pthread_join ( _threadId, (void**)NULL ) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
////////////////////////////////////////////////////////////////////////////////
// ActiveObject
// The constructor of the derived class
// should call
// _thread.Resume();
// at the end of construction
ActiveObject::ActiveObject() : _isDying (0), _thread (0)
{
}
ActiveObject::~ActiveObject()
{
ASSERT ( !_thread ); // call Kill() from subclass's dtor
// Kill() - // You can't call a virtual function from a dtor, EVEN INDIRECTLY
// so, you must call Kill() in the subclass's dtor
}
// FlushThread must reset all the events on which the thread might be waiting.
void ActiveObject::Kill()
{
if ( _thread )
{
_isDying++;
FlushThread();
// Let's make sure it's gone
_thread->WaitForDeath();
delete _thread;
_thread = 0;
}
}
void ActiveObject::Start()
{
ASSERT ( !_thread );
_thread = new Thread ( ThreadEntry, this );
}
long THREADAPI ActiveObject::ThreadEntry ( void* pArg )
{
ActiveObject * pActive = (ActiveObject*)pArg;
pActive->InitThread();
pActive->Run();
pActive->Kill();
return 0;
}
///////////////////////////////////////////////////////////////////////////////
// Mutex
Mutex::Mutex()
{
#ifdef WIN32
verify ( _h = CreateMutex ( NULL, FALSE, NULL ) );
#elif defined(UNIX)
pthread_mutexattr_t attrib;
verify ( !pthread_mutexattr_init( &attrib ) );
// allow recursive locks
verify ( !pthread_mutexattr_settype( &attrib, PTHREAD_MUTEX_RECURSIVE ) );
verify ( !pthread_mutex_init ( &_mutex, &attrib ) );
#else
# error unrecognized target
#endif
}
Mutex::~Mutex()
{
#ifdef WIN32
verify ( CloseHandle ( _h ) );
#elif defined(UNIX)
verify ( !pthread_mutex_destroy(&_mutex) );
#else
# error unrecognized target
#endif
}
void Mutex::Acquire()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _h, INFINITE );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_ABANDONED );
#elif defined(UNIX)
verify ( !pthread_mutex_lock(&_mutex) );
#else
# error unrecognized target
#endif
}
bool Mutex::TryAcquire()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _h, 1 );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_TIMEOUT || dw == WAIT_ABANDONED );
return (dw != WAIT_TIMEOUT);
#elif defined(UNIX)
int err = pthread_mutex_trylock(&_mutex);
ASSERT ( err == EBUSY || err == 0 );
return (err == 0);
#else
# error unrecognized target
#endif
}
void Mutex::Release()
{
#ifdef WIN32
verify ( ReleaseMutex ( _h ) );
#elif defined(UNIX)
verify ( !pthread_mutex_unlock(&_mutex) );
// we could allow EPERM return value too, but we are forcing user into RIIA
#else
# error unrecognized target
#endif
}
Mutex::Lock::Lock ( Mutex& m ) : _m(m)
{
_m.Acquire();
}
Mutex::Lock::~Lock()
{
_m.Release();
}
Mutex::TryLock::TryLock ( Mutex& m ) : _m(m)
{
_bLocked = _m.TryAcquire();
}
Mutex::TryLock::~TryLock()
{
if ( _bLocked )
_m.Release();
}
///////////////////////////////////////////////////////////////////////////////
// Event
Event::Event()
{
#ifdef WIN32
// start in non-signaled state (red light)
// auto reset after every Wait
verify ( _handle = CreateEvent ( 0, FALSE, FALSE, 0 ) );
#elif defined(UNIX)
//verify ( !pthread_cond_init ( &_cond, NULL /* default attributes */) );
sem_init();
//verify(sem_init());
#else
# error unrecognized target
#endif
}
Event::~Event()
{
#ifdef WIN32
verify ( CloseHandle ( _handle ) );
#elif defined(UNIX)
//verify ( !pthread_cond_destroy ( &_cond ) );
sem_destroy();
#else
# error unrecognized target
#endif
}
void Event::Release() // put into signaled state
{
#ifdef WIN32
verify ( SetEvent ( _handle ) );
#elif defined(UNIX)
//verify ( !pthread_cond_signal ( &_cond ) );
verify(!sem_V());
#else
# error unrecognized target
#endif
}
void Event::Wait()
{
#ifdef WIN32
// Wait until event is in signaled (green) state
DWORD dw = WaitForSingleObject ( _handle, INFINITE );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_ABANDONED );
#elif defined(UNIX)
// According to docs: The pthread_cond_wait() and pthread_cond_timedwait()
// functions are used to block on a condition variable. They are called
// with mutex locked by the calling thread or undefined behaviour will
// result.
//Mutex::Lock lock ( _mutex );
//verify ( !pthread_cond_wait ( &_cond, _mutex ) );
verify(!sem_P());
#else
# error unrecognized target
#endif
}
#ifdef UNIX
void Event::sem_init()
{
sem_id = semget(IPC_PRIVATE, 1, 0666 | IPC_CREAT);
ASSERT(sem_id != -1);
}
int Event::sem_P()
{
struct sembuf sb;
sb.sem_num = 0;
sb.sem_op = -1;
sb.sem_flg = 0;
return semop(sem_id, &sb, 1);
}
int Event::sem_V()
{
struct sembuf sb;
sb.sem_num = 0;
sb.sem_op = 1;
sb.sem_flg = 0;
return semop(sem_id, &sb, 1);
}
void Event::sem_destroy()
{
#ifdef MACOSX
semun mactmp;
mactmp.val = 0;
semctl(sem_id, 0, IPC_RMID, mactmp);
#else
semctl(sem_id, 0, IPC_RMID, 0);
#endif
}
#endif

View File

@@ -1,229 +0,0 @@
// ReliMT.h
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef __RELIMT_H
#define __RELIMT_H
#include "Reli.h"
#ifdef WIN32
# ifndef _WINDOWS_
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
# define THREADAPI WINAPI
#elif defined(UNIX)
# include <pthread.h>
# include <stdlib.h>
# include "string.h"
# include <sys/types.h> //Semaphore
# include <sys/ipc.h> //Semaphore
# include <sys/sem.h> //Semaphore
# define THREADAPI
#else
# error unrecognized target
#endif
////////////////////////////////////////////////////////////////////////////////
// Thread
class Thread : public Uncopyable
{
public:
Thread ( long (THREADAPI * pFun) (void* arg), void* pArg );
~Thread();
//void Resume();
void WaitForDeath();
// platform-specific stuff:
private:
#ifdef WIN32
HANDLE _handle;
DWORD _tid; // thread id
#elif defined(UNIX)
pthread_t _threadId; // id of the thread
#else
# error unrecognized target
#endif
//DECLARE_PTR(Thread,(long (THREADAPI * pFun) (void* arg), void* pArg),(pFun,pArg));
}; //DECLARE_SPTR(Thread,(long (THREADAPI * pFun) (void* arg), void* pArg),(pFun,pArg));
////////////////////////////////////////////////////////////////////////////////
// ActiveObject
class ActiveObject : public Uncopyable
{
public:
ActiveObject();
virtual ~ActiveObject();
void Kill();
void Start();
protected:
virtual void InitThread() = 0;
virtual void Run() = 0;
virtual void FlushThread() = 0;
int _isDying;
static long THREADAPI ThreadEntry ( void *pArg );
Thread *_thread;
//DECLARE_PTRV(ActiveObject);
}; //DECLARE_SPTRV(ActiveObject);
// Last thing in the constructor of a class derived from
// ActiveObject you must call
// Start();
// Inside the loop the Run method you must keep checking _isDying
// if (_isDying)
// return;
// FlushThread must reset all the events on which the thread might be waiting.
// Example:
#if 0
// MyAsyncOutputter - class that outputs strings to a file asynchronously
class MyAsyncOutputter : public ActiveObject
{
public:
MyAsyncOutputter ( const string& filename ) : _filename(filename), _currentBuf(0)
{
Start(); // start thread
}
void InitThread()
{
_f.open ( _filename, "wb" );
}
void Output ( const string& s )
{
{
// acquire lock long enough to add the string to the active buffer
Mutex::Lock lock ( _mutex );
_buf[_currentBuf].push_back ( s );
}
_event.Release(); // don't need the lock fire the event
}
void Run()
{
while ( !_isDying )
{
// wait for signal from Output() or FlushThread()
_event.Wait();
{
// acquire lock long enough to switch active buffers
Mutex::Lock lock ( _mutex );
_currentBuf = 1-_currentBuf;
ASSERT ( !_buf[_currentBuf].size() );
}
// get a reference to the old buffer
vector<string>& buf = _buf[1-_currentBuf];
// write each string out to file and then empty the buffer
for ( int i = 0; i < buf.size(); i++ )
_f.write ( buf[i].c_str(), buf[i].size() );
buf.resize(0);
}
}
void FlushThread()
{
// _isDying is already set: signal thread so it can see that too
_event.Release();
}
private:
string _filename;
File _f;
int _currentBuf;
vector<string> _buf[2];
Event _event;
Mutex _mutex;
};
#endif
////////////////////////////////////////////////////////////////////////////////
// Mutex
class Mutex : public Uncopyable
{
public:
Mutex();
~Mutex();
private:
void Acquire();
bool TryAcquire();
void Release();
public:
// sub-class used to lock the Mutex
class Lock : public Uncopyable
{
public:
Lock ( Mutex& m );
~Lock();
private:
// private data
Mutex& _m;
};
friend class Mutex::Lock;
// sub-class used to attempt to lock the mutex. Use operator bool()
// to test if the lock was successful
class TryLock : public Uncopyable
{
public:
TryLock ( Mutex& m );
~TryLock();
operator bool () { return _bLocked; }
private:
// private data
bool _bLocked;
Mutex& _m;
};
friend class Mutex::TryLock;
private:
// platform-specific stuff:
#ifdef WIN32
HANDLE _h;
#elif defined(UNIX)
pthread_mutex_t _mutex;
public: operator pthread_mutex_t* () { return &_mutex; }
#else
# error unrecognized target
#endif
};
////////////////////////////////////////////////////////////////////////////////
// Event
class Event : public Uncopyable
{
public:
Event();
~Event();
void Release(); // put into signaled state
void Wait();
private:
#ifdef WIN32
HANDLE _handle;
#elif defined(UNIX)
//Sem util functions
void sem_init();
int sem_P();
int sem_V();
void sem_destroy();
int sem_id;
//pthread_cond_t _cond;
//Mutex _mutex;
#else
# error unrecognized target
#endif
//DECLARE_PTR(Event,(),());
}; //DECLARE_SPTR(Event,(),());
#endif//__RELIWIN32_H

View File

@@ -1,504 +0,0 @@
// SockUtils.cpp - Some basic socket utility functions.
// (C) 2002-2004 Royce Mitchell III
// This file is under the BSD & LGPL licenses
#include <stdio.h>
#include "SockUtils.h"
#ifdef WIN32
# ifndef SD_SEND // defined in winsock2.h, but not winsock.h
# define SD_SEND 1
# endif
# define snprintf _snprintf
# ifdef _MSC_VER
# pragma comment ( lib, "ws2_32.lib" )
# endif//_MSC_VER
#elif defined(UNIX)
# include <errno.h>
# include "string.h" // memset
# include <netdb.h> // hostent
# include <arpa/inet.h> //inet_addr
# include <sys/time.h>
# define SD_SEND SHUT_WR //bah thou shalt name thy defines the same
#else
# error unrecognized target
#endif
//// Constants /////////////////////////////////////////////////////////
const int kBufferSize = 1024;
// creates broadcast address
SockAddrIn::SockAddrIn()
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
}
SockAddrIn::SockAddrIn ( const char* szAddr, u_short iPort )
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
sin_addr.s_addr = suLookupAddress(szAddr);
sin_port = htons(iPort);
}
SockAddrIn::SockAddrIn ( in_addr_t iAddr, u_short iPort )
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
sin_addr.s_addr = iAddr;
sin_port = htons(iPort);
}
bool suStartup()
{
#ifdef WIN32
WSADATA wsaData;
if ( WSAStartup ( MAKEWORD(2,0), &wsaData ) )
return false;
if ( wsaData.wVersion != MAKEWORD(2,0) )
{
WSACleanup();
return false;
}
return true;
#elif defined(UNIX)
// nothing special required here
return true;
#else
# error unrecognized target
#endif
}
//// suTcpSocket ////////////////////////////////////////////////
// Creates a TCP socket.
SOCKET suTcpSocket()
{
SOCKET so = socket ( AF_INET, SOCK_STREAM, 0 );
#if defined(_DEBUG) && defined(WIN32)
if ( so == INVALID_SOCKET && WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return so;
}
//// suUdpSocket ////////////////////////////////////////////////
// Creates a UDP socket. Compensates for new "functionality" introduced
// in Win2K with regards to select() calls
// MS Transport Provider IOCTL to control
// reporting PORT_UNREACHABLE messages
// on UDP sockets via recv/WSARecv/etc.
// Path TRUE in input buffer to enable (default if supported),
// FALSE to disable.
#ifndef SIO_UDP_CONNRESET
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
#endif//SIO_UDP_CONNRESET
SOCKET suUdpSocket()
{
SOCKET so = socket ( AF_INET, SOCK_DGRAM, 0 );
#if defined(_DEBUG) && defined(WIN32)
if ( so == INVALID_SOCKET && WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
#ifdef WIN32
// for Windows 2000, disable new behavior...
// see: http://www-pc.uni-regensburg.de/systemsw/W2KPRO/UPDATE/POSTSP1/Q263823.htm
// this code is innocuous on other win32 platforms
DWORD dwBytesReturned = 0;
BOOL bNewBehavior = FALSE;
// disable new Win2K behavior using
// IOCTL: SIO_UDP_CONNRESET
// we don't care about return value :)
WSAIoctl(so, SIO_UDP_CONNRESET,
&bNewBehavior, sizeof(bNewBehavior),
NULL, 0, &dwBytesReturned,
NULL, NULL);
#endif
return so;
}
//// suShutdownConnection ////////////////////////////////////////////////
// Gracefully shuts the connection sd down. Returns true if it was able
// to shut it down nicely, false if we had to "slam" it shut.
// (either way, the socket does get closed)
bool suShutdownConnection(SOCKET sd)
{
if ( sd == INVALID_SOCKET )
return true;
// Disallow any further data sends. This will tell the other side
// that we want to go away now. If we skip this step, we don't
// shut the connection down nicely.
if (shutdown(sd, SD_SEND) == SOCKET_ERROR)
{
closesocket(sd);
return false;
}
// Receive any extra data still sitting on the socket. After all
// data is received, this call will block until the remote host
// acknowledges the TCP control packet sent by the shutdown above.
// Then we'll get a 0 back from recv, signalling that the remote
// host has closed its side of the connection.
char acReadBuffer[kBufferSize];
for ( ;; )
{
int nNewBytes = recv(sd, acReadBuffer, kBufferSize, 0);
if (nNewBytes == SOCKET_ERROR)
{
closesocket(sd);
return false;
}
else if (nNewBytes != 0)
{
// FYI, received (nNewBytes) unexpected bytes during shutdown.
}
else
{
// Okay, we're done!
break;
}
}
// Close the socket.
if (closesocket(sd) == SOCKET_ERROR)
{
return false;
}
return true;
}
//// suLookupAddress ////////////////////////////////////////////////
// Basically converts a name address to an ip address
in_addr_t suLookupAddress ( const char* pcHost )
{
in_addr_t nRemoteAddr = inet_addr(pcHost);
if ( nRemoteAddr == INADDR_NONE )
{
// pcHost isn't a dotted IP, so resolve it through DNS
hostent* pHE = gethostbyname(pcHost);
if ( pHE == 0 )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return INADDR_NONE;
}
nRemoteAddr = *((in_addr_t*)pHE->h_addr_list[0]);
}
return nRemoteAddr;
}
bool suConnect ( SOCKET so, in_addr_t iAddress, u_short iPort )
{
SockAddrIn sinRemote ( iAddress, iPort );
if ( SOCKET_ERROR == connect(so,sinRemote,sizeof(sinRemote)) )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return false;
}
return true;
}
bool suConnect ( SOCKET so, const char* szAddress, u_short iPort )
{
return suConnect ( so, suLookupAddress(szAddress), iPort );
}
//// suEstablishConnection ////////////////////////////////////////////////
// creates a socket of the specified type, connects to the ip address/port
// requested, and returns the SOCKET created
SOCKET suEstablishConnection ( in_addr_t iAddress, u_short iPort, int type )
{
// Create a socket
if ( type != SOCK_STREAM && type != SOCK_DGRAM )
return INVALID_SOCKET;
SOCKET so = socket(AF_INET, type, 0);
if ( so == INVALID_SOCKET )
return so;
if ( !suConnect(so, iAddress, iPort) )
{
closesocket(so);
return INVALID_SOCKET;
}
return so;
}
//// suEstablishConnection ////////////////////////////////////////////////
// creates a socket of the specified type, connects to the address/port
// requested, and returns the SOCKET created
SOCKET suEstablishConnection ( const char* szAddress, u_short iPort, int type )
{
return suEstablishConnection ( suLookupAddress ( szAddress ), iPort, type );
}
//// suBroadcast ////////////////////////////////////////////////
// takes a previously created broadcast-enabled UDP socket, and broadcasts
// a message on the local network
bool suBroadcast ( SOCKET so, u_short port, const char* buf, int len /* = -1 */ )
{
if ( len == -1 )
len = (int)strlen(buf);
#if 1
SockAddrIn to ( INADDR_BROADCAST, port );
#else // some strange MS OS's don't broadcast to localhost...
SockAddrIn to ( "127.0.0.1", port );
if ( SOCKET_ERROR == sendto ( so, buf, len, 0, to, sizeof(to) ) )
return false;
to.sin_addr.s_addr = INADDR_BROADCAST;
#endif
if ( SOCKET_ERROR == sendto ( so, buf, len, 0, to, sizeof(to) ) )
return false;
return true;
}
//// suRecv ////////////////////////////////////////////////
// retrieves data sent to our TCP socket. If no data, waits for
// a period of timeout ms.
// returns bytes received
// -1 == SOCKET_ERROR
// -2 == timed out waiting for data
int suRecv ( SOCKET so, char* buf, int buflen, int timeout )
{
struct timeval to;
fd_set rread;
int res;
FD_ZERO(&rread); // clear the fd_set
FD_SET(so,&rread); // indicate which socket(s) we want to check
memset((char *)&to,0,sizeof(to)); // clear the timeval struct
to.tv_sec = timeout; // timeout select after (timeout) seconds
// select returns > 0 if there is an event on the socket
res = select((int)so+1, &rread, (fd_set *)0, (fd_set *)0, &to );
if (res < 0)
return -1; // socket error
// there was an event on the socket
if ( (res>0) && (FD_ISSET(so,&rread)) )
return recv ( so, buf, buflen, 0 );
return -2;
}
//// suRecvFrom ////////////////////////////////////////////////
// retrieves data sent to our UDP socket. If no data, waits for
// a period of timeout ms.
// returns bytes received
// returns bytes received
// -1 == SOCKET_ERROR
// -2 == timed out waiting for data
int suRecvFrom ( SOCKET so, char* buf, int buflen, int timeout, sockaddr_in* from, socklen_t* fromlen )
{
struct timeval to;
fd_set rread;
int res;
FD_ZERO(&rread); // clear the fd_set
FD_SET(so,&rread); // indicate which socket(s) we want to check
memset((char *)&to,0,sizeof(to)); // clear the timeval struct
to.tv_sec = timeout; // timeout select after (timeout) seconds
// select returns > 0 if there is an event on the socket
res = select((int)so+1, &rread, (fd_set *)0, (fd_set *)0, &to );
if (res < 0)
return -1; // socket error
// there was an event on the socket
if ( (res>0) && (FD_ISSET(so,&rread)) )
return recvfrom ( so, buf, buflen, 0, (sockaddr*)from, fromlen );
return -2; // timeout
}
//// suBind ////////////////////////////////////////////////
// binds a UDP socket to an interface & port to receive
// data on that port
bool suBind ( SOCKET so, in_addr_t iInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
SockAddrIn sinInterface ( iInterfaceAddress, iListenPort );
if ( bReuseAddr )
{
int optval = -1; // true
if ( SOCKET_ERROR == setsockopt ( so, SOL_SOCKET, SO_REUSEADDR, (const char*)&optval, sizeof(optval) ) )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return false;
}
}
if ( SOCKET_ERROR == bind(so, sinInterface, sizeof(sinInterface)) )
{
int err = SUERRNO;
if ( err != EADDRINUSE )
return false;
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
}
return true;
}
//// suBind ////////////////////////////////////////////////
// binds a UDP socket to an interface & port to receive
// data on that port
bool suBind ( SOCKET so, const char* szInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
in_addr_t iInterfaceAddr = inet_addr(szInterfaceAddress);
if ( iInterfaceAddr == INADDR_NONE )
return false;
return suBind ( so, iInterfaceAddr, iListenPort, bReuseAddr );
}
//// suEnableBroadcast ////////////////////////////////////////////////
// in order to send broadcast messages on a UDP socket, this function
// must be called first
bool suEnableBroadcast ( SOCKET so, bool bEnable /* = true */ )
{
int optval = bEnable ? -1 : 0;
if ( SOCKET_ERROR == setsockopt ( so, SOL_SOCKET, SO_BROADCAST, (const char*)&optval, sizeof(optval) ) )
return false;
return true;
}
//// suErrDesc ////////////////////////////////////////////////
// returns text description of error code
const char* suErrDesc ( int err )
{
static char errbuf[256];
#ifdef WIN32
switch ( err )
{
#define X(E) case E: return #E;
X(WSAEINTR) X(WSAEBADF)
X(WSAEACCES) X(WSAEFAULT)
X(WSAEINVAL) X(WSAEMFILE)
X(WSAEWOULDBLOCK) X(WSAEINPROGRESS)
X(WSAEALREADY) X(WSAENOTSOCK)
X(WSAEDESTADDRREQ) X(WSAEMSGSIZE)
X(WSAEPROTOTYPE) X(WSAENOPROTOOPT)
X(WSAEPROTONOSUPPORT) X(WSAESOCKTNOSUPPORT)
X(WSAEOPNOTSUPP) X(WSAEPFNOSUPPORT)
X(WSAEAFNOSUPPORT) X(WSAEADDRINUSE)
X(WSAEADDRNOTAVAIL) X(WSAENETDOWN)
X(WSAENETUNREACH) X(WSAENETRESET)
X(WSAECONNABORTED) X(WSAECONNRESET)
X(WSAENOBUFS) X(WSAEISCONN)
X(WSAENOTCONN) X(WSAESHUTDOWN)
X(WSAETOOMANYREFS) X(WSAETIMEDOUT)
X(WSAECONNREFUSED) X(WSAELOOP)
X(WSAENAMETOOLONG) X(WSAEHOSTDOWN)
X(WSAEHOSTUNREACH) X(WSAENOTEMPTY)
X(WSAEPROCLIM) X(WSAEUSERS)
X(WSAEDQUOT) X(WSAESTALE)
X(WSAEREMOTE) X(WSASYSNOTREADY)
X(WSAVERNOTSUPPORTED) X(WSANOTINITIALISED)
X(WSAEDISCON) X(WSAENOMORE)
X(WSAECANCELLED) X(WSAEINVALIDPROCTABLE)
X(WSAEINVALIDPROVIDER) X(WSAEPROVIDERFAILEDINIT)
X(WSASYSCALLFAILURE) X(WSASERVICE_NOT_FOUND)
X(WSATYPE_NOT_FOUND) X(WSA_E_NO_MORE)
X(WSA_E_CANCELLED) X(WSAEREFUSED)
#undef X
}
snprintf ( errbuf, sizeof(errbuf), "Unknown socket error (%lu)", err );
errbuf[sizeof(errbuf)-1] = '\0';
return errbuf;
#elif defined(UNIX)
perror(errbuf);
return errbuf;
#else
# error unrecognized target
#endif
}
#if defined(UNICODE) || defined(_UNICODE)
in_addr_t suLookupAddress ( const wchar_t* pcHost )
{
int len = wcslen(pcHost);
char* p = new char[len+1];
wcstombs ( p, pcHost, len );
p[len] = 0;
in_addr_t rc = suLookupAddress ( p );
delete[] p;
return rc;
}
bool suBroadcast ( SOCKET so, u_short port, const wchar_t* buf, int len /* = -1 */ )
{
char* p = new char[len+1];
wcstombs ( p, buf, len );
p[len] = 0;
bool rc = suBroadcast ( so, port, p, len );
delete[] p;
return rc;
}
int suRecv ( SOCKET so, wchar_t* buf, int buflen, int timeout )
{
char* p = new char[buflen+1];
int rc = suRecv ( so, p, buflen, timeout );
p[buflen] = 0;
mbstowcs ( buf, p, buflen );
delete[] p;
return rc;
}
int suRecvFrom ( SOCKET so, wchar_t* buf, int buflen, int timeout, sockaddr_in* from, int* fromlen )
{
char* p = new char[buflen+1];
int rc = suRecvFrom ( so, p, buflen, timeout, from, fromlen );
p[buflen] = 0;
mbs2wcs ( buf, p, buflen );
delete[] p;
return rc;
}
bool suBind ( SOCKET so, const wchar_t* szInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
int len = wcslen(szInterfaceAddress);
char* p = new char[len+1];
wcstombs ( p, szInterfaceAddress, len );
p[len] = 0;
bool rc = suBind ( so, p, iListenPort, bReuseAddr );
delete[] p;
return rc;
}
#endif//UNICODE
suBufferedRecvSocket::suBufferedRecvSocket ( SOCKET so )
: suSocket ( so ), _off(0), _len(0)
{
}
int suBufferedRecvSocket::recvUntil ( std::string& buf, char until, int timeout )
{
if ( !_len )
_off = 0;
else if ( _off > (sizeof(_buf)>>1) )
{
memmove ( _buf, &_buf[_off], _len );
_off = 0;
}
char* poff = &_buf[_off];
for ( ;; )
{
char* p = (char*)memchr ( poff, until, _len );
if ( p /*&& p < &poff[_len]*/ )
{
int ret_len = p-poff+1;
buf.resize ( ret_len );
memmove ( &buf[0], poff, ret_len );
_off += ret_len;
_len -= ret_len;
return ret_len;
}
int rc = suRecv ( *this, &poff[_len], sizeof(_buf)-_len-_off, timeout );
if ( rc < 0 )
{
if ( _len )
{
rc = _len;
buf.resize ( rc );
memmove ( &buf[0], &_buf[_off], rc );
_len = 0;
}
return rc;
}
_len += rc;
}
}
void suBufferedRecvSocket::recvPending()
{
if ( !_len )
_off = 0;
else if ( _off > (sizeof(_buf)>>1) )
{
memmove ( _buf, &_buf[_off], _len );
_off = 0;
}
char* poff = &_buf[_off];
while ( sizeof(_buf)-_len-_off )
{
int rc = suRecv ( *this, &poff[_len], sizeof(_buf)-_len-_off, 1 );
if ( rc <= 0 )
break;
_len += rc;
}
}
bool suBufferedRecvSocket::recvInStr ( char c )
{
return NULL != memchr ( &_buf[_off], c, _len );
}

View File

@@ -1,132 +0,0 @@
// SockUtils.h - Declarations for the Winsock utility functions module.
// (C) 2002-2004 Royce Mitchell III
// This file is under the BSD & LGPL licenses
#ifndef __SOCKUTILS_H
#define __SOCKUTILS_H
#include <string>
#ifdef WIN32
# include <winsock2.h>
# define in_addr_t u_long
# define SUERRNO WSAGetLastError()
# define EADDRINUSE WSAEADDRINUSE
# define ENOTSOCK WSAENOTSOCK
# define socklen_t int
#elif defined(UNIX)
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <unistd.h>
# include <errno.h>
# define closesocket(so) close(so)
# define SOCKET int
# define INVALID_SOCKET -1
# define SOCKET_ERROR -1
# define SUERRNO errno
# ifdef MACOSX
# define socklen_t int //Stupid mac
# endif
#else
# error unrecognized target
#endif
#include <assert.h>
extern bool suStartup();
extern SOCKET suTcpSocket();
extern SOCKET suUdpSocket();
extern bool suShutdownConnection(SOCKET sd);
extern in_addr_t suLookupAddress ( const char* pcHost );
extern bool suConnect ( SOCKET so, in_addr_t iAddress, u_short iPort );
extern bool suConnect ( SOCKET so, const char* szAddress, u_short iPort );
extern SOCKET suEstablishConnection ( in_addr_t iAddress, u_short iPort, int type );
extern SOCKET suEstablishConnection ( const char* szAddress, u_short iPort, int type );
extern bool suBroadcast ( SOCKET so, u_short port, const char* buf, int len = -1 );
extern int suRecv ( SOCKET so, char* buf, int buflen, int timeout );
extern int suRecvFrom ( SOCKET so, char* buf, int buflen, int timeout, sockaddr_in* from, socklen_t* fromlen );
extern bool suBind ( SOCKET so, in_addr_t iInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
extern bool suBind ( SOCKET so, const char* szInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
extern bool suEnableBroadcast ( SOCKET so, bool bEnable = true );
extern const char* suErrDesc ( int err );
#if defined(UNICODE) || defined(_UNICODE)
extern in_addr_t suLookupAddress ( const wchar_t* pcHost );
extern bool suBroadcast ( SOCKET so, u_short port, const wchar_t* buf, int len = -1 );
extern int suRecv ( SOCKET so, wchar_t* buf, int buflen, int timeout );
extern int suRecvFrom ( SOCKET so, wchar_t* buf, int buflen, int timeout, sockaddr_in* from, int* fromlen );
extern bool suBind ( SOCKET so, const wchar_t* szInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
#endif//UNICODE
class suSocket
{
SOCKET _so;
public:
suSocket ( SOCKET so = INVALID_SOCKET ) : _so(so)
{
}
const suSocket& operator = ( SOCKET so )
{
assert ( _so == INVALID_SOCKET ); // must Detach() or Close() existing socket first
_so = so;
return *this;
}
virtual ~suSocket()
{
Close();
}
void Close()
{
if ( _so != INVALID_SOCKET )
{
//suShutdownConnection ( _so ); // TODO - only valid on TCP sockets
closesocket ( _so );
_so = INVALID_SOCKET;
}
}
operator SOCKET() const
{
return _so;
}
SOCKET Attach ( SOCKET so )
{
SOCKET old = Detach();
_so = so;
return old;
}
SOCKET Detach()
{
SOCKET so = _so;
_so = INVALID_SOCKET;
return so;
}
private:
// disable copy semantics
suSocket ( const suSocket& );
const suSocket& operator = ( const suSocket& );
};
class suBufferedRecvSocket : public suSocket
{
char _buf[2048];
int _off;
int _len;
public:
suBufferedRecvSocket ( SOCKET so = INVALID_SOCKET );
int recvUntil ( std::string& buf, char until, int timeout );
void recvPending();
bool recvInStr ( char c );
};
class SockAddrIn : public sockaddr_in
{
public:
SockAddrIn(); // creates broadcast address
SockAddrIn ( const char* szAddr, u_short iPort );
SockAddrIn ( in_addr_t iAddr, u_short iPort );
operator sockaddr* () { return (sockaddr*)this; }
operator sockaddr_in* () { return (sockaddr_in*)this; }
};
#endif//__SOCKUTILS_H

View File

@@ -1,96 +0,0 @@
// SplitJoin.cpp
//
// This code is copyright 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifdef _MSC_VER
#pragma warning ( disable : 4786 ) // MSVC6 can't handle too-long template names
#endif//_MSC_VER
//#include <sstream>
#include "SplitJoin.h"
#include <string.h>
using std::string;
using std::vector;
//using std::stringstream;
static const char* quotes = "\"\'";
bool Split ( vector<string>& vec, const char* csv, char sep, bool merge )
{
string scsv ( csv );
char* col = &scsv[0];
vec.resize ( 0 );
for ( ;; )
{
char* p = col;
while ( isspace(*p) && *p != sep )
p++;
char quote = 0;
if ( strchr ( quotes, *p ) )
quote = *p++;
while ( *p && (*p != sep || quote) )
{
if ( *p++ == quote )
break;
}
while ( isspace(*p) && *p != sep )
p++;
if ( *p && *p != sep )
return false;
string scol ( col, p-col );
//quote = scol[0];
if ( quote )
{
if ( scol[scol.size()-1] == quote )
scol = string ( &scol[1], scol.size()-2 );
}
if ( scol.length() || !merge )
vec.push_back ( scol );
if ( !*p )
break;
col = p + 1;
}
return true;
}
bool Join ( string& csv, vector<string>& vec, char sep )
{
csv.resize(0);
for ( int i = 0; i < vec.size(); i++ )
{
if ( i )
csv += sep;
string& s = vec[i];
if ( strchr ( s.c_str(), sep ) )
{
if ( strchr ( s.c_str(), '\"' ) )
{
if ( strchr ( s.c_str(), '\'' ) )
return false; // the sep, " and ' are all in the string, can't build valid output
csv += '\'';
csv += s;
csv += '\'';
}
else
{
csv += '\"';
csv += s;
csv += '\"';
}
}
else
csv += s;
}
return true;
}

View File

@@ -1,32 +0,0 @@
// SplitJoin.h
//
// This code is copyright 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef SPLITJOIN_H
#define SPLITJOIN_H
#include <vector>
#include <string>
bool Split (
std::vector<std::string>& vec,
const char* csv,
char sep=',',
bool merge=false );
bool Join (
std::string& csv,
std::vector<std::string>& vec,
char sep=',' );
inline bool Split (
std::vector<std::string>& vec,
const std::string& csv,
char sep=',',
bool merge=false )
{
return Split ( vec, csv.c_str(), sep, merge );
}
#endif//SPLIT_H

View File

@@ -1,240 +0,0 @@
// ThreadPool.cpp
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#include <vector>
using std::vector;
#include "ThreadPool.h"
#include "QueueT.h"
#include "auto_vector.h"
#include "verify.h"
#include "ReliMT.h"
class PoolableThread : public ActiveObject
{
public:
PoolableThread ( ThreadPoolImpl& );
~PoolableThread()
{
Kill();
}
void InitThread();
void Run();
void FlushThread();
ThreadPoolImpl& _pool;
};
class ThreadPoolLaunchData
{
public:
ThreadPoolFunc* pFun;
void* pArg;
};
template <class T>
class AtomicCounter : public Uncopyable
{
Mutex _m;
T _t;
public:
AtomicCounter ( T init = 0 ) : _t(init)
{
}
AtomicCounter ( const AtomicCounter<T>& t )
{
//Mutex::Lock l ( _m ); // don't need to lock since this is a ctor
Mutex::Lock l2 ( t._m );
_t = t._t;
}
const AtomicCounter<T>& operator = ( const AtomicCounter<T>& t )
{
Mutex::Lock l ( _m );
Mutex::Lock l2 ( t._m );
_t = t._t;
return *this;
}
T operator ++ ()
{
Mutex::Lock l ( _m );
T t = _t++;
return t;
}
const AtomicCounter<T>& operator ++ ( int )
{
Mutex::Lock l ( _m );
++_t;
return *this;
}
T operator -- ()
{
Mutex::Lock l ( _m );
T t = _t--;
return t;
}
const AtomicCounter<T>& operator -- ( int )
{
Mutex::Lock l ( _m );
--_t;
return *this;
}
const AtomicCounter<T>& operator += ( T t )
{
Mutex::Lock l ( _m );
return _t += t;
return *this;
}
const AtomicCounter<T>& operator -= ( T t )
{
Mutex::Lock l ( _m );
return _t -= t;
return *this;
}
operator const T& () const
{
//Mutex::Lock l ( _m );
return _t;
}
T operator !() const
{
//Mutex::Lock l ( _m );
return !_t;
}
};
class ThreadPoolImpl : public Uncopyable
{
public:
ThreadPoolImpl() : _isDying(false), _idleThreads(0)
{
}
~ThreadPoolImpl()
{
}
void Shutdown()
{
_isDying = true;
while ( _idleThreads )
{
_threadWaitEvent.Release();
_threadStartEvent.Wait(); // let thread actually get a grip
}
}
void Launch ( ThreadPoolFunc* pFun, void* pArg )
{
// this mutex is necessary to make sure we never have a conflict
// between checking !_idleThreads and the call to _threadStartEvent.Wait()
// basically if 2 threads call Launch() simultaneously, and there is only
// 1 idle thread, it's possible that a new thread won't be created to
// satisfy the 2nd request until an existing thread finishes.
Mutex::Lock launchlock ( _launchMutex );
ASSERT ( pFun );
ThreadPoolLaunchData* data;
{
Mutex::Lock lock ( _vectorMutex );
if ( !_spareData.size() )
_spareData.push_back ( new ThreadPoolLaunchData() );
data = _spareData.pop_back().release();
if ( !_idleThreads )
_threads.push_back ( new PoolableThread(*this) );
}
data->pFun = pFun;
data->pArg = pArg;
verify ( _pendingData.Add ( data ) );
_threadWaitEvent.Release(); // tell a thread to do it's thing...
_threadStartEvent.Wait(); // wait on a thread to pick up the request
}
// functions for threads to call...
ThreadPoolLaunchData* GetPendingData()
{
ThreadPoolLaunchData* data = NULL;
++_idleThreads;
_threadWaitEvent.Wait(); // waits until there's a request
--_idleThreads;
_threadStartEvent.Release(); // tell requester we got it
if ( _isDying )
return NULL;
_pendingData.Get ( data );
ASSERT ( data );
return data;
}
void RecycleData ( ThreadPoolLaunchData* data )
{
Mutex::Lock lock ( _vectorMutex );
_spareData.push_back ( data );
}
bool _isDying;
Mutex _vectorMutex, _launchMutex;
auto_vector<PoolableThread> _threads;
auto_vector<ThreadPoolLaunchData> _spareData;
CQueueT<ThreadPoolLaunchData*> _pendingData;
Event _threadWaitEvent, _threadStartEvent;
AtomicCounter<int> _idleThreads;
};
///////////////////////////////////////////////////////////////////////////////
// ThreadPool
/*static*/ ThreadPool& ThreadPool::Instance()
{
static ThreadPool tp;
return tp;
}
ThreadPool::ThreadPool() : _pimpl ( new ThreadPoolImpl )
{
};
ThreadPool::~ThreadPool()
{
_pimpl->Shutdown();
delete _pimpl;
_pimpl = 0;
}
void ThreadPool::Launch ( ThreadPoolFunc* pFun, void* pArg )
{
_pimpl->Launch ( pFun, pArg );
}
int ThreadPool::IdleThreads()
{
return _pimpl->_idleThreads;
}
///////////////////////////////////////////////////////////////////////////////
// PoolableThread
PoolableThread::PoolableThread ( ThreadPoolImpl& pool ) : _pool(pool)
{
Start();
}
void PoolableThread::InitThread()
{
}
void PoolableThread::Run()
{
ThreadPoolLaunchData* data;
while ( !_isDying )
{
data = _pool.GetPendingData(); // enter wait state if none...
if ( !data ) // NULL data means kill thread
break;
(*data->pFun) ( data->pArg ); // call the function
_pool.RecycleData ( data );
}
}
void PoolableThread::FlushThread()
{
}

View File

@@ -1,28 +0,0 @@
// ThreadPool.h
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef THREADPOOL_H
#define THREADPOOL_H
#include "ReliMT.h"
typedef void THREADAPI ThreadPoolFunc ( void* );
class ThreadPoolImpl;
class ThreadPool : public Uncopyable
{
public:
static ThreadPool& Instance();
~ThreadPool();
void Launch ( ThreadPoolFunc* pFun, void* pArg );
int IdleThreads();
private:
ThreadPool();
ThreadPoolImpl *_pimpl;
};
#endif// THREADPOOL_H

View File

@@ -1,87 +0,0 @@
// auto_ptr.h
// This file is (C) 2002-2003 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef AUTO_PTR_H
#define AUTO_PTR_H
template<class T>
class auto_ptr
{
public:
typedef T element_type;
explicit auto_ptr(T *p = 0) : _p(p)
{
}
auto_ptr(auto_ptr<T>& rhs) : _p(rhs.release())
{
}
auto_ptr<T>& operator=(auto_ptr<T>& rhs)
{
if ( &rhs != this )
{
dispose();
_p = rhs.release();
}
return *this;
}
auto_ptr<T>& set ( auto_ptr<T>& rhs )
{
if ( &rhs != this )
{
dispose();
_p = rhs.release();
}
return *this;
}
~auto_ptr()
{
dispose();
}
void dispose()
{
if ( _p )
{
delete _p;
_p = 0;
}
}
T& operator[] ( int i )
{
return _p[i];
}
T& operator*() const
{
return *_p;
}
T* operator->() const
{
return _p;
}
T* get() const
{
return _p;
}
T* release()
{
T* p = _p;
_p = 0;
return p;
}
private:
T* _p;
};
#endif//AUTO_PTR_H

View File

@@ -1,141 +0,0 @@
// auto_vector.h
// This file is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef AUTO_VECTOR_H
#define AUTO_VECTOR_H
#include <sys/types.h>
#include "verify.h"
#include "auto_ptr.h"
template<class T>
class auto_vector
{
public:
explicit auto_vector ( size_t capacity = 0 )
: _arr(0), _capacity(0), _end(0)
{
if ( capacity != 0 )
_arr = new auto_ptr<T>[capacity];
_capacity = capacity;
}
~auto_vector()
{
delete []_arr;
}
size_t size() const
{
return _end;
}
const auto_ptr<T>& operator [] ( size_t i ) const
{
ASSERT ( i < _end );
return _arr[i];
}
auto_ptr<T>& operator [] ( size_t i )
{
ASSERT ( i < _end );
return _arr[i];
}
void assign ( size_t i, auto_ptr<T>& p )
{
ASSERT ( i < _end );
_arr[i] = p;
}
void assign_direct ( size_t i, T * p )
{
ASSERT ( i < _end );
reserve ( i + 1 );
_arr[i].reset ( ptr );
}
void push_back ( auto_ptr<T>& p )
{
reserve ( _end + 1 );
_arr[_end++] = p;
}
auto_ptr<T>& back()
{
ASSERT ( _end != 0 );
return _arr[_end-1];
}
void push_back ( T * p )
{
reserve ( _end + 1 );
auto_ptr<T> tmp(p);
_arr[_end++] = tmp;
//GCC is pedantic, this is an error.
//_arr[_end++] = auto_ptr<T>(p);
}
auto_ptr<T> pop_back()
{
ASSERT ( _end != 0 );
if ( !_end )
{
auto_ptr<T> tmp((T*)0);
return tmp;
//GCC, this is an error.
//return auto_ptr<T>(NULL);
}
return _arr[--_end];
}
void resize ( size_t newSize )
{
ASSERT ( newSize >= 0 );
reserve ( newSize ); // make sure we have at least this much room
_end = newSize;
}
void reserve ( size_t reqCapacity )
{
if ( reqCapacity <= _capacity )
return;
size_t newCapacity = 2 * _capacity;
if ( reqCapacity > newCapacity )
newCapacity = reqCapacity;
// allocate new array
auto_ptr<T> * arrNew = new auto_ptr<T> [newCapacity];
// transfer all entries
for ( size_t i = 0; i < _capacity; ++i )
arrNew[i] = _arr[i];
_capacity = newCapacity;
// free old memory
delete[] _arr;
// substitute new array for old array
_arr = arrNew;
}
void remove ( size_t off )
{
size_t last = _end-1;
if ( off == last )
resize ( last );
else if ( off < last )
{
auto_ptr<T> tmp ( pop_back().release() );
_arr[off] = tmp;
}
}
//typedef const_auto_iterator<T> const_iterator;
//const_iterator begin () const { return _arr; }
//const_iterator end () const { return _arr + _end; }
private:
auto_ptr<T> *_arr;
size_t _capacity;
size_t _end;
};
#endif//AUTO_VECTOR_H

View File

@@ -1,58 +0,0 @@
// base64.cpp
#include "base64.h"
using std::string;
static const char* alfabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
string base64_encode ( const string& sInput )
{
unsigned char x=0, topbit=0;
int v=0;
string sOutput;
do
{
if ( topbit < 6 )
{
x++;
v <<= 8;
if ( x <= sInput.length() ) v += sInput[x-1];
topbit += 8;
}
topbit -= 6;
if ( x > sInput.length() && !v )
break;
sOutput += alfabet[(v >> topbit) & 63];
v &= (1 << topbit) - 1;
} while ( x < sInput.length() || v );
int eq = (8 - (sOutput.length() % 4)) % 4;
while ( eq-- )
sOutput += '=';
return sOutput;
}
string base64_decode ( const string& sInput )
{
unsigned char x=0, topbit=0;
int v=0, inlen = sInput.length();
string sOutput;
while ( inlen && sInput[inlen-1] == '=' )
inlen--;
do
{
while ( topbit < 8 )
{
x++;
v <<= 6;
if ( x <= inlen ) v += (strchr(alfabet, sInput[x-1]) - alfabet);
topbit += 6;
}
topbit -= 8;
if ( x > inlen && !v )
break;
sOutput += (char)((v >> topbit) & 255);
v &= ((1 << topbit) - 1);
} while ( x <= inlen || v );
return sOutput;
}

View File

@@ -1,12 +0,0 @@
// base64.h
#ifndef BASE64_H
#define BASE64_H
#include <string>
std::string base64_encode ( const std::string& s );
std::string base64_decode ( const std::string& s );
#endif//BASE64_H

View File

@@ -1,15 +0,0 @@
// chomp.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "chomp.h"
std::string chomp ( const std::string& s )
{
const char* p = &s[0];
const char* p2 = &s[0] + s.size();
while ( p2 > p && strchr("\r\n", p2[-1]) )
p2--;
return std::string ( p, p2-p );
}

View File

@@ -1,13 +0,0 @@
// chomp.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef CHOMP_H
#define CHOMP_H
#include <string>
std::string chomp ( const std::string& s );
#endif//TRIM_H

View File

@@ -1,23 +0,0 @@
// cram_md5.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "md5.h"
#include "cram_md5.h"
#include "base64.h"
using std::string;
string cram_md5 ( const string& username, const string& password, const string& greeting )
{
string challenge = base64_decode ( greeting );
string hmac = HMAC_MD5 ( password, challenge );
//printf ( "(cram_md5): hmac = %s\n", hmac.c_str() );
string raw_response = username;
raw_response += " ";
raw_response += hmac;
//printf ( "(cram_md5): raw_response = %s\n", raw_response.c_str() );
return base64_encode ( raw_response );
}

View File

@@ -1,15 +0,0 @@
// cram_md5.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef CRAM_MD5_H
#define CRAM_MD5_H
#include <string>
std::string cram_md5 (
const std::string& username,
const std::string& password,
const std::string& greeting );
#endif//CRAM_MD5_H

View File

@@ -1,26 +0,0 @@
shit
fuck
pussy
ass
ass-
-ass
dumbass
jackass
fatass
asshole
smartass
cunt
fucker
bitch
dick
penile
stfu
omfg
lmao
ass.
-ass.
semprini
goat.cx
ekush
akshor
poop

View File

@@ -1,10 +0,0 @@
You should have your mouth washed out with soap!
This is a clean channel... please watch your language
Please try to keep it clean
Hey, there's children present ( I'm not even a year old yet! )
Could you find a less-offensive way to express yourself, please?
Such language :(
Those aren't nice words to use
Oh, my poor innocent ears :(
Help! My mind is being corrupted!
filthy mouths are not appreciated here

View File

@@ -1,15 +0,0 @@
Royce3
kjk_hyperion
tamlin
GvG
filip2307
hardon
w3seek
arty
sedwards
Exception
blight_
jimtabor
mtempel
Gge
Alex_Ionescu

View File

@@ -1,581 +0,0 @@
BOOLEAN
CcCanIWrite
CcCopyRead
CcCopyWrite
CcDeferWrite
CcFastCopyRead
CcFastCopyWrite
CcFlushCache
CcGetDirtyPages
CcGetFileObjectFromBcb
CcGetFileObjectFromSectionPtrs
CcGetFlushedValidData
CcGetLsnForFileObject
CcInitializeCacheMap
CcIsThereDirtyData
CcMapData
CcMdlRead
CcMdlReadComplete
CcMdlWriteAbort
CcMdlWriteComplete
CcPinMappedData
CcPinRead
CcPrepareMdlWrite
CcPreparePinWrite
CcPurgeCacheSection
CcRemapBcb
CcRepinBcb
CcScheduleReadAhead
CcSetAdditionalCacheAttributes
CcSetBcbOwnerPointer
CcSetDirtyPageThreshold
CcSetDirtyPinnedData
CcSetFileSizes
CcSetLogHandleForFile
CcSetReadAheadGranularity
CcUninitializeCacheMap
CcUnpinData
CcUnpinDataForThread
CcUnpinRepinnedBcb
CcWaitForCurrentLazyWriterActivity
CcZeroData
DbgLoadImageSymbols
DbgQueryDebugFilterState
DbgSetDebugFilterState
EVENT_TYPE
ExAcquireResourceExclusive
ExAcquireResourceExclusiveLite
ExAcquireResourceSharedLite
ExAcquireSharedStarveExclusive
ExAcquireSharedWaitForExclusive
ExAllocateFromZone
ExAllocatePool
ExAllocatePoolWithQuota
ExAllocatePoolWithQuotaTag
ExAllocatePoolWithTag
ExConvertExclusiveToSharedLite
ExCreateCallback
ExDeleteNPagedLookasideList
ExDeletePagedLookasideList
ExDeleteResource
ExDeleteResourceLite
ExDisableResourceBoostLite
ExEnumHandleTable
ExExtendZone
ExFreePool
ExGetCurrentProcessorCounts
ExGetCurrentProcessorCpuUsage
ExGetExclusiveWaiterCount
ExGetPreviousMode
ExGetSharedWaiterCount
ExInitializeNPagedLookasideList
ExInitializePagedLookasideList
ExInitializeResource
ExInitializeResourceLite
ExInitializeZone
ExInterlockedAddLargeInteger
ExInterlockedAddUlong
ExInterlockedDecrementLong
ExInterlockedExchangeUlong
ExInterlockedExtendZone
ExInterlockedIncrementLong
ExInterlockedInsertHeadList
ExInterlockedInsertTailList
ExInterlockedPopEntryList
ExInterlockedPushEntryList
ExInterlockedRemoveHeadList
ExIsProcessorFeaturePresent
ExIsResourceAcquiredExclusiveLite
ExIsResourceAcquiredSharedLite
ExLocalTimeToSystemTime
ExNotifyCallback
ExPostSystemEvent
ExQueryPoolBlockSize
ExQueueWorkItem
ExRaiseAccessViolation
ExRaiseDatatypeMisalignment
ExRaiseException
ExRaiseHardError
ExRaiseStatus
ExRegisterCallback
ExReinitializeResourceLite
ExReleaseResource
ExReleaseResourceForThread
ExReleaseResourceForThreadLite
ExRosDumpPagedPoolByTag
ExRosQueryPoolTag
ExSetResourceOwnerPointer
ExSetTimerResolution
ExSystemExceptionFilter
ExSystemTimeToLocalTime
ExTryToAcquireResourceExclusiveLite
ExUnregisterCallback
ExUuidCreate
ExVerifySuite
FsRtlAcquireFileExclusive
FsRtlAddMcbEntry
FsRtlAddToTunnelCache
FsRtlAllocateFileLock
FsRtlAllocatePool
FsRtlAllocatePoolWithQuota
FsRtlAllocatePoolWithQuotaTag
FsRtlAllocatePoolWithTag
FsRtlAllocateResource
FsRtlAreNamesEqual
FsRtlBalanceReads
FsRtlCheckLockForReadAccess
FsRtlCheckLockForWriteAccess
FsRtlCopyRead
FsRtlCopyWrite
FsRtlFastCheckLockForRead
FsRtlFastCheckLockForWrite
FsRtlFastUnlockAll
FsRtlFastUnlockAllByKey
FsRtlFastUnlockSingle
FsRtlFindInTunnelCache
FsRtlFreeFileLock
FsRtlGetFileSize
FsRtlGetNextFileLock
FsRtlGetNextMcbEntry
FsRtlIncrementCcFastReadNoWait
FsRtlIncrementCcFastReadNotPossible
FsRtlIncrementCcFastReadResourceMiss
FsRtlIncrementCcFastReadWait
FsRtlInitializeFileLock
FsRtlInitializeMcb
FsRtlInitializeTunnelCache
FsRtlInsertPerFileObjectContext
FsRtlInsertPerStreamContext
FsRtlIsDbcsInExpression
FsRtlIsFatDbcsLegal
FsRtlIsHpfsDbcsLegal
FsRtlIsNameInExpression
FsRtlLookupLastLargeMcbEntryAndIndex
FsRtlLookupLastMcbEntry
FsRtlLookupMcbEntry
FsRtlLookupPerFileObjectContext
FsRtlLookupPerStreamContextInternal
FsRtlMdlRead
FsRtlMdlReadComplete
FsRtlMdlReadCompleteDev
FsRtlMdlReadDev
FsRtlMdlWriteComplete
FsRtlMdlWriteCompleteDev
FsRtlNotifyChangeDirectory
FsRtlNotifyCleanup
FsRtlNotifyFilterChangeDirectory
FsRtlNotifyFilterReportChange
FsRtlNotifyFullChangeDirectory
FsRtlNotifyFullReportChange
FsRtlNotifyReportChange
FsRtlNotifyUninitializeSync
FsRtlNumberOfRunsInMcb
FsRtlPostPagingFileStackOverflow
FsRtlPostStackOverflow
FsRtlPrepareMdlWrite
FsRtlPrepareMdlWriteDev
FsRtlPrivateLock
FsRtlProcessFileLock
FsRtlRegisterFileSystemFilterCallbacks
FsRtlReleaseFile
FsRtlRemoveMcbEntry
FsRtlRemovePerFileObjectContext
FsRtlRemovePerStreamContext
FsRtlResetLargeMcb
FsRtlSyncVolumes
FsRtlTeardownPerStreamContexts
FsRtlTruncateMcb
FsRtlUninitializeFileLock
FsRtlUninitializeMcb
HalAdjustResourceList
HalAllocateCommonBuffer
HalAssignSlotResources
HalCalibratePerformanceCounter
HalFlushCommonBuffer
HalFreeCommonBuffer
HalGetAdapter
HalGetBusData
HalGetBusDataByOffset
HalGetDmaAlignmentRequirement
HalMakeBeep
HalQueryDisplayParameters
HalQueryRealTimeClock
HalReadDmaCounter
HalRequestIpi
HalSetBusData
HalSetBusDataByOffset
HalSetDisplayParameters
HalSetRealTimeClock
HalStartNextProcessor
IoAcquireCancelSpinLock
IoAcquireRemoveLockEx
IoAcquireVpbSpinLock
IoAllocateAdapterChannel
IoAllocateController
IoAllocateDriverObjectExtension
IoAllocateErrorLogEntry
IoAllocateIrp
IoAllocateMdl
IoAllocateWorkItem
IoAssignResources
IoAttachDevice
IoAttachDeviceByPointer
IoAttachDeviceToDeviceStack
IoAttachDeviceToDeviceStackSafe
IoBuildAsynchronousFsdRequest
IoBuildDeviceIoControlRequest
IoBuildPartialMdl
IoBuildSynchronousFsdRequest
IoCallDriver
IoCancelFileOpen
IoCancelIrp
IoCheckQuerySetFileInformation
IoCheckQuerySetVolumeInformation
IoCheckQuotaBufferValidity
IoCheckShareAccess
IoCompleteRequest
IoConnectInterrupt
IoCreateController
IoCreateDevice
IoCreateDisk
IoCreateDriver
IoCreateFile
IoCreateFileSpecifyDeviceObjectHint
IoCreateNotificationEvent
IoCreateStreamFileObject
IoCreateStreamFileObjectEx
IoCreateStreamFileObjectLite
IoCreateSymbolicLink
IoCreateSynchronizationEvent
IoCreateUnprotectedSymbolicLink
IoDeleteController
IoDeleteDevice
IoDeleteDriver
IoDeleteSymbolicLink
IoDetachDevice
IoDisconnectInterrupt
IoEnqueueIrp
IoEnumerateDeviceObjectList
IoFlushAdapterBuffers
IoForwardIrpSynchronously
IoFreeAdapterChannel
IoFreeController
IoFreeErrorLogEntry
IoFreeIrp
IoFreeMapRegisters
IoFreeMdl
IoFreeWorkItem
IoGetAttachedDevice
IoGetAttachedDeviceReference
IoGetBaseFileSystemDeviceObject
IoGetBootDiskInformation
IoGetConfigurationInformation
IoGetCurrentProcess
IoGetDeviceAttachmentBaseRef
IoGetDeviceInterfaceAlias
IoGetDeviceInterfaces
IoGetDeviceObjectPointer
IoGetDeviceProperty
IoGetDeviceToVerify
IoGetDiskDeviceObject
IoGetDriverObjectExtension
IoGetFileObjectGenericMapping
IoGetInitialStack
IoGetLowerDeviceObject
IoGetRelatedDeviceObject
IoGetRequestorProcess
IoGetRequestorProcessId
IoGetRequestorSessionId
IoGetStackLimits
IoGetTopLevelIrp
IoInitializeIrp
IoInitializeRemoveLockEx
IoInitializeTimer
IoInvalidateDeviceRelations
IoInvalidateDeviceState
IoIsFileOriginRemote
IoIsOperationSynchronous
IoIsSystemThread
IoIsValidNameGraftingBuffer
IoMakeAssociatedIrp
IoMapTransfer
IoOpenDeviceInstanceKey
IoOpenDeviceInterfaceRegistryKey
IoOpenDeviceRegistryKey
IoPageRead
IoPnPDeliverServicePowerNotification
IoQueryDeviceDescription
IoQueryDeviceEnumInfo
IoQueryFileDosDeviceName
IoQueryFileInformation
IoQueryVolumeInformation
IoQueueThreadIrp
IoQueueWorkItem
IoRaiseHardError
IoRaiseInformationalHardError
IoReadDiskSignature
IoReadPartitionTableEx
IoRegisterBootDriverReinitialization
IoRegisterDeviceInterface
IoRegisterDriverReinitialization
IoRegisterFileSystem
IoRegisterFsRegistrationChange
IoRegisterLastChanceShutdownNotification
IoRegisterPlugPlayNotification
IoRegisterShutdownNotification
IoReleaseCancelSpinLock
IoReleaseRemoveLockAndWaitEx
IoReleaseRemoveLockEx
IoReleaseVpbSpinLock
IoRemoveShareAccess
IoReportDetectedDevice
IoReportHalResourceUsage
IoReportResourceForDetection
IoReportResourceUsage
IoReportTargetDeviceChange
IoReportTargetDeviceChangeAsynchronous
IoRequestDeviceEject
IoReuseIrp
IoSetCompletionRoutineEx
IoSetDeviceInterfaceState
IoSetDeviceToVerify
IoSetFileOrigin
IoSetHardErrorOrVerifyDevice
IoSetInformation
IoSetIoCompletion
IoSetPartitionInformationEx
IoSetShareAccess
IoSetStartIoAttributes
IoSetSystemPartition
IoSetThreadHardErrorMode
IoSetTopLevelIrp
IoStartNextPacket
IoStartNextPacketByKey
IoStartPacket
IoStartTimer
IoStopTimer
IoSynchronousInvalidateDeviceRelations
IoSynchronousPageWrite
IoUnregisterFileSystem
IoUnregisterFsRegistrationChange
IoUnregisterPlugPlayNotification
IoUnregisterShutdownNotification
IoUpdateShareAccess
IoValidateDeviceIoControlAccess
IoVerifyPartitionTable
IoVerifyVolume
IoVolumeDeviceToDosName
IoWMIAllocateInstanceIds
IoWMIDeviceObjectToInstanceName
IoWMIExecuteMethod
IoWMIHandleToInstanceName
IoWMIOpenBlock
IoWMIQueryAllData
IoWMIQueryAllDataMultiple
IoWMIQuerySingleInstance
IoWMIQuerySingleInstanceMultiple
IoWMIRegistrationControl
IoWMISetNotificationCallback
IoWMISetSingleInstance
IoWMISetSingleItem
IoWMISuggestInstanceName
IoWMIWriteEvent
IoWriteErrorLogEntry
IoWritePartitionTableEx
KPRIORITY
KdPortGetByte
KdPortPollByte
KdPortPutByte
Ke386QueryIoAccessMap
Ke386SetIoAccessMap
KeAcquireInterruptSpinLock
KeAreApcsDisabled
KeCapturePersistentThreadState
KeDeregisterBugCheckReasonCallback
KeFindConfigurationEntry
KeFindConfigurationNextEntry
KeFlushEntireTb
KeFlushQueuedDpcs
KeGetRecommendedSharedDataAlignment
KeIsExecutingDpc
KeQueryActiveProcessors
KeQueryPerformanceCounter
KeQueryPriorityThread
KeQueryRuntimeThread
KeQuerySystemTime
KeQueryTickCount
KeQueryTimeIncrement
KeRaiseIrql
KeRaiseIrqlToDpcLevel
KeRaiseUserException
KeReadStateEvent
KeRegisterBugCheckCallback
KeRegisterBugCheckReasonCallback
KeReleaseInterruptSpinLock
KeReleaseMutant
KeReleaseMutex
KeReleaseSemaphore
KeReleaseSpinLock
KeReleaseSpinLockFromDpcLevel
KeReleaseSpinLockFromDpcLevel
KeRemoveByKeyDeviceQueue
KeRemoveByKeyDeviceQueueIfBusy
KeRemoveDeviceQueue
KeRemoveEntryDeviceQueue
KeRemoveSystemServiceTable
KeRestoreFloatingPointState
KeRevertToUserAffinityThread
KeRosDumpStackFrames
KeRosGetStackFrames
KeRosPrintAddress
KeSaveFloatingPointState
KeSetDmaIoCoherency
KeSetEvent
KeSetEventBoostPriority
KeSetIdealProcessorThread
KeSetKernelStackSwapEnable
KeSetProfileIrql
KeSetSystemAffinityThread
KeSetTimeIncrement
KeTerminateThread
KeUserModeCallback
KeWaitForMutexObject
KeWaitForSingleObject
KiCoprocessorError
KiUnexpectedInterrupt
LONG
LdrFindResourceDirectory_U
MmAddPhysicalMemory
MmAddVerifierThunks
MmAdjustWorkingSetSize
MmAdvanceMdl
MmAllocateContiguousMemory
MmAllocateContiguousMemorySpecifyCache
MmAllocateMappingAddress
MmAllocateNonCachedMemory
MmBuildMdlForNonPagedPool
MmCanFileBeTruncated
MmCreateMdl
MmCreateSection
MmDbgTranslatePhysicalAddress
MmDisableModifiedWriteOfSection
MmFlushImageSection
MmForceSectionClosed
MmFreeContiguousMemory
MmFreeMappingAddress
MmFreeNonCachedMemory
MmGetPhysicalAddress
MmGetPhysicalMemoryRanges
MmGetSystemRoutineAddress
MmGetVirtualForPhysical
MmGrowKernelStack
MmIsAddressValid
MmIsDriverVerifying
MmIsNonPagedSystemAddressValid
MmIsRecursiveIoFault
MmIsThisAnNtAsSystem
MmIsVerifierEnabled
MmLockPagableDataSection
MmLockPagableImageSection
MmLockPagableSectionByHandle
MmMapIoSpace
MmMapLockedPages
MmMapLockedPagesWithReservedMapping
MmMapMemoryDumpMdl
MmMapUserAddressesToPage
MmMapVideoDisplay
MmMapViewInSessionSpace
MmMapViewInSystemSpace
MmMapViewOfSection
MmMarkPhysicalMemoryAsBad
MmMarkPhysicalMemoryAsGood
MmPageEntireDriver
MmPrefetchPages
MmProbeAndLockPages
MmProbeAndLockProcessPages
MmProbeAndLockSelectedPages
MmProtectMdlSystemAddress
MmQuerySystemSize
MmRemovePhysicalMemory
MmResetDriverPaging
MmSecureVirtualMemory
MmSetAddressRangeModified
MmSetBankedSection
MmSizeOfMdl
MmTrimAllSystemPagableMemory
MmUnlockPagableImageSection
MmUnlockPages
MmUnmapIoSpace
MmUnmapLockedPages
MmUnmapReservedMapping
MmUnmapVideoDisplay
MmUnmapViewInSessionSpace
MmUnmapViewInSystemSpace
MmUnmapViewOfSection
MmUnsecureVirtualMemory
OUT
ObCreateObject
PEJOB
PEPROCESS
PKBUGCHECK_CALLBACK_RECORD
PKDEVICE_QUEUE_ENTRY
PKIRQL
PULONG
PVOID
PW32_THREAD_CALLBACK
PoCallDriver
PoRegisterDeviceForIdleDetection
PoRegisterSystemState
PoRequestPowerIrp
PoSetDeviceBusy
PoSetPowerState
PoSetSystemState
PoStartNextPowerIrp
PoUnregisterSystemState
ProbeForRead
ProbeForWrite
PsAssignImpersonationToken
PsCreateSystemProcess
PsCreateSystemThread
PsGetCurrentProcessId
PsGetCurrentThreadId
PsImpersonateClient
PsReferenceImpersonationToken
PsReferencePrimaryToken
PsRevertThreadToSelf
PsRevertToSelf
PsTerminateSystemThread
READ_PORT_BUFFER_UCHAR
READ_PORT_BUFFER_ULONG
READ_PORT_BUFFER_USHORT
READ_PORT_UCHAR
READ_PORT_ULONG
READ_PORT_USHORT
SeAssignSecurityEx
SeAuditHardLinkCreation
SeAuditingFileEvents
SeAuditingFileEventsWithContext
SeAuditingFileOrGlobalEvents
SeAuditingHardLinkEvents
SeAuditingHardLinkEventsWithContext
SeCaptureSecurityDescriptor
SeCaptureSubjectContext
SeCloseObjectAuditAlarm
SeCreateAccessState
SeCreateClientSecurityFromSubjectContext
SeFilterToken
SeImpersonateClientEx
SePrivilegeObjectAuditAlarm
SeQueryInformationToken
SeQuerySessionIdToken
SeReleaseSecurityDescriptor
SeSetSecurityDescriptorInfoEx
SeTokenIsAdmin
SeTokenIsRestricted
SeTokenIsWriteRestricted
WRITE_PORT_BUFFER_UCHAR
WRITE_PORT_BUFFER_ULONG
WRITE_PORT_BUFFER_USHORT
WRITE_PORT_UCHAR
WRITE_PORT_ULONG
WRITE_PORT_USHORT

View File

@@ -1,10 +0,0 @@
/me bows humbly and begs %s's forgiveness
%s is soo cool... I hope to be like him some day
/me hides in a corner and hopes %s doesn't beat him with the whipping noodle again
/me prostrates at %s's feet and begs his majesty's forgiveness
%s: please don't hurt me!
I'm not worthy... I'm not worthy...
/me sings %s's praises to the world!
/me thinks %s is smarter than %dev%
%s: oh please may I defrag your sock drawer?
/me gives %s a cookie, hoping it will make up for breaking %func% the other day...

View File

@@ -1,9 +0,0 @@
PASSIVE_LEVEL
APC_LEVEL
DISPATCH_LEVEL
PROFILE_LEVEL
CLOCK1_LEVEL
IPI_LEVEL
POWER_LEVEL
HIGH_LEVEL
SYNCH_LEVEL

View File

@@ -1,13 +0,0 @@
the kernel
ntoskrnl
win32k
msafd
ws2_32
user32
shell32
the cache manager
tdi
the scheduler
the thread queue
the message queue
atapi

View File

@@ -1,5 +0,0 @@
/me slaps %s with a large trout
recycle(%s)
Did I hear something? Musta been a %s-fly... Where's that fly-swatter?
%s: go away son, you bother me....
/me beats %s with the whipping noodle

View File

@@ -1,34 +0,0 @@
// panic.cpp
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef WIN32
#include <conio.h>
#include <windows.h>
#endif//WIN32
#include "panic.h"
void panic ( const char* format, ... )
{
va_list arg;
int done;
va_start(arg, format);
#if defined(WIN32) && !defined(_CONSOLE)
char buf[4096];
_vsnprintf ( buf, sizeof(buf)-1, format, arg );
MessageBox ( NULL, buf, "Panic!", MB_OK|MB_ICONEXCLAMATION );
#else
done = vprintf(format, arg);
printf ( "\n" );
#endif
va_end(arg);
#if defined(WIN32) && defined(_CONSOLE)
printf ( "Press any key to exit\n" );
(void)getch();
#endif//WIN32 && _CONSOLE
exit ( -1 );
}

View File

@@ -1,18 +0,0 @@
// panic.h
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef PANIC_H
#define PANIC_H
void panic ( const char* format, ... );
#define suAssert(expr) if ( !(expr) ) panic ( "%s(%lu): SOCKET ERROR %s\nExpression: %s\n", __FILE__, __LINE__, suErrDesc(SUERRNO), #expr )
#if defined(DEBUG) || defined(_DEBUG)
# define suVerify(expr) suAssert(expr)
#else
# define suVerify(expr) expr
#endif
#endif//PANIC_H

View File

@@ -1,11 +0,0 @@
minute
hour
day
week
fortnight
month
year
decade
century
millenium
eon

View File

@@ -1,44 +0,0 @@
This doc can be also found on the wiki.
ArchBlackman is a IRC-Chat bot of the #reactos irc channel. He has been coded by Royce3 and DrFred (mbosma) currently runs him.
If some one use a swear word he'll tell him not to do so and you can also ask him something technical about reactos. :)
Besides this he also knows some commands. The systax for giving him commands "ArchBlackmann: !grovel". (don't forget to address him)
- !grovel - This is the only command that non ops can do (No Parameter)
- !kiss <person>
- !hug <person>
- !give <someone> <something>
- !say <something> - You can tell him to say something on the channel via PrivateMessage
ArchBlackmann know what he should say from some text files. They can be found on the svn-dir. But can also edit them online if you are op using:
- !add <list> <item>
- !remove <list> <item>
List that are used directly to create responses are:
- tech - here are the sentces ArchBlackmann sais when he finds his name
- curse - this are the curses he looks for
- cursecop - this the responces to them
- grovel - this is said when a op does the grovel command
- nogrovel - this when someone else does it
The remaining lists are not used directly, but by the other lists.
They are:
- dev
- func
- irql
- module
- period
- status
- stru
- type
And they are used like this:
/me thinks %s is smarter than %dev%

View File

@@ -1,998 +0,0 @@
// ssprintf.cpp
#include <malloc.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include "ssprintf.h"
#ifdef _MSC_VER
#define alloca _alloca
#endif//_MSC_VER
typedef __int64 LONGLONG;
typedef unsigned __int64 ULONGLONG;
typedef struct {
unsigned int mantissa:23;
unsigned int exponent:8;
unsigned int sign:1;
} ieee_float_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:20;
unsigned int exponent:11;
unsigned int sign:1;
} ieee_double_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:32;
unsigned int exponent:15;
unsigned int sign:1;
unsigned int empty:16;
} ieee_long_double_t;
std::string ssprintf ( const char* fmt, ... )
{
va_list arg;
va_start(arg, fmt);
std::string f = ssvprintf ( fmt, arg );
va_end(arg);
return f;
}
#define ZEROPAD 1 /* pad with zero */
#define SIGN 2 /* unsigned/signed long */
#define PLUS 4 /* show plus */
#define SPACE 8 /* space if plus */
#define LEFT 16 /* left justified */
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
#define ZEROTRUNC 128 /* truncate zero 's */
static int skip_atoi(const char **s)
{
int i=0;
while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
}
static int do_div(LONGLONG *n,int base)
{
int __res = ((ULONGLONG) *n) % (unsigned) base;
*n = ((ULONGLONG) *n) / (unsigned) base;
return __res;
}
static bool number(std::string& f, LONGLONG num, int base, int size, int precision ,int type)
{
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (type & LEFT)
type &= ~ZEROPAD;
if (base < 2 || base > 36)
return 0;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
if (num < 0) {
sign = '-';
num = -num;
size--;
} else if (type & PLUS) {
sign = '+';
size--;
} else if (type & SPACE) {
sign = ' ';
size--;
}
}
if (type & SPECIAL) {
if (base == 16)
size -= 2;
else if (base == 8)
size--;
}
i = 0;
if (num == 0)
tmp[i++]='0';
else while (num != 0)
tmp[i++] = digits[do_div(&num,base)];
if (i > precision)
precision = i;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
while(size-->0)
f += ' ';
if (sign)
f += sign;
if (type & SPECIAL)
{
if (base==8)
f += '0';
else if (base==16)
{
f += '0';
f += digits[33];
}
}
if (!(type & LEFT))
{
while (size-- > 0)
f += c;
}
while (i < precision--)
{
f += '0';
}
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
return true;
}
static bool numberf(std::string& f, double __n, char exp_sign, int size, int precision, int type)
{
double exponent = 0.0;
double e;
long ie;
//int x;
char *buf, *tmp;
int i = 0;
int j = 0;
//int k = 0;
double frac, intr;
double p;
char sign;
char c;
char ro = 0;
int result;
union
{
double* __n;
ieee_double_t* n;
} n;
n.__n = &__n;
if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) {
ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff);
exponent = ie/3.321928;
}
if ( exp_sign == 'g' || exp_sign == 'G' ) {
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
}
if ( exp_sign == 'e' || exp_sign == 'E' ) {
frac = modf(exponent,&e);
if ( frac > 0.5 )
e++;
else if ( frac < -0.5 )
e--;
result = numberf(f,__n/pow(10.0L,e),'f',size-4, precision, type);
if (result < 0)
return false;
f += exp_sign;
size--;
ie = (long)e;
type = LEFT | PLUS;
if ( ie < 0 )
type |= SIGN;
result = number(f,ie, 10,2, 2,type );
if (result < 0)
return false;
return true;
}
if ( exp_sign == 'f' ) {
buf = (char*)alloca(4096);
if (type & LEFT) {
type &= ~ZEROPAD;
}
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
if (__n < 0) {
sign = '-';
__n = fabs(__n);
size--;
} else if (type & PLUS) {
sign = '+';
size--;
} else if (type & SPACE) {
sign = ' ';
size--;
}
}
frac = modf(__n,&intr);
// # flags forces a . and prevents trucation of trailing zero's
if ( precision > 0 ) {
//frac = modfl(__n,&intr);
i = precision-1;
while ( i >= 0 ) {
frac*=10.0L;
frac = modf(frac, &p);
buf[i] = (int)p + '0';
i--;
}
i = precision;
size -= precision;
ro = 0;
if ( frac > 0.5 ) {
ro = 1;
}
if ( precision >= 1 || type & SPECIAL) {
buf[i++] = '.';
size--;
}
}
if ( intr == 0.0 ) {
buf[i++] = '0';
size--;
}
else {
while ( intr > 0.0 ) {
p = intr;
intr/=10.0L;
modf(intr, &intr);
p -= 10.0*intr;
buf[i++] = (int)p + '0';
size--;
}
}
j = 0;
while ( j < i && ro == 1) {
if ( buf[j] >= '0' && buf[j] <= '8' ) {
buf[j]++;
ro = 0;
}
else if ( buf[j] == '9' ) {
buf[j] = '0';
}
j++;
}
if ( ro == 1 )
buf[i++] = '1';
buf[i] = 0;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (sign)
{
f += sign;
}
if (!(type&(ZEROPAD+LEFT)))
while(size-->0)
{
f += ' ';
}
if (type & SPECIAL) {
}
if (!(type & LEFT))
while (size-- > 0)
{
f += c;
}
tmp = buf;
if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) )
{
j = 0;
while ( j < i && ( *tmp == '0' || *tmp == '.' ))
{
tmp++;
i--;
}
}
// else
// while (i < precision--)
// putc('0', f);
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
}
return true;
}
static bool numberfl(std::string& f, long double __n, char exp_sign, int size, int precision, int type)
{
long double exponent = 0.0;
long double e;
long ie;
//int x;
char *buf, *tmp;
int i = 0;
int j = 0;
//int k = 0;
long double frac, intr;
long double p;
char sign;
char c;
char ro = 0;
int result;
union
{
long double* __n;
ieee_long_double_t* n;
} n;
n.__n = &__n;
if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) {
ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff);
exponent = ie/3.321928;
}
if ( exp_sign == 'g' || exp_sign == 'G' ) {
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
}
if ( exp_sign == 'e' || exp_sign == 'E' ) {
frac = modfl(exponent,&e);
if ( frac > 0.5 )
e++;
else if ( frac < -0.5 )
e--;
result = numberf(f,__n/powl(10.0L,e),'f',size-4, precision, type);
if (result < 0)
return false;
f += exp_sign;
size--;
ie = (long)e;
type = LEFT | PLUS;
if ( ie < 0 )
type |= SIGN;
result = number(f,ie, 10,2, 2,type );
if (result < 0)
return false;
return true;
}
if ( exp_sign == 'f' )
{
buf = (char*)alloca(4096);
if (type & LEFT)
{
type &= ~ZEROPAD;
}
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN)
{
if (__n < 0)
{
sign = '-';
__n = fabs(__n);
size--;
} else if (type & PLUS)
{
sign = '+';
size--;
} else if (type & SPACE)
{
sign = ' ';
size--;
}
}
frac = modfl(__n,&intr);
// # flags forces a . and prevents trucation of trailing zero's
if ( precision > 0 )
{
//frac = modfl(__n,&intr);
i = precision-1;
while ( i >= 0 )
{
frac*=10.0L;
frac = modfl((long double)frac, &p);
buf[i] = (int)p + '0';
i--;
}
i = precision;
size -= precision;
ro = 0;
if ( frac > 0.5 )
{
ro = 1;
}
if ( precision >= 1 || type & SPECIAL)
{
buf[i++] = '.';
size--;
}
}
if ( intr == 0.0 )
{
buf[i++] = '0';
size--;
}
else
{
while ( intr > 0.0 )
{
p=intr;
intr/=10.0L;
modfl(intr, &intr);
p -= 10.0L*intr;
buf[i++] = (int)p + '0';
size--;
}
}
j = 0;
while ( j < i && ro == 1) {
if ( buf[j] >= '0' && buf[j] <= '8' )
{
buf[j]++;
ro = 0;
}
else if ( buf[j] == '9' )
{
buf[j] = '0';
}
j++;
}
if ( ro == 1 )
buf[i++] = '1';
buf[i] = 0;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (sign)
{
f += sign;
}
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (type & SPECIAL) {
}
if (!(type & LEFT))
while (size-- > 0)
{
f += c;
}
tmp = buf;
if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) )
{
j = 0;
while ( j < i && ( *tmp == '0' || *tmp == '.' ))
{
tmp++;
i--;
}
}
// else
// while (i < precision--)
// putc( '0', f);
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
}
return true;
}
static int string(std::string& f, const char* s, int len, int field_width, int precision, int flags)
{
int i, done = 0;
if (s == NULL)
{
s = "<NULL>";
len = 6;
}
else
{
if (len == -1)
{
len = 0;
while ((unsigned int)len < (unsigned int)precision && s[len])
len++;
}
else
{
if ((unsigned int)len > (unsigned int)precision)
len = precision;
}
}
if (!(flags & LEFT))
while (len < field_width--)
{
f += ' ';
done++;
}
for (i = 0; i < len; ++i)
{
f += *s++;
done++;
}
while (len < field_width--)
{
f += ' ';
done++;
}
return done;
}
static int stringw(std::string& f, const wchar_t* sw, int len, int field_width, int precision, int flags)
{
int i, done = 0;
if (sw == NULL)
{
sw = L"<NULL>";
len = 6;
}
else
{
if (len == -1)
{
len = 0;
while ((unsigned int)len < (unsigned int)precision && sw[len])
len++;
}
else
{
if ((unsigned int)len > (unsigned int)precision)
len = precision;
}
}
if (!(flags & LEFT))
while (len < field_width--)
{
f += ' ';
done++;
}
for (i = 0; i < len; ++i)
{
#define MY_MB_CUR_MAX 1
char mb[MY_MB_CUR_MAX];
int mbcount, j;
mbcount = wctomb(mb, *sw++);
if (mbcount <= 0)
{
break;
}
for (j = 0; j < mbcount; j++)
{
f += mb[j];
done++;
}
}
while (len < field_width--)
{
f += ' ';
done++;
}
return done;
}
#define _isnanl _isnan
#define _finitel _finite
std::string ssvprintf ( const char *fmt, va_list args )
{
ULONGLONG num;
int base;
long double _ldouble;
double _double;
const char *s;
const unsigned short* sw;
int result;
std::string f;
int flags; /* flags to number() */
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */
for (; *fmt ; ++fmt)
{
if (*fmt != '%')
{
f += *fmt;
continue;
}
/* process flags */
flags = 0;
repeat:
++fmt; /* this also skips first '%' */
switch (*fmt) {
case '-': flags |= LEFT; goto repeat;
case '+': flags |= PLUS; goto repeat;
case ' ': flags |= SPACE; goto repeat;
case '#': flags |= SPECIAL; goto repeat;
case '0': flags |= ZEROPAD; goto repeat;
}
/* get field width */
field_width = -1;
if (isdigit(*fmt))
field_width = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
/* it's the next argument */
field_width = va_arg(args, int);
if (field_width < 0) {
field_width = -field_width;
flags |= LEFT;
}
}
/* get the precision */
precision = -1;
if (*fmt == '.') {
++fmt;
if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
/* it's the next argument */
precision = va_arg(args, int);
}
if (precision < 0)
precision = 0;
}
/* get the conversion qualifier */
qualifier = 0;
// %Z can be just stand alone or as size_t qualifier
if ( *fmt == 'Z' ) {
qualifier = *fmt;
switch ( *(fmt+1)) {
case 'o':
case 'b':
case 'X':
case 'x':
case 'd':
case 'i':
case 'u':
++fmt;
break;
default:
break;
}
} else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') {
qualifier = *fmt;
++fmt;
} else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') {
qualifier = *fmt;
fmt += 3;
}
// go fine with ll instead of L
if ( *fmt == 'l' ) {
++fmt;
qualifier = 'L';
}
/* default base */
base = 10;
switch (*fmt) {
case 'c':
if (!(flags & LEFT))
while (--field_width > 0)
{
f += ' ';
}
if (qualifier == 'l' || qualifier == 'w')
{
f += (char)(unsigned char)(wchar_t) va_arg(args,int);
}
else
{
f += (char)(unsigned char) va_arg(args,int);
}
while (--field_width > 0)
{
f += ' ';
}
continue;
case 'C':
if (!(flags & LEFT))
while (--field_width > 0)
{
f += ' ';
}
if (qualifier == 'h')
{
f += (char)(unsigned char) va_arg(args,int);
}
else
{
f += (char)(unsigned char)(wchar_t) va_arg(args,int);
}
while (--field_width > 0)
{
f += ' ';
}
continue;
case 's':
if (qualifier == 'l' || qualifier == 'w') {
/* print unicode string */
sw = va_arg(args, wchar_t *);
result = stringw(f, sw, -1, field_width, precision, flags);
} else {
/* print ascii string */
s = va_arg(args, char *);
result = string(f, s, -1, field_width, precision, flags);
}
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
case 'S':
if (qualifier == 'h') {
/* print ascii string */
s = va_arg(args, char *);
result = string(f, s, -1, field_width, precision, flags);
} else {
/* print unicode string */
sw = va_arg(args, wchar_t *);
result = stringw(f, sw, -1, field_width, precision, flags);
}
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
/*case 'Z':
if (qualifier == 'w') {
// print counted unicode string
PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING);
if ((pus == NULL) || (pus->Buffer == NULL)) {
sw = NULL;
len = -1;
} else {
sw = pus->Buffer;
len = pus->Length / sizeof(WCHAR);
}
result = stringw(f, sw, len, field_width, precision, flags);
} else {
// print counted ascii string
PANSI_STRING pas = va_arg(args, PANSI_STRING);
if ((pas == NULL) || (pas->Buffer == NULL)) {
s = NULL;
len = -1;
} else {
s = pas->Buffer;
len = pas->Length;
}
result = string(f, s, -1, field_width, precision, flags);
}
if (result < 0)
return -1;
continue;*/
case 'e':
case 'E':
case 'f':
case 'g':
case 'G':
if (qualifier == 'l' || qualifier == 'L' ) {
_ldouble = va_arg(args, long double);
if ( _isnanl(_ldouble) )
{
f += "Nan";
}
else if ( !_finitel(_ldouble) )
{
if ( _ldouble < 0 )
f += "-Inf";
else
f += "+Inf";
} else {
if ( precision == -1 )
precision = 6;
result = numberfl(f,_ldouble,*fmt,field_width,precision,flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
} else {
_double = (double)va_arg(args, double);
if ( _isnan(_double) )
{
f += "Nan";
}
else if ( !_finite(_double) )
{
if ( _double < 0 )
f += "-Inf";
else
f += "+Inf";
}
else
{
if ( precision == -1 )
precision = 6;
result = numberf(f,_double,*fmt,field_width,precision,flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
}
continue;
case 'p':
if (field_width == -1) {
field_width = 2*sizeof(void *);
flags |= ZEROPAD;
}
result = number(f,
(unsigned long) va_arg(args, void *), 16,
field_width, precision, flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
case 'n':
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
*ip = 0;
} else {
int * ip = va_arg(args, int *);
*ip = 0;
}
continue;
/* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;
case 'b':
base = 2;
break;
case 'X':
flags |= LARGE;
case 'x':
base = 16;
break;
case 'd':
case 'i':
flags |= SIGN;
case 'u':
break;
default:
if (*fmt != '%')
{
f += '%';
}
if (*fmt)
{
f += *fmt;
}
else
--fmt;
continue;
}
if (qualifier == 'I')
num = va_arg(args, ULONGLONG);
else if (qualifier == 'l') {
if (flags & SIGN)
num = va_arg(args, long);
else
num = va_arg(args, unsigned long);
}
else if (qualifier == 'h') {
if (flags & SIGN)
num = va_arg(args, int);
else
num = va_arg(args, unsigned int);
}
else if (flags & SIGN)
num = va_arg(args, int);
else
num = va_arg(args, unsigned int);
result = number(f, num, base, field_width, precision, flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
//putc('\0',f);
return f;
}

View File

@@ -1,12 +0,0 @@
// ssprintf.h
#ifndef SSPRINTF_H
#define SSPRINTF_H
#include <string>
#include <stdarg.h>
std::string ssprintf ( const char* fmt, ... );
std::string ssvprintf ( const char* fmt, va_list args );
#endif//SSPRINTF_H

View File

@@ -1,654 +0,0 @@
RPC_NT_ALREADY_LISTENING
RPC_NT_ALREADY_REGISTERED
RPC_NT_CALL_FAILED
RPC_NT_CALL_FAILED_DNE
RPC_NT_CANT_CREATE_ENDPOINT
RPC_NT_INVALID_BINDING
RPC_NT_INVALID_ENDPOINT_FORMAT
RPC_NT_INVALID_NETWORK_OPTIONS
RPC_NT_INVALID_NET_ADDR
RPC_NT_INVALID_RPC_PROTSEQ
RPC_NT_INVALID_STRING_BINDING
RPC_NT_INVALID_STRING_UUID
RPC_NT_INVALID_TIMEOUT
RPC_NT_NOT_LISTENING
RPC_NT_NO_BINDINGS
RPC_NT_NO_CALL_ACTIVE
RPC_NT_NO_ENDPOINT_FOUND
RPC_NT_NO_PROTSEQS
RPC_NT_NO_PROTSEQS_REGISTERED
RPC_NT_OBJECT_NOT_FOUND
RPC_NT_OUT_OF_RESOURCES
RPC_NT_PROTOCOL_ERROR
RPC_NT_PROTSEQ_NOT_SUPPORTED
RPC_NT_SERVER_TOO_BUSY
RPC_NT_SERVER_UNAVAILABLE
RPC_NT_SS_IN_NULL_CONTEXT
RPC_NT_TYPE_ALREADY_REGISTERED
RPC_NT_UNKNOWN_IF
RPC_NT_UNKNOWN_MGR_TYPE
RPC_NT_WRONG_KIND_OF_BINDING
STATUS_ABANDONED
STATUS_ABANDONED_WAIT_0
STATUS_ABANDONED_WAIT_63
STATUS_ABIOS_INVALID_COMMAND
STATUS_ABIOS_INVALID_LID
STATUS_ABIOS_INVALID_SELECTOR
STATUS_ABIOS_LID_ALREADY_OWNED
STATUS_ABIOS_LID_NOT_EXIST
STATUS_ABIOS_NOT_LID_OWNER
STATUS_ABIOS_NOT_PRESENT
STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
STATUS_ACCESS_DENIED
STATUS_ACCESS_VIOLATION
STATUS_ACCOUNT_DISABLED
STATUS_ACCOUNT_EXPIRED
STATUS_ACCOUNT_LOCKED_OUT
STATUS_ACCOUNT_RESTRICTION
STATUS_ADAPTER_HARDWARE_ERROR
STATUS_ADDRESS_ALREADY_ASSOCIATED
STATUS_ADDRESS_ALREADY_EXISTS
STATUS_ADDRESS_CLOSED
STATUS_ADDRESS_NOT_ASSOCIATED
STATUS_AGENTS_EXHAUSTED
STATUS_ALERTED
STATUS_ALIAS_EXISTS
STATUS_ALLOCATE_BUCKET
STATUS_ALLOTTED_SPACE_EXCEEDED
STATUS_ALREADY_COMMITTED
STATUS_ALREADY_DISCONNECTED
STATUS_ALREADY_WIN32
STATUS_APP_INIT_FAILURE
STATUS_ARBITRATION_UNHANDLED
STATUS_ARRAY_BOUNDS_EXCEEDED
STATUS_AUDIT_FAILED
STATUS_BACKUP_CONTROLLER
STATUS_BAD_COMPRESSION_BUFFER
STATUS_BAD_CURRENT_DIRECTORY
STATUS_BAD_DESCRIPTOR_FORMAT
STATUS_BAD_DEVICE_TYPE
STATUS_BAD_DLL_ENTRYPOINT
STATUS_BAD_FUNCTION_TABLE
STATUS_BAD_IMPERSONATION_LEVEL
STATUS_BAD_INHERITANCE_ACL
STATUS_BAD_INITIAL_PC
STATUS_BAD_INITIAL_STACK
STATUS_BAD_LOGON_SESSION_STATE
STATUS_BAD_MASTER_BOOT_RECORD
STATUS_BAD_NETWORK_NAME
STATUS_BAD_NETWORK_PATH
STATUS_BAD_REMOTE_ADAPTER
STATUS_BAD_SERVICE_ENTRYPOINT
STATUS_BAD_STACK
STATUS_BAD_TOKEN_TYPE
STATUS_BAD_VALIDATION_CLASS
STATUS_BAD_WORKING_SET_LIMIT
STATUS_BEGINNING_OF_MEDIA
STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
STATUS_BREAKPOINT
STATUS_BUFFER_OVERFLOW
STATUS_BUFFER_TOO_SMALL
STATUS_BUS_RESET
STATUS_CANCELLED
STATUS_CANNOT_DELETE
STATUS_CANNOT_IMPERSONATE
STATUS_CANNOT_LOAD_REGISTRY_FILE
STATUS_CANT_ACCESS_DOMAIN_INFO
STATUS_CANT_DISABLE_MANDATORY
STATUS_CANT_OPEN_ANONYMOUS
STATUS_CANT_TERMINATE_SELF
STATUS_CANT_WAIT
STATUS_CARDBUS_NOT_SUPPORTED
STATUS_CHECKING_FILE_SYSTEM
STATUS_CHILD_MUST_BE_VOLATILE
STATUS_CLIENT_SERVER_PARAMETERS_INVALID
STATUS_COMMITMENT_LIMIT
STATUS_CONFLICTING_ADDRESSES
STATUS_CONNECTION_ABORTED
STATUS_CONNECTION_ACTIVE
STATUS_CONNECTION_COUNT_LIMIT
STATUS_CONNECTION_DISCONNECTED
STATUS_CONNECTION_INVALID
STATUS_CONNECTION_IN_USE
STATUS_CONNECTION_REFUSED
STATUS_CONNECTION_RESET
STATUS_CONTROL_C_EXIT
STATUS_CONVERT_TO_LARGE
STATUS_COULD_NOT_INTERPRET
STATUS_CRC_ERROR
STATUS_CTL_FILE_NOT_SUPPORTED
STATUS_DATATYPE_MISALIGNMENT
STATUS_DATA_ERROR
STATUS_DATA_LATE_ERROR
STATUS_DATA_NOT_ACCEPTED
STATUS_DATA_OVERRUN
STATUS_DEBUG_ATTACH_FAILED
STATUS_DELETE_PENDING
STATUS_DEVICE_ALREADY_ATTACHED
STATUS_DEVICE_BUSY
STATUS_DEVICE_CONFIGURATION_ERROR
STATUS_DEVICE_DATA_ERROR
STATUS_DEVICE_DOES_NOT_EXIST
STATUS_DEVICE_NOT_CONNECTED
STATUS_DEVICE_NOT_PARTITIONED
STATUS_DEVICE_NOT_READY
STATUS_DEVICE_OFF_LINE
STATUS_DEVICE_PAPER_EMPTY
STATUS_DEVICE_POWERED_OFF
STATUS_DEVICE_POWER_FAILURE
STATUS_DEVICE_PROTOCOL_ERROR
STATUS_DFS_EXIT_PATH_FOUND
STATUS_DFS_UNAVAILABLE
STATUS_DIRECTORY_NOT_EMPTY
STATUS_DISK_CORRUPT_ERROR
STATUS_DISK_FULL
STATUS_DISK_OPERATION_FAILED
STATUS_DISK_RECALIBRATE_FAILED
STATUS_DISK_RESET_FAILED
STATUS_DLL_INIT_FAILED
STATUS_DLL_INIT_FAILED_LOGOFF
STATUS_DLL_NOT_FOUND
STATUS_DOMAIN_CONTROLLER_NOT_FOUND
STATUS_DOMAIN_CTRLR_CONFIG_ERROR
STATUS_DOMAIN_EXISTS
STATUS_DOMAIN_LIMIT_EXCEEDED
STATUS_DOMAIN_TRUST_INCONSISTENT
STATUS_DRIVER_CANCEL_TIMEOUT
STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
STATUS_DRIVER_INTERNAL_ERROR
STATUS_DRIVER_ORDINAL_NOT_FOUND
STATUS_DRIVER_UNABLE_TO_LOAD
STATUS_DUPLICATE_NAME
STATUS_DUPLICATE_OBJECTID
STATUS_EAS_NOT_SUPPORTED
STATUS_EA_CORRUPT_ERROR
STATUS_EA_LIST_INCONSISTENT
STATUS_EA_TOO_LARGE
STATUS_END_OF_FILE
STATUS_END_OF_MEDIA
STATUS_ENTRYPOINT_NOT_FOUND
STATUS_EOM_OVERFLOW
STATUS_EVALUATION_EXPIRATION
STATUS_EVENTLOG_CANT_START
STATUS_EVENTLOG_FILE_CHANGED
STATUS_EVENTLOG_FILE_CORRUPT
STATUS_EVENT_DONE
STATUS_EVENT_PENDING
STATUS_EXTRANEOUS_INFORMATION
STATUS_FAIL_CHECK
STATUS_FATAL_APP_EXIT
STATUS_FILEMARK_DETECTED
STATUS_FILES_OPEN
STATUS_FILE_CLOSED
STATUS_FILE_CORRUPT_ERROR
STATUS_FILE_DELETED
STATUS_FILE_FORCED_CLOSED
STATUS_FILE_INVALID
STATUS_FILE_IS_A_DIRECTORY
STATUS_FILE_IS_OFFLINE
STATUS_FILE_LOCK_CONFLICT
STATUS_FILE_RENAMED
STATUS_FLOAT_DENORMAL_OPERAND
STATUS_FLOAT_DIVIDE_BY_ZERO
STATUS_FLOAT_INEXACT_RESULT
STATUS_FLOAT_INVALID_OPERATION
STATUS_FLOAT_OVERFLOW
STATUS_FLOAT_STACK_CHECK
STATUS_FLOAT_UNDERFLOW
STATUS_FLOPPY_BAD_REGISTERS
STATUS_FLOPPY_ID_MARK_NOT_FOUND
STATUS_FLOPPY_UNKNOWN_ERROR
STATUS_FLOPPY_VOLUME
STATUS_FLOPPY_WRONG_CYLINDER
STATUS_FOUND_OUT_OF_SCOPE
STATUS_FREE_VM_NOT_AT_BASE
STATUS_FS_DRIVER_REQUIRED
STATUS_FT_MISSING_MEMBER
STATUS_FT_ORPHANING
STATUS_FT_READ_RECOVERING_FROM_BACKUP
STATUS_FT_WRITE_RECOVERY
STATUS_FULLSCREEN_MODE
STATUS_GENERIC_NOT_MAPPED
STATUS_GRACEFUL_DISCONNECT
STATUS_GROUP_EXISTS
STATUS_GUARD_PAGE_VIOLATION
STATUS_GUIDS_EXHAUSTED
STATUS_GUID_SUBSTITUTION_MADE
STATUS_HANDLES_CLOSED
STATUS_HANDLE_NOT_CLOSABLE
STATUS_HOST_UNREACHABLE
STATUS_ILLEGAL_CHARACTER
STATUS_ILLEGAL_DLL_RELOCATION
STATUS_ILLEGAL_FLOAT_CONTEXT
STATUS_ILLEGAL_FUNCTION
STATUS_ILLEGAL_INSTRUCTION
STATUS_ILL_FORMED_PASSWORD
STATUS_ILL_FORMED_SERVICE_ENTRY
STATUS_IMAGE_ALREADY_LOADED
STATUS_IMAGE_CHECKSUM_MISMATCH
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
STATUS_IMAGE_MP_UP_MISMATCH
STATUS_IMAGE_NOT_AT_BASE
STATUS_INCOMPATIBLE_FILE_MAP
STATUS_INFO_LENGTH_MISMATCH
STATUS_INSTANCE_NOT_AVAILABLE
STATUS_INSTRUCTION_MISALIGNMENT
STATUS_INSUFFICIENT_LOGON_INFO
STATUS_INSUFFICIENT_RESOURCES
STATUS_INSUFF_SERVER_RESOURCES
STATUS_INTEGER_DIVIDE_BY_ZERO
STATUS_INTEGER_OVERFLOW
STATUS_INTERNAL_DB_CORRUPTION
STATUS_INTERNAL_DB_ERROR
STATUS_INTERNAL_ERROR
STATUS_INVALID_ACCOUNT_NAME
STATUS_INVALID_ACL
STATUS_INVALID_ADDRESS
STATUS_INVALID_ADDRESS_COMPONENT
STATUS_INVALID_ADDRESS_WILDCARD
STATUS_INVALID_BLOCK_LENGTH
STATUS_INVALID_BUFFER_SIZE
STATUS_INVALID_CID
STATUS_INVALID_COMPUTER_NAME
STATUS_INVALID_CONNECTION
STATUS_INVALID_DEVICE_REQUEST
STATUS_INVALID_DEVICE_STATE
STATUS_INVALID_DISPOSITION
STATUS_INVALID_DOMAIN_ROLE
STATUS_INVALID_DOMAIN_STATE
STATUS_INVALID_EA_FLAG
STATUS_INVALID_EA_NAME
STATUS_INVALID_FILE_FOR_SECTION
STATUS_INVALID_GROUP_ATTRIBUTES
STATUS_INVALID_HANDLE
STATUS_INVALID_HW_PROFILE
STATUS_INVALID_ID_AUTHORITY
STATUS_INVALID_IMAGE_FORMAT
STATUS_INVALID_IMAGE_LE_FORMAT
STATUS_INVALID_IMAGE_NE_FORMAT
STATUS_INVALID_IMAGE_NOT_MZ
STATUS_INVALID_IMAGE_PROTECT
STATUS_INVALID_IMAGE_WIN_16
STATUS_INVALID_INFO_CLASS
STATUS_INVALID_LDT_DESCRIPTOR
STATUS_INVALID_LDT_OFFSET
STATUS_INVALID_LDT_SIZE
STATUS_INVALID_LEVEL
STATUS_INVALID_LOCK_SEQUENCE
STATUS_INVALID_LOGON_HOURS
STATUS_INVALID_LOGON_TYPE
STATUS_INVALID_MEMBER
STATUS_INVALID_NETWORK_RESPONSE
STATUS_INVALID_OPLOCK_PROTOCOL
STATUS_INVALID_OWNER
STATUS_INVALID_PAGE_PROTECTION
STATUS_INVALID_PARAMETER
STATUS_INVALID_PARAMETER_1
STATUS_INVALID_PARAMETER_10
STATUS_INVALID_PARAMETER_11
STATUS_INVALID_PARAMETER_12
STATUS_INVALID_PARAMETER_2
STATUS_INVALID_PARAMETER_3
STATUS_INVALID_PARAMETER_4
STATUS_INVALID_PARAMETER_5
STATUS_INVALID_PARAMETER_6
STATUS_INVALID_PARAMETER_7
STATUS_INVALID_PARAMETER_8
STATUS_INVALID_PARAMETER_9
STATUS_INVALID_PARAMETER_MIX
STATUS_INVALID_PIPE_STATE
STATUS_INVALID_PLUGPLAY_DEVICE_PATH
STATUS_INVALID_PORT_ATTRIBUTES
STATUS_INVALID_PORT_HANDLE
STATUS_INVALID_PRIMARY_GROUP
STATUS_INVALID_QUOTA_LOWER
STATUS_INVALID_READ_MODE
STATUS_INVALID_SECURITY_DESCR
STATUS_INVALID_SERVER_STATE
STATUS_INVALID_SID
STATUS_INVALID_SUB_AUTHORITY
STATUS_INVALID_SYSTEM_SERVICE
STATUS_INVALID_UNWIND_TARGET
STATUS_INVALID_USER_BUFFER
STATUS_INVALID_VARIANT
STATUS_INVALID_VIEW_SIZE
STATUS_INVALID_VLM_OPERATION
STATUS_INVALID_VOLUME_LABEL
STATUS_INVALID_WORKSTATION
STATUS_IN_PAGE_ERROR
STATUS_IO_DEVICE_ERROR
STATUS_IO_PRIVILEGE_FAILED
STATUS_IO_REPARSE_DATA_INVALID
STATUS_IO_REPARSE_TAG_INVALID
STATUS_IO_REPARSE_TAG_MISMATCH
STATUS_IO_REPARSE_TAG_NOT_HANDLED
STATUS_IO_TIMEOUT
STATUS_IP_ADDRESS_CONFLICT1
STATUS_IP_ADDRESS_CONFLICT2
STATUS_KERNEL_APC
STATUS_KEY_DELETED
STATUS_KEY_HAS_CHILDREN
STATUS_LAST_ADMIN
STATUS_LICENSE_QUOTA_EXCEEDED
STATUS_LICENSE_VIOLATION
STATUS_LINK_FAILED
STATUS_LINK_TIMEOUT
STATUS_LM_CROSS_ENCRYPTION_REQUIRED
STATUS_LOCAL_DISCONNECT
STATUS_LOCAL_USER_SESSION_KEY
STATUS_LOCK_NOT_GRANTED
STATUS_LOGIN_TIME_RESTRICTION
STATUS_LOGIN_WKSTA_RESTRICTION
STATUS_LOGON_FAILURE
STATUS_LOGON_NOT_GRANTED
STATUS_LOGON_SERVER_CONFLICT
STATUS_LOGON_SESSION_COLLISION
STATUS_LOGON_SESSION_EXISTS
STATUS_LOGON_TYPE_NOT_GRANTED
STATUS_LOG_FILE_FULL
STATUS_LOG_HARD_ERROR
STATUS_LONGJUMP
STATUS_LOST_WRITEBEHIND_DATA
STATUS_LPC_REPLY_LOST
STATUS_LUIDS_EXHAUSTED
STATUS_MAPPED_ALIGNMENT
STATUS_MAPPED_FILE_SIZE_ZERO
STATUS_MARSHALL_OVERFLOW
STATUS_MEDIA_CHANGED
STATUS_MEDIA_CHECK
STATUS_MEDIA_WRITE_PROTECTED
STATUS_MEMBERS_PRIMARY_GROUP
STATUS_MEMBER_IN_ALIAS
STATUS_MEMBER_IN_GROUP
STATUS_MEMBER_NOT_IN_ALIAS
STATUS_MEMBER_NOT_IN_GROUP
STATUS_MEMORY_NOT_ALLOCATED
STATUS_MESSAGE_NOT_FOUND
STATUS_MISSING_SYSTEMFILE
STATUS_MORE_ENTRIES
STATUS_MORE_PROCESSING_REQUIRED
STATUS_MUTANT_LIMIT_EXCEEDED
STATUS_MUTANT_NOT_OWNED
STATUS_NAME_TOO_LONG
STATUS_NETLOGON_NOT_STARTED
STATUS_NETWORK_ACCESS_DENIED
STATUS_NETWORK_BUSY
STATUS_NETWORK_CREDENTIAL_CONFLICT
STATUS_NETWORK_NAME_DELETED
STATUS_NETWORK_UNREACHABLE
STATUS_NET_WRITE_FAULT
STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
STATUS_NONCONTINUABLE_EXCEPTION
STATUS_NONEXISTENT_EA_ENTRY
STATUS_NONEXISTENT_SECTOR
STATUS_NONE_MAPPED
STATUS_NOTIFY_CLEANUP
STATUS_NOTIFY_ENUM_DIR
STATUS_NOT_ALL_ASSIGNED
STATUS_NOT_A_DIRECTORY
STATUS_NOT_A_REPARSE_POINT
STATUS_NOT_CLIENT_SESSION
STATUS_NOT_COMMITTED
STATUS_NOT_FOUND
STATUS_NOT_IMPLEMENTED
STATUS_NOT_LOCKED
STATUS_NOT_LOGON_PROCESS
STATUS_NOT_MAPPED_DATA
STATUS_NOT_MAPPED_VIEW
STATUS_NOT_REGISTRY_FILE
STATUS_NOT_SAME_DEVICE
STATUS_NOT_SERVER_SESSION
STATUS_NOT_SUPPORTED
STATUS_NOT_TINY_STREAM
STATUS_NO_BROWSER_SERVERS_FOUND
STATUS_NO_CALLBACK_ACTIVE
STATUS_NO_DATA_DETECTED
STATUS_NO_EAS_ON_FILE
STATUS_NO_EVENT_PAIR
STATUS_NO_GUID_TRANSLATION
STATUS_NO_IMPERSONATION_TOKEN
STATUS_NO_INHERITANCE
STATUS_NO_LDT
STATUS_NO_LOGON_SERVERS
STATUS_NO_LOG_SPACE
STATUS_NO_MATCH
STATUS_NO_MEDIA
STATUS_NO_MEDIA_IN_DEVICE
STATUS_NO_MEMORY
STATUS_NO_MORE_EAS
STATUS_NO_MORE_ENTRIES
STATUS_NO_MORE_FILES
STATUS_NO_MORE_MATCHES
STATUS_NO_PAGEFILE
STATUS_NO_QUOTAS_NO_ACCOUNT
STATUS_NO_SECURITY_ON_OBJECT
STATUS_NO_SPOOL_SPACE
STATUS_NO_SUCH_ALIAS
STATUS_NO_SUCH_DEVICE
STATUS_NO_SUCH_DOMAIN
STATUS_NO_SUCH_FILE
STATUS_NO_SUCH_GROUP
STATUS_NO_SUCH_LOGON_SESSION
STATUS_NO_SUCH_MEMBER
STATUS_NO_SUCH_PACKAGE
STATUS_NO_SUCH_PRIVILEGE
STATUS_NO_SUCH_USER
STATUS_NO_TOKEN
STATUS_NO_TRUST_LSA_SECRET
STATUS_NO_TRUST_SAM_ACCOUNT
STATUS_NO_USER_SESSION_KEY
STATUS_NO_YIELD_PERFORMED
STATUS_NT_CROSS_ENCRYPTION_REQUIRED
STATUS_NULL_LM_PASSWORD
STATUS_OBJECTID_EXISTS
STATUS_OBJECT_EXISTS
STATUS_OBJECT_NAME_COLLISION
STATUS_OBJECT_NAME_EXISTS
STATUS_OBJECT_NAME_INVALID
STATUS_OBJECT_NAME_NOT_FOUND
STATUS_OBJECT_PATH_INVALID
STATUS_OBJECT_PATH_NOT_FOUND
STATUS_OBJECT_PATH_SYNTAX_BAD
STATUS_OBJECT_TYPE_MISMATCH
STATUS_OPEN_FAILED
STATUS_OPLOCK_BREAK_IN_PROCESS
STATUS_OPLOCK_NOT_GRANTED
STATUS_ORDINAL_NOT_FOUND
STATUS_PAGEFILE_CREATE_FAILED
STATUS_PAGEFILE_QUOTA
STATUS_PAGEFILE_QUOTA_EXCEEDED
STATUS_PARITY_ERROR
STATUS_PARTIAL_COPY
STATUS_PARTITION_FAILURE
STATUS_PASSWORD_EXPIRED
STATUS_PASSWORD_MUST_CHANGE
STATUS_PASSWORD_RESTRICTION
STATUS_PATH_NOT_COVERED
STATUS_PENDING
STATUS_PIPE_BROKEN
STATUS_PIPE_BUSY
STATUS_PIPE_CLOSING
STATUS_PIPE_CONNECTED
STATUS_PIPE_DISCONNECTED
STATUS_PIPE_EMPTY
STATUS_PIPE_LISTENING
STATUS_PIPE_NOT_AVAILABLE
STATUS_PLUGPLAY_NO_DEVICE
STATUS_PORT_ALREADY_SET
STATUS_PORT_CONNECTION_REFUSED
STATUS_PORT_DISCONNECTED
STATUS_PORT_MESSAGE_TOO_LONG
STATUS_PORT_UNREACHABLE
STATUS_POSSIBLE_DEADLOCK
STATUS_PREDEFINED_HANDLE
STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
STATUS_PRINT_CANCELLED
STATUS_PRINT_QUEUE_FULL
STATUS_PRIVILEGED_INSTRUCTION
STATUS_PRIVILEGE_NOT_HELD
STATUS_PROCEDURE_NOT_FOUND
STATUS_PROCESS_IN_JOB
STATUS_PROCESS_IS_TERMINATING
STATUS_PROCESS_NOT_IN_JOB
STATUS_PROFILING_AT_LIMIT
STATUS_PROFILING_NOT_STARTED
STATUS_PROFILING_NOT_STOPPED
STATUS_PROPSET_NOT_FOUND
STATUS_PROTOCOL_UNREACHABLE
STATUS_PWD_HISTORY_CONFLICT
STATUS_PWD_TOO_RECENT
STATUS_PWD_TOO_SHORT
STATUS_QUOTA_EXCEEDED
STATUS_QUOTA_LIST_INCONSISTENT
STATUS_RANGE_LIST_CONFLICT
STATUS_RANGE_NOT_FOUND
STATUS_RANGE_NOT_LOCKED
STATUS_RECEIVE_EXPEDITED
STATUS_RECEIVE_PARTIAL
STATUS_RECEIVE_PARTIAL_EXPEDITED
STATUS_RECOVERY_FAILURE
STATUS_REDIRECTOR_HAS_OPEN_HANDLES
STATUS_REDIRECTOR_NOT_STARTED
STATUS_REDIRECTOR_PAUSED
STATUS_REDIRECTOR_STARTED
STATUS_REGISTRY_CORRUPT
STATUS_REGISTRY_IO_FAILED
STATUS_REGISTRY_QUOTA_LIMIT
STATUS_REGISTRY_RECOVERED
STATUS_REMOTE_DISCONNECT
STATUS_REMOTE_NOT_LISTENING
STATUS_REMOTE_RESOURCES
STATUS_REMOTE_SESSION_LIMIT
STATUS_REPARSE
STATUS_REPLY_MESSAGE_MISMATCH
STATUS_REQUEST_ABORTED
STATUS_REQUEST_NOT_ACCEPTED
STATUS_RESOURCE_DATA_NOT_FOUND
STATUS_RESOURCE_LANG_NOT_FOUND
STATUS_RESOURCE_NAME_NOT_FOUND
STATUS_RESOURCE_NOT_OWNED
STATUS_RESOURCE_TYPE_NOT_FOUND
STATUS_RETRY
STATUS_REVISION_MISMATCH
STATUS_RXACT_COMMITTED
STATUS_RXACT_COMMIT_FAILURE
STATUS_RXACT_COMMIT_NECESSARY
STATUS_RXACT_INVALID_STATE
STATUS_RXACT_STATE_CREATED
STATUS_SAM_INIT_FAILURE
STATUS_SECRET_TOO_LONG
STATUS_SECTION_NOT_EXTENDED
STATUS_SECTION_NOT_IMAGE
STATUS_SECTION_PROTECTION
STATUS_SECTION_TOO_BIG
STATUS_SEGMENT_NOTIFICATION
STATUS_SEMAPHORE_LIMIT_EXCEEDED
STATUS_SERIAL_COUNTER_TIMEOUT
STATUS_SERIAL_MORE_WRITES
STATUS_SERIAL_NO_DEVICE_INITED
STATUS_SERVER_DISABLED
STATUS_SERVER_HAS_OPEN_HANDLES
STATUS_SERVER_NOT_DISABLED
STATUS_SERVICE_NOTIFICATION
STATUS_SETMARK_DETECTED
STATUS_SHARED_IRQ_BUSY
STATUS_SHARING_PAUSED
STATUS_SHARING_VIOLATION
STATUS_SINGLE_STEP
STATUS_SOME_NOT_MAPPED
STATUS_SPECIAL_ACCOUNT
STATUS_SPECIAL_GROUP
STATUS_SPECIAL_USER
STATUS_STACK_OVERFLOW
STATUS_STACK_OVERFLOW_READ
STATUS_SUCCESS
STATUS_SUSPEND_COUNT_EXCEEDED
STATUS_SYNCHRONIZATION_REQUIRED
STATUS_SYSTEM_PROCESS_TERMINATED
STATUS_THREAD_IS_TERMINATING
STATUS_THREAD_NOT_IN_PROCESS
STATUS_THREAD_WAS_SUSPENDED
STATUS_TIMEOUT
STATUS_TIMER_NOT_CANCELED
STATUS_TIMER_RESOLUTION_NOT_SET
STATUS_TIMER_RESUME_IGNORED
STATUS_TIME_DIFFERENCE_AT_DC
STATUS_TOKEN_ALREADY_IN_USE
STATUS_TOO_LATE
STATUS_TOO_MANY_ADDRESSES
STATUS_TOO_MANY_COMMANDS
STATUS_TOO_MANY_CONTEXT_IDS
STATUS_TOO_MANY_GUIDS_REQUESTED
STATUS_TOO_MANY_LINKS
STATUS_TOO_MANY_LUIDS_REQUESTED
STATUS_TOO_MANY_NAMES
STATUS_TOO_MANY_NODES
STATUS_TOO_MANY_OPENED_FILES
STATUS_TOO_MANY_PAGING_FILES
STATUS_TOO_MANY_SECRETS
STATUS_TOO_MANY_SESSIONS
STATUS_TOO_MANY_SIDS
STATUS_TOO_MANY_THREADS
STATUS_TRANSACTION_ABORTED
STATUS_TRANSACTION_INVALID_ID
STATUS_TRANSACTION_INVALID_TYPE
STATUS_TRANSACTION_NO_MATCH
STATUS_TRANSACTION_NO_RELEASE
STATUS_TRANSACTION_RESPONDED
STATUS_TRANSACTION_TIMED_OUT
STATUS_TRUSTED_DOMAIN_FAILURE
STATUS_TRUSTED_RELATIONSHIP_FAILURE
STATUS_TRUST_FAILURE
STATUS_UNABLE_TO_DECOMMIT_VM
STATUS_UNABLE_TO_DELETE_SECTION
STATUS_UNABLE_TO_FREE_VM
STATUS_UNABLE_TO_LOCK_MEDIA
STATUS_UNABLE_TO_UNLOAD_MEDIA
STATUS_UNDEFINED_CHARACTER
STATUS_UNEXPECTED_IO_ERROR
STATUS_UNEXPECTED_MM_CREATE_ERR
STATUS_UNEXPECTED_MM_EXTEND_ERR
STATUS_UNEXPECTED_MM_MAP_ERROR
STATUS_UNEXPECTED_NETWORK_ERROR
STATUS_UNHANDLED_EXCEPTION
STATUS_UNKNOWN_REVISION
STATUS_UNMAPPABLE_CHARACTER
STATUS_UNRECOGNIZED_MEDIA
STATUS_UNRECOGNIZED_VOLUME
STATUS_UNSUCCESSFUL
STATUS_UNSUPPORTED_COMPRESSION
STATUS_UNWIND
STATUS_USER_APC
STATUS_USER_EXISTS
STATUS_USER_MAPPED_FILE
STATUS_USER_SESSION_DELETED
STATUS_VALIDATE_CONTINUE
STATUS_VARIABLE_NOT_FOUND
STATUS_VDM_HARD_ERROR
STATUS_VERIFY_REQUIRED
STATUS_VIRTUAL_CIRCUIT_CLOSED
STATUS_VOLUME_DISMOUNTED
STATUS_VOLUME_MOUNTED
STATUS_WAIT_0
STATUS_WAIT_63
STATUS_WAKE_SYSTEM_DEBUGGER
STATUS_WAS_LOCKED
STATUS_WAS_UNLOCKED
STATUS_WORKING_SET_LIMIT_RANGE
STATUS_WORKING_SET_QUOTA
STATUS_WRONG_PASSWORD
STATUS_WRONG_PASSWORD_CORE
STATUS_WRONG_VOLUME
STATUS_WX86_BREAKPOINT
STATUS_WX86_CONTINUE
STATUS_WX86_CREATEWX86TIB
STATUS_WX86_EXCEPTION_CHAIN
STATUS_WX86_EXCEPTION_CONTINUE
STATUS_WX86_EXCEPTION_LASTCHANCE
STATUS_WX86_FLOAT_STACK_CHECK
STATUS_WX86_INTERNAL_ERROR
STATUS_WX86_SINGLE_STEP
STATUS_WX86_UNSIMULATE

View File

@@ -1,7 +0,0 @@
FAST_MUTEX
KPCR
PEB
TEB
SPINLOCK
APC
DPC

View File

@@ -1,73 +0,0 @@
What do you think I am, your personal tech support?
You *know* a %stru% is non-re-entrant, right?
The answer to that is so simple, I'm not going to waste my time telling you.
Well, of course... if you're not below DISPATCH_LEVEL, ros is gonna explode on ya when you try to do that ( duh! ).
I don't think that functionality has been implemented, yet.
What do you mean it crashed? It can't crash there!
Wow. That's a new one.
Ask %dev%, I bet he knows.. he knows everything...
When's the last time you rebuilt?
Have you tried a make clean?
Is it plugged in?
Well it works on *my* system :P
Well don't do that, and you won't have that problem.
Didn't we already fix that?
Well... I don't know.. I just have that code disabled in my tree.
Try surrounding it with parenthesis.
Don't you know going around dereferncing null pointers all day can be hazardous to your health?
Well, duh!
There's a bit in cr3 for problems like that.
Just add a field to the %stru% to keep track of it!
Don't worry about it... the garbage collector in %module% will clean it up for you.
Did I do that?
Didn't %dev% fix that already?
Yes, I think I've seen that bug before... no... that was another program.
I could tell you, but then I'd have to unlink() you.
Well if you'd get some sleep, maybe you'd figure it out... not all of us can keep the hours %dev% can...
You did what? Uh oh... that can't be good.
Well... I could tell you, but the answer's pretty complicated. Why don't you wait to read about it in the book I'm writing.
Yeah, that's happened to me, before, too. All you have to do is wrap it in an SEH block and forget about it.
Just put a NULL dereference in there and commit it. It helps get bugs fixed fast! (Not that I would know)
ASSERT is your friend!
I dunno.. but I bet %dev% could find it for you.
I hereby declare that code is perfect. Your problem must be elsewhere.
I wrote that code... it must be perfect.
$#@!$ One of these days I'm gonna throw %module% out the window!!! Sorry, what were you saying?
maybe I broke it in my last commit. Maybe I did it on purpose...
Have you tried debugging it? I got a can of Raid...
Just delete it, it can't be that important ( You should see all the useless cruft I got rid of in %module% )
Try queueing a work item...
My %stru% fell in love with some %stru% in %module%, and %module% has been hell since...
Maybe the PEB is getting corrupted. Try allocating a new PEB and overwriting the old one. That's what I did last time I had a bug like that.
Hmm.. that seems to have been introduced by my last commit... I bet CVS mixed up the bits during the commit.
It can't possibly be my fault, so I don't care.
I'm not experiencing that problem, perhaps it's all in your mind.
Well... like a good friend of mine said... "Don't Panic!"
It just shows you how far ReactOS has come along! A %period% ago a bug like that wouldn't have even been possible!
Just surround the code with an #if 0/#endif block, it solves all my problems!
You know.. if %dev% would just finish %module% for us, we wouldn't be having this problem.
I say we move on to the next function, since we can't seem to figure this one out.
Well, sure, that would have been my first guess, too.... TEN YEARS AGO :p
yup, that sounds like a problem.
If I wanted to talk about VB, I'd go bug Alex...
ask %dev%
Thank you for that amazingly keen insight, Commander Obvious.
Sorry, can't help you right now, trying to track down this bug %dev% caused in %module%
I dont know about that, but I just fixed a problem in %module% for %dev%
How should I know? I'm still trying to figure out this main() thing... ooh! wanna see what I did in %module%?
lol!
*wink*
;)
42
It's gonna take me over %period% to fix all %dev%'s bugs in %module% :(
How could %func% return %status%!? It bet %dev% broke it! I didn't touch it... honest! no.. really! (me hides)
It's fine if you get %status% there ... just ignore the destruction, and call %func% instead.
%dev% said %status% isn't really an error in this context because we expect %module% to be toast by now
heh, I'm still trying to figure out why %func% is returning %status% when I call it from %module%...
%dev% said it's okay to ignore that as long as you're below %irql%
erm, what do you mean?
damn, I do that all the time
if you want a reply that sounds right, I'd say that %func% support for that is vital to the future of %module%
Sounds like you're having a problem with %func%. I hate that thing... don't talk to me about it.
Just return %status% and forget about it. Someone else will fix it, later.
Blah blah blah... sheesh... can't you figure out *anything*?

View File

@@ -1,17 +0,0 @@
// trim.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "trim.h"
std::string trim ( const std::string& s )
{
const char* p = &s[0];
const char* p2 = p + s.size();
while ( *p == ' ' )
p++;
while ( p2 > p && p2[-1] == ' ' )
p2--;
return std::string ( p, p2-p );
}

View File

@@ -1,13 +0,0 @@
// trim.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef TRIM_H
#define TRIM_H
#include <string>
std::string trim ( const std::string& s );
#endif//TRIM_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,37 +0,0 @@
// verify.h
// This code is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef VERIFY_H
#define VERIFY_H
//#include <assert.h>
#ifdef ASSERT
#undef ASSERT
#endif//ASSERT
#include "panic.h"
#if defined(DEBUG) || defined(_DEBUG)
inline void AssertHandler ( bool b, const char* str )
{
if ( !b )
panic ( str );
}
# define ASSERT(x) AssertHandler((x) ? true : false, #x )
#else
# define ASSERT(x)
#endif
#ifdef verify
#undef verify
#endif//verify
#if defined(DEBUG) || defined(_DEBUG)
# define verify(x) ASSERT(x)
#else
# define verify(x) x
#endif
#endif//VERIFY_H

View File

@@ -1,32 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

View File

@@ -1,274 +0,0 @@
using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Globalization;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>BinaryReaderHelp</c> implements static helper methods for extracting binary data
/// from a binary reader object.
/// </summary>
internal class BinaryReaderHelp
{
/// <summary>
/// Internal helper method to extract null-terminated strings from a binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
if(encoder == null)
encoder = Encoding.ASCII;
ArrayList nameBytes = new ArrayList();
byte curByte;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
curByte = binReader.ReadByte();
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a string with a specific length from the binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="length">length of the string (number of bytes)</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, int length, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
if(length == 0)
return "";
if(encoder == null)
encoder = Encoding.ASCII;
ArrayList nameBytes = new ArrayList();
byte curByte;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (nameBytes.Count < length) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
if(nameBytes.Count < length)
curByte = binReader.ReadByte();
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a string with a specific length from the binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="bFoundTerminator">reference to a bool vairable which will receive true if the
/// string terminator \0 was found. false indicates that the end of the stream was reached.</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, ref bool bFoundTerminator, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
ArrayList nameBytes = new ArrayList();
byte curByte;
if(encoder == null)
encoder = Encoding.ASCII;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
curByte = binReader.ReadByte();
if( curByte == (byte)0 )
{
bFoundTerminator = true;
}
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a null-terminated UTF-16/UCS-2 strings from a binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractUTF16String(ref BinaryReader binReader, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
ArrayList nameBytes = new ArrayList();
byte curByte;
int lastByte=-1;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
if(encoder == null)
encoder = Encoding.Unicode;
curByte = binReader.ReadByte();
int nCnt = 0;
while( ((curByte != (byte)0) || (lastByte != 0) ) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
if(nCnt%2 == 0)
lastByte = (int)curByte;
curByte = binReader.ReadByte();
nCnt++;
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = Encoding.Unicode.GetString(name,0,name.Length);
// apply text encoding
name = Encoding.Default.GetBytes(strReturn);
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper for reading ENCINT encoded integer values
/// </summary>
/// <param name="binReader">reference to the reader</param>
/// <returns>a long value</returns>
internal static long ReadENCINT(ref BinaryReader binReader)
{
long nRet = 0;
byte buffer = 0;
int shift = 0;
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return nRet;
do
{
buffer = binReader.ReadByte();
nRet |= ((long)((buffer & (byte)0x7F))) << shift;
shift += 7;
}while ( (buffer & (byte)0x80) != 0);
return nRet;
}
/// <summary>
/// Reads an s/r encoded value from the byte array and decodes it into an integer
/// </summary>
/// <param name="wclBits">a byte array containing all bits (contains only 0 or 1 elements)</param>
/// <param name="s">scale param for encoding</param>
/// <param name="r">root param for encoding</param>
/// <param name="nBitIndex">current index in the wclBits array</param>
/// <returns>Returns an decoded integer value.</returns>
internal static int ReadSRItem(byte[] wclBits, int s, int r, ref int nBitIndex)
{
int nRet = 0;
int q = r;
int nPref1Cnt = 0;
while( wclBits[nBitIndex++] == 1)
{
nPref1Cnt++;
}
if(nPref1Cnt == 0)
{
int nMask = 0;
for(int nbits=0; nbits<q;nbits++)
{
nMask |= ( 0x01 & (int)wclBits[nBitIndex]) << (q-nbits-1);
nBitIndex++;
}
nRet = nMask;
}
else
{
q += (nPref1Cnt-1);
int nMask = 0;
int nRMaxValue = 0;
for(int nbits=0; nbits<q;nbits++)
{
nMask |= ( 0x01 & (int)wclBits[nBitIndex]) << (q-nbits-1);
nBitIndex++;
}
for(int nsv=0; nsv<r; nsv++)
{
nRMaxValue = nRMaxValue << 1;
nRMaxValue |= 0x1;
}
nRMaxValue++; // startvalue of s/r encoding with 1 prefixing '1'
nRMaxValue *= (int) Math.Pow((double)2, (double)(nPref1Cnt-1));
nRet = nRMaxValue + nMask;
}
return nRet;
}
}
}

View File

@@ -1,325 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMBtree</c> implements methods/properties to decode the binary help index.
/// This class automatically creates an index arraylist for the current CHMFile instance.
/// It does not store the index internally !
/// </summary>
/// <remarks>The binary index can be found in the storage file $WWKeywordLinks/BTree</remarks>
internal sealed class CHMBtree : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int BLOCK_SIZE = 2048;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing flags
/// </summary>
private int _flags = 0;
/// <summary>
/// Internal member storing the data format
/// </summary>
private byte[] _dataFormat = new byte[16];
/// <summary>
/// Internal member storing the index of the last listing block
/// </summary>
private int _indexOfLastListingBlock = 0;
/// <summary>
/// Internal member storing the index of the root block
/// </summary>
private int _indexOfRootBlock = 0;
/// <summary>
/// Internal member storing the number of blocks
/// </summary>
private int _numberOfBlocks = 0;
/// <summary>
/// Internal member storing the tree depth.
/// (1 if no index blocks, 2 one level of index blocks, ...)
/// </summary>
private int _treeDepth = 0;
/// <summary>
/// Internal member storing the number of keywords in the file
/// </summary>
private int _numberOfKeywords = 0;
/// <summary>
/// Internal member storing the codepage
/// </summary>
private int _codePage = 0;
/// <summary>
/// true if the index is from a CHI or CHM file, else CHW
/// </summary>
private bool _isCHI_CHM = true;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal flag specifying if we have to read listing or index blocks
/// </summary>
private bool _readListingBlocks = true;
/// <summary>
/// Internal member storing an indexlist of the current file.
/// </summary>
private ArrayList _indexList = new ArrayList();
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the $WWKeywordLinks/BTree file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMBtree(byte[] binaryFileData, CHMFile associatedFile)
{
if( associatedFile == null)
{
throw new ArgumentException("CHMBtree.ctor() - Associated CHMFile must not be null !", "associatedFile");
}
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
int nTemp = 0;
// decode header
binReader.ReadChars(2); // 2chars signature (not important)
_flags = (int)binReader.ReadInt16(); // WORD flags
binReader.ReadInt16(); // size of blocks (always 2048)
_dataFormat = binReader.ReadBytes(16);
binReader.ReadInt32(); // unknown DWORD
_indexOfLastListingBlock = binReader.ReadInt32();
_indexOfRootBlock = binReader.ReadInt32();
binReader.ReadInt32(); // unknown DWORD
_numberOfBlocks = binReader.ReadInt32();
_treeDepth = binReader.ReadInt16();
_numberOfKeywords = binReader.ReadInt32();
_codePage = binReader.ReadInt32();
binReader.ReadInt32(); // lcid DWORD
nTemp = binReader.ReadInt32();
_isCHI_CHM = (nTemp==1);
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
// end of header decode
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset, _treeDepth-1);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <param name="indexBlocks">number of index blocks</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset, int indexBlocks )
{
bool bRet = true;
int nblockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
int freeSpace = binReader.ReadInt16(); // length of freespace
int nrOfEntries = binReader.ReadInt16(); // number of entries
bool bListingEndReached = false;
//while( (memStream.Position < (memStream.Length-freeSpace)) && (bRet) )
//{
int nIndexOfPrevBlock = -1;
int nIndexOfNextBlock = -1;
int nIndexOfChildBlock = 0;
if(_readListingBlocks)
{
nIndexOfPrevBlock = binReader.ReadInt32(); // -1 if this is the header
nIndexOfNextBlock = binReader.ReadInt32(); // -1 if this is the last block
}
else
{
nIndexOfChildBlock = binReader.ReadInt32();
}
for(int nE = 0; nE < nrOfEntries; nE++)
{
if(_readListingBlocks)
{
bListingEndReached = (nIndexOfNextBlock==-1);
string keyWord = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
bool isSeeAlsoKeyword = (binReader.ReadInt16()!=0);
int indent = binReader.ReadInt16(); // indent of entry
int nCharIndex = binReader.ReadInt32();
binReader.ReadInt32();
int numberOfPairs = binReader.ReadInt32();
int[] nTopics = new int[numberOfPairs];
string[] seeAlso = new string[numberOfPairs];
for(int i=0; i < numberOfPairs; i++)
{
if(isSeeAlsoKeyword)
{
seeAlso[i] = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
}
else
{
nTopics[i] = binReader.ReadInt32();
}
}
binReader.ReadInt32(); // unknown
int nIndexOfThisEntry = binReader.ReadInt32();
IndexItem newItem = new IndexItem(_associatedFile, keyWord, isSeeAlsoKeyword, indent, nCharIndex, nIndexOfThisEntry, seeAlso, nTopics);
_indexList.Add(newItem);
}
else
{
string keyWord = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
bool isSeeAlsoKeyword = (binReader.ReadInt16()!=0);
int indent = binReader.ReadInt16(); // indent of entry
int nCharIndex = binReader.ReadInt32();
binReader.ReadInt32();
int numberOfPairs = binReader.ReadInt32();
int[] nTopics = new int[numberOfPairs];
string[] seeAlso = new string[numberOfPairs];
for(int i=0; i < numberOfPairs; i++)
{
if(isSeeAlsoKeyword)
{
seeAlso[i] = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
}
else
{
nTopics[i] = binReader.ReadInt32();
}
}
int nIndexChild = binReader.ReadInt32();
int nIndexOfThisEntry=-1;
IndexItem newItem = new IndexItem(_associatedFile, keyWord, isSeeAlsoKeyword, indent, nCharIndex, nIndexOfThisEntry, seeAlso, nTopics);
_indexList.Add(newItem);
}
}
//}
binReader.ReadBytes(freeSpace);
if( bListingEndReached )
_readListingBlocks = false;
return bRet;
}
/// <summary>
/// Gets the internal generated index list
/// </summary>
internal ArrayList IndexList
{
get { return _indexList; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
}
}
disposed = true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,286 +0,0 @@
using System;
using System.Collections;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMIdxhdr</c> implements t properties which have been read from the #IDXHDR file.
/// </summary>
internal sealed class CHMIdxhdr : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the number of topic nodes including the contents and index files
/// </summary>
private int _numberOfTopicNodes = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the ImageList param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _imageListOffset = 0;
/// <summary>
/// True if the value of the ImageType param of the "text/site properties" object of the sitemap contents is "Folder".
/// </summary>
private bool _imageTypeFolder = false;
/// <summary>
/// Internal member storing the background value
/// </summary>
private int _background = 0;
/// <summary>
/// Internal member storing the foreground value
/// </summary>
private int _foreground = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the Font param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _fontOffset = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the FrameName param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _frameNameOffset = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the WindowName param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _windowNameOffset = 0;
/// <summary>
/// Internal member storing the number of merged files
/// </summary>
private int _numberOfMergedFiles = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the merged file names
/// </summary>
private ArrayList _mergedFileOffsets = new ArrayList();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #IDXHDR file</param>
/// <param name="associatedFile">associated CHMFile instance</param>
public CHMIdxhdr(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nTemp = 0;
// 4 character T#SM
binReader.ReadBytes(4);
// unknown timestamp DWORD
nTemp = binReader.ReadInt32();
// unknown 1
nTemp = binReader.ReadInt32();
// number of topic nodes including the contents & index files
_numberOfTopicNodes = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// offset in the strings file
_imageListOffset = binReader.ReadInt32();
if( _imageListOffset == 0)
_imageListOffset = -1; // 0/-1 = none
// unknown DWORD
nTemp = binReader.ReadInt32();
// 1 if the value of the ImageType param of the "text/site properties" object of the sitemap contents is "Folder".
nTemp = binReader.ReadInt32();
_imageTypeFolder = (nTemp == 1);
// offset in the strings file
_background = binReader.ReadInt32();
// offset in the strings file
_foreground = binReader.ReadInt32();
// offset in the strings file
_fontOffset = binReader.ReadInt32();
// window styles DWORD
nTemp = binReader.ReadInt32();
// window styles DWORD
nTemp = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// offset in the strings file
_frameNameOffset = binReader.ReadInt32();
if( _frameNameOffset == 0)
_frameNameOffset = -1; // 0/-1 = none
// offset in the strings file
_windowNameOffset = binReader.ReadInt32();
if( _windowNameOffset == 0)
_windowNameOffset = -1; // 0/-1 = none
// informations types DWORD
nTemp = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// number of merged files in the merged file list DWORD
_numberOfMergedFiles = binReader.ReadInt32();
nTemp = binReader.ReadInt32();
for(int i = 0; i < _numberOfMergedFiles; i++)
{
// DWORD offset value of merged file
nTemp = binReader.ReadInt32();
if(nTemp > 0)
_mergedFileOffsets.Add(nTemp);
}
return bRet;
}
/// <summary>
/// Gets the number of topic nodes including the contents and index files
/// </summary>
public int NumberOfTopicNodes
{
get { return _numberOfTopicNodes; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the ImageList
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int ImageListOffset
{
get { return _imageListOffset; }
}
/// <summary>
/// True if the value of the ImageType param of the
/// "text/site properties" object of the sitemap contents is "Folder".
/// </summary>
/// <remarks>If this is set to true, the help will display folders instead of books</remarks>
public bool ImageTypeFolder
{
get { return _imageTypeFolder; }
}
/// <summary>
/// Gets the background setting
/// </summary>
public int Background
{
get { return _background; }
}
/// <summary>
/// Gets the foreground setting
/// </summary>
public int Foreground
{
get { return _foreground; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the Font
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int WindowNameOffset
{
get { return _fontOffset; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the FrameName
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int FrameNameOffset
{
get { return _frameNameOffset; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the WindowName
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int FontOffset
{
get { return _windowNameOffset; }
}
/// <summary>
/// Gets an array list of offset numbers in the #STRINGS file of the
/// merged file names.
/// </summary>
public ArrayList MergedFileOffsets
{
get { return _mergedFileOffsets; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_mergedFileOffsets = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,256 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMStrings</c> implements a string collection read from the #STRINGS file
/// </summary>
internal sealed class CHMStrings : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int STRING_BLOCK_SIZE = 4096;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the string dictionary
/// </summary>
private Hashtable _stringDictionary = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #STRINGS file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMStrings(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMStrings()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _stringDictionary.Count );
if (_stringDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _stringDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int nCnt = reader.ReadInt32();
for(int i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_stringDictionary[nKey.ToString()] = sValue;
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
//binReader.ReadByte(); // file starts with a NULL character for 0-based offset indexing
int nStringOffset = 0;
int nSubsetOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nStringOffset = (int)memStream.Position;
byte [] stringBlock = binReader.ReadBytes(STRING_BLOCK_SIZE);
bRet &= DecodeBlock(stringBlock, ref nStringOffset, ref nSubsetOffset);
}
return bRet;
}
/// <summary>
/// Decodes a string block
/// </summary>
/// <param name="stringBlock">byte array which represents the string block</param>
/// <param name="nStringOffset">current string offset number</param>
/// <param name="nSubsetOffset">reference to a subset variable</param>
/// <returns>true if succeeded</returns>
/// <remarks>If a string crosses the end of a block then it will be cut off
/// without a NT and repeated in full, with a NT, at the start of the next block.
/// For eg "To customize the appearance of a contents file" might become
/// "To customize the (block ending)To customize the appearance of a contents file"
/// when there are 17 bytes left at the end of the block. </remarks>
private bool DecodeBlock( byte[] stringBlock, ref int nStringOffset, ref int nSubsetOffset)
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(stringBlock);
BinaryReader binReader = new BinaryReader(memStream);
while( (memStream.Position < memStream.Length) && (bRet) )
{
bool bFoundTerminator = false;
int nCurOffset = nStringOffset + (int)memStream.Position;
string sTemp = BinaryReaderHelp.ExtractString(ref binReader, ref bFoundTerminator, 0, true, _associatedFile.TextEncoding);
if(nSubsetOffset != 0)
{
_stringDictionary[nSubsetOffset.ToString()] = sTemp.ToString();
}
else
{
_stringDictionary[nCurOffset.ToString()] = sTemp.ToString();
}
if( bFoundTerminator )
{
nSubsetOffset = 0;
}
else
{
nSubsetOffset = nCurOffset;
}
}
return bRet;
}
/// <summary>
/// Indexer which returns the string at a given offset
/// </summary>
public string this[int offset]
{
get
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_stringDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Indexer which returns the string at a given offset
/// </summary>
public string this[string offset]
{
get
{
if(offset == "-1")
return String.Empty;
string sTemp = (string)_stringDictionary[ offset ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_stringDictionary = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,821 +0,0 @@
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Globalization;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMSystem</c> reads the #SYSTEM file of the chm and stores its settings
/// </summary>
internal sealed class CHMSystem : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the file version
/// </summary>
private int _fileVersion = 0;
/// <summary>
/// Internal member storing the contents file path
/// </summary>
private string _contentsFile = "";
/// <summary>
/// Internal member storing the index file path
/// </summary>
private string _indexFile = "";
/// <summary>
/// Internal member storing the default help topic
/// </summary>
private string _defaultTopic = "";
/// <summary>
/// Internal member storing the help-window title
/// </summary>
private string _title = "";
/// <summary>
/// Internal flag if dbcs is on
/// </summary>
private bool _dbcs = false;
/// <summary>
/// Internal flag if fulltext search is enabled
/// </summary>
private bool _fullTextSearch = false;
/// <summary>
/// Internal flag if KLinks are in the file
/// </summary>
private bool _hasKLinks = false;
/// <summary>
/// Internal flag if ALinks are in the file
/// </summary>
private bool _hasALinks = false;
/// <summary>
/// Internal member storing the name of the default window
/// </summary>
private string _defaultWindow = "";
/// <summary>
/// Internal member storing the filename of the compiled file
/// </summary>
private string _compileFile = "";
/// <summary>
/// Internal flag storing the offset value of the binary index
/// </summary>
private uint _binaryIndexURLTableID = 0;
/// <summary>
/// Inernal member storing the compiler version this file was compiled
/// </summary>
private string _compilerVersion = "";
/// <summary>
/// Internal flag storing the offset value of the binary TOC
/// </summary>
private uint _binaryTOCURLTableID = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal member storing the default fontface, size, charset
/// </summary>
private string _defaultFont = "";
/// <summary>
/// Internal member storing the culture info of the file
/// </summary>
private CultureInfo _culture;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #SYSTEM file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMSystem(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
if(_culture == null)
{
// Set the text encoder of the chm file to the read charset/codepage
_associatedFile.TextEncoding = Encoding.GetEncoding( this.CodePage );
}
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
// First entry = DWORD for version number
_fileVersion = (int) binReader.ReadInt32();
while( (memStream.Position < memStream.Length) && (bRet) )
{
bRet &= DecodeEntry(ref binReader);
}
return bRet;
}
/// <summary>
/// Decodes an #system file entry
/// </summary>
/// <param name="binReader">binary reader reference</param>
/// <returns>true if succeeded</returns>
private bool DecodeEntry(ref BinaryReader binReader)
{
bool bRet = true;
int code = (int) binReader.ReadInt16(); // entry code, WORD
int length = (int) binReader.ReadInt16(); // length of entry
switch(code)
{
case 0:
{
_contentsFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 1:
{
_indexFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 2:
{
_defaultTopic = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 3:
{
_title = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 4:
{
int nTemp = 0;
nTemp = binReader.ReadInt32(); // read DWORD LCID
_culture = new CultureInfo(nTemp);
if(_culture != null)
_associatedFile.TextEncoding = Encoding.GetEncoding(_culture.TextInfo.ANSICodePage);
nTemp = binReader.ReadInt32(); // read DWORD DBCS
_dbcs = (nTemp == 1);
nTemp = binReader.ReadInt32(); // read DWORD Fulltext search
_fullTextSearch = (nTemp == 1);
nTemp = binReader.ReadInt32(); // read DWORD has klinks
_hasKLinks = (nTemp != 0);
nTemp = binReader.ReadInt32(); // read DWORD has alinks
_hasALinks = (nTemp != 0);
// read the rest of code 4 (not important for us)
byte[] temp = new byte[length-(5*4)];
temp = binReader.ReadBytes(length-(5*4));
};break;
case 5:
{
_defaultWindow = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 6:
{
_compileFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 7:
{
if(_fileVersion > 2)
{
_binaryIndexURLTableID = (uint) binReader.ReadInt32();
}
else
{
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
}
};break;
case 8:
{
// abbreviation (not interresting for us)
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 9:
{
_compilerVersion = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 10:
{
// timestamp of the file (not interresting for us)
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 11:
{
if(_fileVersion > 2)
{
_binaryTOCURLTableID = (uint) binReader.ReadInt32();
}
else
{
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
}
};break;
case 12:
{
// number of information bytes
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 13:
{
// copy of file #idxhdr
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 14:
{
// custom tabs for HH viewer
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 15:
{
// a checksum
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 16:
{
// Default Font=string,number,number
// The string is the name of the font, the first number is the
// point size & the last number is the character set used by the font.
// For acceptable values see *_CHARSET defines in wingdi.h from the
// Windows SDK or the same file in MinGW or Wine.
// Most of the time you will only want to use 0, which is the value for ANSI,
// which is the subset of ASCII used by Windows.
_defaultFont = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
default:
{
byte[] temp = new byte[length];
temp = binReader.ReadBytes(length);
//bRet = false;
int i=temp.Length;
};break;
}
return bRet;
}
/// <summary>
/// Reads all HHC files and checks which one has the global object tag.
/// This hhc file will be returned as master hhc
/// </summary>
/// <param name="hhcTopics">list of topics containing the extension hhc</param>
/// <param name="TopicItemArrayList">true if the arraylist contains topic items</param>
/// <returns>the filename of the found master toc</returns>
private string GetMasterHHC(ArrayList hhcTopics, bool TopicItemArrayList)
{
string sRet = "";
if( (hhcTopics!=null) && (hhcTopics.Count > 0) )
{
if( TopicItemArrayList )
{
if(hhcTopics.Count == 1)
{
sRet = ((TopicEntry)hhcTopics[0]).Locale;
}
else
{
foreach(TopicEntry curEntry in hhcTopics)
{
CHMStream.CHMStream iw=null;
MemoryStream fileObject=null;
if( _associatedFile.CurrentStorageWrapper == null)
{
iw=new CHMStream.CHMStream();
iw.OpenCHM(_associatedFile.ChmFilePath);
}
else
{
iw = _associatedFile.CurrentStorageWrapper;
}
fileObject = iw.OpenStream(curEntry.Locale);
if( fileObject != null)
{
string fileString =_associatedFile.TextEncoding.GetString(fileObject.ToArray(),0,(int)fileObject.Length);
fileObject.Close();
if( HHCParser.HasGlobalObjectTag(fileString, _associatedFile) )
{
sRet = curEntry.Locale;
break;
}
}
}
}
}
else
{
if(hhcTopics.Count == 1)
{
sRet = ((string)hhcTopics[0]);
}
else
{
foreach(string curEntry in hhcTopics)
{
CHMStream.CHMStream iw=null;
MemoryStream fileObject=null;
if( _associatedFile.CurrentStorageWrapper == null)
{
iw=new CHMStream.CHMStream();
iw.OpenCHM(_associatedFile.ChmFilePath);
}
else
{
iw = _associatedFile.CurrentStorageWrapper;
}
fileObject = iw.OpenStream(curEntry);
if( fileObject != null)
{
string fileString =_associatedFile.TextEncoding.GetString(fileObject.ToArray(),0,(int)fileObject.Length);
fileObject.Close();
if( HHCParser.HasGlobalObjectTag(fileString, _associatedFile) )
{
sRet = curEntry;
break;
}
}
}
}
}
}
return sRet;
}
/// <summary>
/// Gets the file version of the chm file.
/// 2 for Compatibility=1.0, 3 for Compatibility=1.1
/// </summary>
public int FileVersion
{
get { return _fileVersion; }
}
/// <summary>
/// Gets the contents file name
/// </summary>
public string ContentsFile
{
get
{
if( BinaryTOC ) // if the file contains a binary TOC
{
// make sure the CHMFile instance exists and has loaded the file #URLTBL
if( (_associatedFile != null) && (_associatedFile.UrltblFile != null ) )
{
// Get an url-table entry by its unique id
UrlTableEntry entry = _associatedFile.UrltblFile.GetByUniqueID( this.BinaryTOCURLTableID );
if(entry != null)
{
// entry found, return the url ( = filename )
return entry.URL;
}
}
}
else
{
if(_contentsFile.Length <= 0)
{
string sCheck = "Table of Contents.hhc"; // default HHP contents filename
if( (_associatedFile != null) && (_associatedFile.TopicsFile != null ) )
{
TopicEntry te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = "toc.hhc"; // default HHP contents filename
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = CompileFile + ".hhc";
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
ArrayList arrExt = _associatedFile.TopicsFile.GetByExtension("hhc");
if( arrExt == null )
{
arrExt = _associatedFile.EnumFilesByExtension("hhc");
if( arrExt == null )
{
Debug.WriteLine("CHMSystem.ContentsFile - Failed, contents file not found !");
}
else
{
if(arrExt.Count > 1)
{
sCheck = GetMasterHHC(arrExt, false);
_contentsFile = sCheck;
}
else
{
_contentsFile = ((string)arrExt[0]);
sCheck = _contentsFile;
}
}
}
else
{
if(arrExt.Count > 1)
{
sCheck = GetMasterHHC(arrExt, true);
_contentsFile = sCheck;
}
else
{
_contentsFile = ((TopicEntry)arrExt[0]).Locale;
sCheck = _contentsFile;
}
}
}
else
{
_contentsFile = sCheck;
}
}
else
{
_contentsFile = sCheck;
}
}
else
{
_contentsFile = sCheck;
}
}
return sCheck;
}
}
return _contentsFile;
}
}
/// <summary>
/// Gets the index file name
/// </summary>
public string IndexFile
{
get
{
if( BinaryIndex ) // if the file contains a binary index
{
// make sure the CHMFile instance exists and has loaded the file #URLTBL
if( (_associatedFile != null) && (_associatedFile.UrltblFile != null ) )
{
// Get an url-table entry by its unique id
UrlTableEntry entry = _associatedFile.UrltblFile.GetByUniqueID( this.BinaryIndexURLTableID );
if(entry != null)
{
// entry found, return the url ( = filename )
return entry.URL;
}
}
}
else
{
if(_indexFile.Length <= 0)
{
string sCheck = "Index.hhk"; // default HHP index filename
if( (_associatedFile != null) && (_associatedFile.TopicsFile != null ) )
{
TopicEntry te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = CompileFile + ".hhk";
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
ArrayList arrExt = _associatedFile.TopicsFile.GetByExtension("hhk");
if( arrExt == null )
{
Debug.WriteLine("CHMSystem.IndexFile - Failed, index file not found !");
}
else
{
_indexFile = ((TopicEntry)arrExt[0]).Locale;
sCheck = _indexFile;
}
}
else
{
_indexFile = sCheck;
}
}
else
{
_indexFile = sCheck;
}
}
return sCheck;
}
}
return _indexFile;
}
}
/// <summary>
/// Sets the default topic of this file
/// </summary>
/// <param name="local">new local value of the topic</param>
internal void SetDefaultTopic(string local)
{
_defaultTopic = local;
}
/// <summary>
/// Gets the default help topic
/// </summary>
public string DefaultTopic
{
get { return _defaultTopic; }
}
/// <summary>
/// Gets the title of the help window
/// </summary>
public string Title
{
get { return _title; }
}
/// <summary>
/// Gets the flag if DBCS is in use
/// </summary>
public bool DBCS
{
get { return _dbcs; }
}
/// <summary>
/// Gets the flag if full-text-search is available
/// </summary>
public bool FullTextSearch
{
get { return _fullTextSearch; }
}
/// <summary>
/// Gets the flag if the file has ALinks
/// </summary>
public bool HasALinks
{
get { return _hasALinks; }
}
/// <summary>
/// Gets the flag if the file has KLinks
/// </summary>
public bool HasKLinks
{
get { return _hasKLinks; }
}
/// <summary>
/// Gets the default window name
/// </summary>
public string DefaultWindow
{
get { return _defaultWindow; }
}
/// <summary>
/// Gets the file name of the compile file
/// </summary>
public string CompileFile
{
get { return _compileFile; }
}
/// <summary>
/// Gets the id of the binary index in the url table
/// </summary>
public uint BinaryIndexURLTableID
{
get { return _binaryIndexURLTableID; }
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public bool BinaryIndex
{
get { return (_binaryIndexURLTableID>0); }
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public string CompilerVersion
{
get { return _compilerVersion; }
}
/// <summary>
/// Gets the id of the binary toc in the url table
/// </summary>
public uint BinaryTOCURLTableID
{
get { return _binaryTOCURLTableID; }
}
/// <summary>
/// Gets the flag if the chm has a binary toc file
/// </summary>
public bool BinaryTOC
{
get { return (_binaryTOCURLTableID>0); }
}
/// <summary>
/// Gets the font face of the read font property.
/// Empty string for default font.
/// </summary>
public string FontFace
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 0)
return fontSplit[0].Trim();
}
return "";
}
}
/// <summary>
/// Gets the font size of the read font property.
/// 0 for default font size
/// </summary>
public double FontSize
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 1)
return double.Parse(fontSplit[1].Trim());
}
return 0.0;
}
}
/// <summary>
/// Gets the character set of the read font property
/// 1 for default
/// </summary>
public int CharacterSet
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 2)
return Int32.Parse(fontSplit[2].Trim());
}
return 0;
}
}
/// <summary>
/// Gets the codepage depending on the read font property
/// </summary>
public int CodePage
{
get
{
// if we've read a LCID from the system file
// ignore the font-property settings and return
// the codepage generated from the culture info
if(_culture != null)
{
return _culture.TextInfo.ANSICodePage;
}
int nRet = 1252; // default codepage windows-1252
int nCSet = CharacterSet;
switch(nCSet)
{
case 0x00: nRet = 1252;break; // ANSI_CHARSET
case 0xCC: nRet = 1251;break; // RUSSIAN_CHARSET
case 0xEE: nRet = 1250;break; // EE_CHARSET
case 0xA1: nRet = 1253;break; // GREEK_CHARSET
case 0xA2: nRet = 1254;break; // TURKISH_CHARSET
case 0xBA: nRet = 1257;break; // BALTIC_CHARSET
case 0xB1: nRet = 1255;break; // HEBREW_CHARSET
case 0xB2: nRet = 1256;break; // ARABIC_CHARSET
case 0x80: nRet = 932;break; // SHIFTJIS_CHARSET
case 0x81: nRet = 949;break; // HANGEUL_CHARSET
case 0x86: nRet = 936;break; // GB2313_CHARSET
case 0x88: nRet = 950;break; // CHINESEBIG5_CHARSET
}
return nRet;
}
}
/// <summary>
/// Gets the assiciated culture info
/// </summary>
public CultureInfo Culture
{
get { return _culture; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,288 +0,0 @@
using System;
using System.IO;
using System.Collections;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMTocidx</c> implements functions to decode the #TOCIDX internal file.
/// </summary>
internal sealed class CHMTocidx : IDisposable
{
/// <summary>
/// Constant specifying the size of the data blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal memebr storing the offset to the 20/28 byte structs
/// </summary>
private int _offset2028 = 0;
/// <summary>
/// Internal member storing the offset to the 16 byte structs
/// </summary>
private int _offset16structs = 0;
/// <summary>
/// Internal member storing the number of 16 byte structs
/// </summary>
private int _numberOf16structs = 0;
/// <summary>
/// Internal member storing the offset to the topic list
/// </summary>
private int _offsetOftopics = 0;
/// <summary>
/// Internal member storing the toc
/// </summary>
private ArrayList _toc = new ArrayList();
/// <summary>
/// Internal member for offset seeking
/// </summary>
private Hashtable _offsetTable = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #TOCIDX file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMTocidx(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
_toc = new ArrayList();
_offsetTable = new Hashtable();
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
_offset2028 = binReader.ReadInt32();
_offset16structs = binReader.ReadInt32();
_numberOf16structs = binReader.ReadInt32();
_offsetOftopics = binReader.ReadInt32();
binReader.BaseStream.Seek( _offset2028, SeekOrigin.Begin );
if( RecursivelyBuildTree(ref binReader, _offset2028, _toc, null) )
{
binReader.BaseStream.Seek( _offset16structs, SeekOrigin.Begin );
nCurOffset = (int)binReader.BaseStream.Position;
for(int i=0; i < _numberOf16structs; i++)
{
int tocOffset = binReader.ReadInt32();
int sqNr = binReader.ReadInt32();
int topOffset = binReader.ReadInt32();
int hhctopicIdx = binReader.ReadInt32();
nCurOffset = (int)binReader.BaseStream.Position;
int topicIdx = -1;
// if the topic offset is within the range of the stream
// and is >= the offset of the first topic dword
if((topOffset < (binReader.BaseStream.Length - 4)) && (topOffset >= _offsetOftopics))
{
// read the index of the topic for this item
binReader.BaseStream.Seek( topOffset, SeekOrigin.Begin);
topicIdx = binReader.ReadInt32();
binReader.BaseStream.Seek( nCurOffset, SeekOrigin.Begin);
TOCItem item = (TOCItem)_offsetTable[tocOffset.ToString()];
if( item != null)
{
if(( topicIdx < _associatedFile.TopicsFile.TopicTable.Count)&&(topicIdx>=0))
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile.TopicTable[topicIdx]);
if( (te != null) && (item.TopicOffset < 0) )
{
item.TopicOffset = te.EntryOffset;
}
}
}
}
}
}
return bRet;
}
/// <summary>
/// Recursively reads the binary toc tree from the file
/// </summary>
/// <param name="binReader">reference to binary reader</param>
/// <param name="NodeOffset">offset of the first node in the current level</param>
/// <param name="level">arraylist of TOCItems for the current level</param>
/// <param name="parentItem">parent item for the item</param>
/// <returns>Returns true if succeeded</returns>
private bool RecursivelyBuildTree(ref BinaryReader binReader, int NodeOffset, ArrayList level, TOCItem parentItem)
{
bool bRet = true;
int nextOffset=0;
int nReadOffset = (int)binReader.BaseStream.Position;
binReader.BaseStream.Seek(NodeOffset, SeekOrigin.Begin);
do
{
int nCurOffset = (int)binReader.BaseStream.Position;
int unkn1 = binReader.ReadInt16(); // unknown
int unkn2 = binReader.ReadInt16(); // unknown
int flag = binReader.ReadInt32();
int nFolderAdd = 0;
if((_associatedFile != null) && (_associatedFile.ImageTypeFolder))
{
// get the value which should be added, to display folders instead of books
if(HtmlHelpSystem.UseHH2TreePics)
nFolderAdd = 8;
else
nFolderAdd = 4;
}
int nFolderImgIdx = (HtmlHelpSystem.UseHH2TreePics ? (TOCItem.STD_FOLDER_HH2+nFolderAdd) : (TOCItem.STD_FOLDER_HH1+nFolderAdd));
int nFileImgIdx = (HtmlHelpSystem.UseHH2TreePics ? TOCItem.STD_FILE_HH2 : TOCItem.STD_FILE_HH1);
int stdImage = ((flag & 0x4)!=0) ? nFolderImgIdx : nFileImgIdx;
int stringOffset = binReader.ReadInt32();
int ParentOffset = binReader.ReadInt32();
nextOffset = binReader.ReadInt32();
int firstChildOffset = 0;
int unkn3=0;
if( (flag&0x4)!=0 )
{
firstChildOffset = binReader.ReadInt32();
unkn3 = binReader.ReadInt32(); // unknown
}
TOCItem newItem = new TOCItem();
newItem.ImageIndex = stdImage;
newItem.Offset = nCurOffset;
newItem.OffsetNext = nextOffset;
newItem.AssociatedFile = _associatedFile;
newItem.TocMode = DataMode.Binary;
newItem.Parent = parentItem;
if( (flag&0x08) == 0)
{
// toc item doesn't have a local value (=> stringOffset = offset of strings file)
newItem.Name = _associatedFile.StringsFile[stringOffset];
}
else
{
// this item has a topic entry (=> stringOffset = index of topic entry)
if((stringOffset < _associatedFile.TopicsFile.TopicTable.Count) && (stringOffset >= 0))
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile.TopicTable[stringOffset]);
if(te != null)
{
newItem.TopicOffset = te.EntryOffset;
}
}
}
_offsetTable[nCurOffset.ToString()] = newItem;
// if this item has children (firstChildOffset > 0)
if( firstChildOffset > 0)
{
bRet &= RecursivelyBuildTree(ref binReader, firstChildOffset, newItem.Children, newItem);
}
level.Add( newItem );
if(nCurOffset != nextOffset)
binReader.BaseStream.Seek(nextOffset, SeekOrigin.Begin);
}while(nextOffset != 0);
binReader.BaseStream.Seek(nReadOffset, SeekOrigin.Begin);
return bRet;
}
/// <summary>
/// Gets the internal read toc
/// </summary>
internal ArrayList TOC
{
get { return _toc; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_toc = null;
_offsetTable = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,235 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMTopics</c> implements functionality to decode the #TOPICS internal file
/// </summary>
internal sealed class CHMTopics : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal member storing the topic list
/// </summary>
private ArrayList _topicTable = new ArrayList();
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #TOPICS file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMTopics(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMTopics()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _topicTable.Count );
foreach(TopicEntry curItem in _topicTable)
{
curItem.Dump(ref writer);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
TopicEntry newItem = new TopicEntry();
newItem.SetCHMFile(_associatedFile);
newItem.ReadDump(ref reader);
_topicTable.Add(newItem);
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
foreach(TopicEntry curEntry in _topicTable)
{
curEntry.SetCHMFile(associatedFile);
}
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
int entryOffset = nCurOffset;
int tocIdx = binReader.ReadInt32();
int titleOffset = binReader.ReadInt32();
int urltablOffset = binReader.ReadInt32();
int visibilityMode = binReader.ReadInt16();
int unknownMode = binReader.ReadInt16();
TopicEntry newEntry = new TopicEntry(entryOffset, tocIdx, titleOffset, urltablOffset, visibilityMode, unknownMode, _associatedFile);
_topicTable.Add( newEntry );
nCurOffset = (int)memStream.Position;
}
return bRet;
}
/// <summary>
/// Gets the arraylist containing all topic entries.
/// </summary>
public ArrayList TopicTable
{
get
{
return _topicTable;
}
}
/// <summary>
/// Gets the topic entry of a given offset
/// </summary>
public TopicEntry this[int offset]
{
get
{
foreach(TopicEntry curEntry in _topicTable)
if(curEntry.EntryOffset == offset)
return curEntry;
return null;
}
}
/// <summary>
/// Searches a topic by the locale name
/// </summary>
/// <param name="locale">locale name to search</param>
/// <returns>The topicentry instance if found, otherwise null</returns>
public TopicEntry GetByLocale(string locale)
{
foreach(TopicEntry curEntry in TopicTable)
{
if(curEntry.Locale.ToLower() == locale.ToLower())
return curEntry;
}
return null;
}
/// <summary>
/// Searches the topics for all files with a given file extension
/// </summary>
/// <param name="fileExtension">extension to search</param>
/// <returns>An arraylist of TopicEntry instances or null if no topic was found</returns>
public ArrayList GetByExtension(string fileExtension)
{
ArrayList arrRet = new ArrayList();
foreach(TopicEntry curEntry in TopicTable)
{
if(curEntry.Locale.ToLower().EndsWith(fileExtension.ToLower()))
arrRet.Add(curEntry);
}
if(arrRet.Count > 0)
return arrRet;
return null;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_topicTable=null;
}
}
disposed = true;
}
}
}

View File

@@ -1,308 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMUrlstr</c> implements a string collection storing the URL strings of the help file
/// </summary>
internal sealed class CHMUrlstr : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the url dictionary
/// </summary>
private Hashtable _urlDictionary = new Hashtable();
/// <summary>
/// Internal member storing the framename dictionary
/// </summary>
private Hashtable _framenameDictionary = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #URLSTR file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMUrlstr(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMUrlstr()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlDictionary.Count );
if (_urlDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _urlDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
writer.Write( _framenameDictionary.Count );
if (_framenameDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _framenameDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_urlDictionary[nKey.ToString()] = sValue;
}
nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_framenameDictionary[nKey.ToString()] = sValue;
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset )
{
bool bRet = true;
int blockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
if(nOffset==0)
binReader.ReadByte(); // first block starts with an unknown byte
while( (memStream.Position < (memStream.Length-8)) && (bRet) )
{
int entryOffset = blockOffset + (int)memStream.Position;
int urlOffset = binReader.ReadInt32();
int frameOffset = binReader.ReadInt32();
// There is one way to tell where the end of the URL/FrameName
// pairs occurs: Repeat the following: read 2 DWORDs and if both
// are less than the current offset then this is the start of the Local
// strings else skip two NT strings.
// if(( (urlOffset < (entryOffset+8)) && (frameOffset < (entryOffset+8)) ))
// {
// //TODO: add correct string reading if an offset has been found
// /*
// int curOffset = (int)memStream.Position;
//
// memStream.Seek( (long)(blockOffset-urlOffset), SeekOrigin.Begin);
// string sTemp = CHMReader.ExtractString(ref binReader, 0, true);
//
// memStream.Seek( (long)(blockOffset-frameOffset), SeekOrigin.Begin);
// sTemp = CHMReader.ExtractString(ref binReader, 0, true);
//
// memStream.Seek((long)curOffset, SeekOrigin.Begin);
// */
//
//
// int curOffs = (int)memStream.Position;
// BinaryReaderHelp.ExtractString(ref binReader, 0, true, _associatedFile.TextEncoding);
// nOffset += (int)memStream.Position - curOffs;
//
// curOffs = (int)memStream.Position;
// BinaryReaderHelp.ExtractString(ref binReader, 0, true, _associatedFile.TextEncoding);
// nOffset += (int)memStream.Position - curOffs;
// }
// else
{
bool bFoundTerminator = false;
string sTemp = BinaryReaderHelp.ExtractString(ref binReader, ref bFoundTerminator, 0, true, _associatedFile.TextEncoding);
if(sTemp == "")
{
//nOffset = nOffset + 1 + (int)memStream.Length - (int)memStream.Position;
memStream.Seek(memStream.Length-1, SeekOrigin.Begin);
}
else
{
_urlDictionary[entryOffset.ToString()] = sTemp.ToString();
_framenameDictionary[ entryOffset.ToString() ] = sTemp.ToString() ;
}
}
}
return bRet;
}
/// <summary>
/// Gets the url at a given offset
/// </summary>
/// <param name="offset">offset of url</param>
/// <returns>the url at the given offset</returns>
public string GetURLatOffset(int offset)
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_urlDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
/// <summary>
/// Gets the framename at a given offset
/// </summary>
/// <param name="offset">offset of the framename</param>
/// <returns>the frame name at the given offset</returns>
public string GetFrameNameatOffset(int offset)
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_framenameDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_urlDictionary = null;
_framenameDictionary = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,245 +0,0 @@
using System;
using System.IO;
using System.Collections;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMUrltable</c> implements methods to decode the #URLTBL internal file.
/// </summary>
internal sealed class CHMUrltable : IDisposable
{
/// <summary>
/// Constant specifying the size of the data blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Constant specifying the number of records per block
/// </summary>
private const int RECORDS_PER_BLOCK = 341;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the url table
/// </summary>
private ArrayList _urlTable = new ArrayList();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #URLTBL file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMUrltable(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMUrltable()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlTable.Count );
foreach(UrlTableEntry curItem in _urlTable)
{
curItem.Dump(ref writer);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
UrlTableEntry newItem = new UrlTableEntry();
newItem.SetCHMFile(_associatedFile);
newItem.ReadDump(ref reader);
_urlTable.Add(newItem);
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
foreach(UrlTableEntry curEntry in _urlTable)
{
curEntry.SetCHMFile(associatedFile);
}
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset )
{
bool bRet = true;
int blockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
for(int i=0; i < RECORDS_PER_BLOCK; i++)
{
int recordOffset = blockOffset + (int)memStream.Position;
uint nuniqueID = (uint) binReader.ReadInt32(); // unknown dword
int ntopicsIdx = binReader.ReadInt32();
int urlstrOffset = binReader.ReadInt32();
UrlTableEntry newEntry = new UrlTableEntry(nuniqueID, recordOffset, ntopicsIdx, urlstrOffset, _associatedFile);
_urlTable.Add(newEntry);
if( memStream.Position >= memStream.Length)
break;
}
if(dataBlock.Length == BLOCK_SIZE)
binReader.ReadInt32();
return bRet;
}
/// <summary>
/// Gets the arraylist containing all urltable entries.
/// </summary>
public ArrayList UrlTable
{
get
{
return _urlTable;
}
}
/// <summary>
/// Gets the urltable entry of a given offset
/// </summary>
public UrlTableEntry this[int offset]
{
get
{
foreach(UrlTableEntry curEntry in _urlTable)
if(curEntry.EntryOffset == offset)
return curEntry;
return null;
}
}
/// <summary>
/// Gets the urltable entry of a given uniqueID
/// </summary>
public UrlTableEntry GetByUniqueID(uint uniqueID)
{
foreach(UrlTableEntry curEntry in UrlTable)
{
if(curEntry.UniqueID == uniqueID)
return curEntry;
}
return null;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_urlTable = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,395 +0,0 @@
using System;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Collections.Specialized;
using ICSharpCode.SharpZipLib;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
using HtmlHelp;
// using HtmlHelp.Storage;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// Enumeration for specifying the dumping compression
/// </summary>
public enum DumpCompression
{
/// <summary>
/// None - no data compression will be used.
/// Fastest but most memory intensive
/// </summary>
None = 0,
/// <summary>
/// Minimum - a minimum data compression will be used.
/// Fast but not much data reduction
/// </summary>
Minimum = 1,
/// <summary>
/// Medium - a medium data compression will be used.
/// Slower but medium data reduction
/// </summary>
Medium = 2,
/// <summary>
/// Maximum - a maximum data compression will be used.
/// Slowest but maximum data reduction
/// </summary>
Maximum = 3
}
/// <summary>
/// Flags which specify which data should be dumped
/// </summary>
[FlagsAttribute()]
public enum DumpingFlags
{
/// <summary>
/// DumpTextTOC - if this flag is set, text-based TOCs (sitemap format) will be dumped
/// </summary>
DumpTextTOC = 1,
/// <summary>
/// DumpBinaryTOC - if this flag is set, binary TOCs will be dumped
/// </summary>
DumpBinaryTOC = 2,
/// <summary>
/// DumpTextIndex - if this flag is set, the text-based index (sitemap format) will be dumped
/// </summary>
DumpTextIndex = 4,
/// <summary>
/// DumpBinaryIndex - if this flag is set, the binary index will be dumped
/// </summary>
DumpBinaryIndex = 8,
/// <summary>
/// DumpStrings - if this flag is set, the internal #STRINGS file will be dumped
/// </summary>
DumpStrings = 16,
/// <summary>
/// DumpUrlStr - if this flag is set, the internal #URLSTR file will be dumped
/// </summary>
DumpUrlStr = 32,
/// <summary>
/// DumpUrlTbl - if this flag is set, the internal #URLTBL file will be dumped
/// </summary>
DumpUrlTbl = 64,
/// <summary>
/// DumpTopics - if this flag is set, the internal #TOPICS file will be dumped
/// </summary>
DumpTopics = 128,
/// <summary>
/// DumpFullText - if this flag is set, the internal $FIftiMain file will be dumped
/// </summary>
DumpFullText = 256
}
/// <summary>
/// The class <c>DumpingInfo</c> implements information properties for the CHMFile class
/// if and how data dumping should be used.
/// </summary>
public sealed class DumpingInfo
{
public bool m_bAllowSaveDump=true;
private readonly static BitVector32.Section DumpFlags = BitVector32.CreateSection(512);
private const string _dumpHeader = "HtmlHelpSystem dump file 1.0";
private string _outputDir = ""; // emtpy string means, same directory as chm file
private DumpCompression _compressionLevel = DumpCompression.Maximum;
private CHMFile _chmFile = null;
private DeflaterOutputStream _outputStream = null;
private InflaterInputStream _inputStream = null;
private BinaryWriter _writer = null;
private BinaryReader _reader = null;
private BitVector32 _flags;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="flags">Combine flag values to specify which data should be dumped.</param>
/// <param name="outputDir">output directory. emtpy string means,
/// same directory as chm file (only if destination = ExternalFile)</param>
/// <param name="compressionLevel">compression which should be used</param>
public DumpingInfo(DumpingFlags flags, string outputDir, DumpCompression compressionLevel)
{
_flags = new BitVector32(0);
int i = _flags[DumpFlags];
_flags[DumpFlags] = i | (int)flags;
_outputDir = outputDir;
_compressionLevel = compressionLevel;
}
/// <summary>
/// Gets the flag if text-based TOCs will be written to the dumping file
/// </summary>
public bool DumpTextTOC
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTextTOC) != 0); }
}
/// <summary>
/// Gets the flag if binary TOCs will be written to the dumping file
/// </summary>
public bool DumpBinaryTOC
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpBinaryTOC) != 0); }
}
/// <summary>
/// Gets the flag if the text-based index will be written to the dumping file
/// </summary>
public bool DumpTextIndex
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTextIndex) != 0); }
}
/// <summary>
/// Gets the flag if the binary index will be written to the dumping file
/// </summary>
public bool DumpBinaryIndex
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpBinaryIndex) != 0); }
}
/// <summary>
/// Gets the flag if the #STRINGS file will be written to the dumping file
/// </summary>
public bool DumpStrings
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpStrings) != 0); }
}
/// <summary>
/// Gets the flag if the #URLSTR file will be written to the dumping file
/// </summary>
public bool DumpUrlStr
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpUrlStr) != 0); }
}
/// <summary>
/// Gets the flag if the #URLTBL file will be written to the dumping file
/// </summary>
public bool DumpUrlTbl
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpUrlTbl) != 0); }
}
/// <summary>
/// Gets the flag if the #TOPICS file will be written to the dumping file
/// </summary>
public bool DumpTopics
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTopics) != 0); }
}
/// <summary>
/// Gets the flag if the $FIftiMain file will be written to the dumping file
/// </summary>
public bool DumpFullText
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpFullText) != 0); }
}
/// <summary>
/// Gets the dump output directory.
/// </summary>
/// <value>emtpy string means, same directory as chm file</value>
/// <remarks>If Destination is set to DumpingOutput.InternalFile this property will be ignored</remarks>
public string OutputDir
{
get { return _outputDir; }
}
/// <summary>
/// The compression level used.
/// </summary>
public DumpCompression CompressionLevel
{
get { return _compressionLevel; }
}
/// <summary>
/// Gets/Sets the CHMFile instance associated with this object
/// </summary>
internal CHMFile ChmFile
{
get { return _chmFile; }
set { _chmFile = value; }
}
/// <summary>
/// Translates the compression level to the deflater constants
/// </summary>
private int CompLvl
{
get
{
switch(CompressionLevel)
{
case DumpCompression.None: return Deflater.NO_COMPRESSION;
case DumpCompression.Minimum: return Deflater.BEST_SPEED;
case DumpCompression.Medium: return Deflater.DEFAULT_COMPRESSION;
case DumpCompression.Maximum: return Deflater.BEST_COMPRESSION;
}
return Deflater.BEST_COMPRESSION;
}
}
/// <summary>
/// Checks if a dump exists
/// </summary>
internal bool DumpExists
{
get
{
if(_flags[DumpFlags] == 0)
return false;
// we have a reader or writer to the dump so it must exist
if( (_reader != null) || (_writer != null) )
return true;
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
return File.Exists(sDmpFile);
}
}
/// <summary>
/// Gets a binary writer instance which allows you to write to the dump
/// </summary>
internal BinaryWriter Writer
{
get
{
if (m_bAllowSaveDump==false)
return null;
if(_flags[DumpFlags] == 0)
throw new InvalidOperationException("Nothing to dump. No flags have been set !");
if(_reader != null)
throw new InvalidOperationException("Can't write and read at the same time !");
if(_chmFile == null)
throw new InvalidOperationException("Only usable with an associated CHMFile instance !");
if(_writer==null)
{
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
StreamWriter stream = new StreamWriter(sDmpFile, false, _chmFile.TextEncoding);
// write header info uncompressed
BinaryWriter _hwriter = new BinaryWriter(stream.BaseStream);
_hwriter.Write(_dumpHeader);
_hwriter.Write((int)CompressionLevel);
if(_compressionLevel == DumpCompression.None)
{
_writer = new BinaryWriter(stream.BaseStream);
}
else
{
_outputStream = new DeflaterOutputStream(stream.BaseStream, new Deflater(CompLvl));
_writer = new BinaryWriter(_outputStream);
}
}
return _writer;
}
}
/// <summary>
/// Gets a binary reader which allows you to read from the dump
/// </summary>
internal BinaryReader Reader
{
get
{
if(_writer != null)
throw new InvalidOperationException("Can't write and read at the same time !");
if(_chmFile == null)
throw new InvalidOperationException("Only usable with an associated CHMFile instance !");
if(_reader==null)
{
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
StreamReader stream = new StreamReader(sDmpFile, _chmFile.TextEncoding);
BinaryReader _hReader = new BinaryReader(stream.BaseStream);
string sH = _hReader.ReadString();
if(sH != _dumpHeader)
{
_hReader.Close();
Debug.WriteLine("Unexpected dump-file header !");
throw new FormatException("DumpingInfo.Reader - Unexpected dump-file header !");
}
_compressionLevel = (DumpCompression)_hReader.ReadInt32();
// if(_compressionLevel != (DumpCompression)_hReader.ReadInt32())
// {
// _hReader.Close();
// return null;
// }
if(_compressionLevel == DumpCompression.None)
{
_reader = new BinaryReader(stream.BaseStream);
}
else
{
_inputStream = new InflaterInputStream(stream.BaseStream, new Inflater());
_reader = new BinaryReader(_inputStream);
}
}
return _reader;
}
}
/// <summary>
/// Saves data and closes the dump
/// </summary>
/// <returns>true if succeed</returns>
internal bool SaveData()
{
if (m_bAllowSaveDump==false)
return true;
if(_writer != null)
{
if(_writer!=null)
_writer.Close();
_outputStream = null;
_writer = null;
}
if(_reader != null)
{
if(_reader!=null)
_reader.Close();
_inputStream = null;
_reader = null;
}
return true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,593 +0,0 @@
using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHCParser</c> implements a parser for HHC contents files.
/// </summary>
internal sealed class HHCParser
{
/// <summary>
/// regular expressions for replacing the sitemap boundary tags
/// </summary>
private static string RE_ULOpening = @"\<ul\>"; // will be replaced by a '(' for nested parsing
private static string RE_ULClosing = @"\</ul\>"; // will be replaced by a ')' for nested parsing
/// <summary>
/// Matching ul-tags
/// </summary>
private static string RE_ULBoundaries = @"\<ul\>(?<innerText>.*)\</ul\>";
/// <summary>
/// Matching the nested tree structure.
/// </summary>
private static string RE_NestedBoundaries = @"\( (?> [^()]+ | \( (?<DEPTH>) | \) (?<-DEPTH>) )* (?(DEPTH)(?!)) \)";
/// <summary>
/// Matching object-tags
/// </summary>
private static string RE_ObjectBoundaries = @"\<object(?<innerText>.*?)\</object\>";
/// <summary>
/// Matching param tags
/// </summary>
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
/// <summary>
/// Extracting tag attributes
/// </summary>
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
/// <summary>
/// private regular expressionobjects
/// </summary>
private static Regex ulRE;
private static Regex NestedRE;
private static Regex ObjectRE;
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Internal member storing the list of TOCItems which are holding merge links
/// </summary>
private static ArrayList _mergeItems = null;
/// <summary>
/// Internal member storing the last read regular topic item.
/// This is used to handle "Merge" entries and add them as child to this instance.
/// </summary>
private static TOCItem _lastTopicItem = null;
/// <summary>
/// Parses a HHC file and returns an ArrayList with the table of contents (TOC) tree
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the table of contents (TOC) tree</returns>
public static ArrayList ParseHHC(string hhcFile, CHMFile chmFile)
{
_lastTopicItem = null;
_mergeItems = null; // clear merged item list
ArrayList tocList = new ArrayList();
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
NestedRE = new Regex(RE_NestedBoundaries, RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhcFile, 0) )
{
Match m = ulRE.Match(hhcFile, 0);
int nFirstUL = 0;
nFirstUL = hhcFile.ToLower().IndexOf("<ul>");
if(nFirstUL == -1)
nFirstUL = hhcFile.ToLower().IndexOf("<il>");
if( ObjectRE.IsMatch(hhcFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhcFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
if( mO.Groups[iOTxt].Index <= nFirstUL)
ParseGlobalSettings( globalText, chmFile );
}
// parse toc tree
string innerText = m.Groups["innerText"].Value;
innerText = innerText.Replace("(", "&#040;");
innerText = innerText.Replace(")", "&#041;");
innerText = Regex.Replace(innerText, RE_ULOpening, "(", RegexOptions.IgnoreCase);
innerText = Regex.Replace(innerText, RE_ULClosing, ")", RegexOptions.IgnoreCase);
ParseTree( innerText, null, tocList, chmFile );
}
return tocList;
}
/// <summary>
/// Checks if the hhc file contains a global object tag.
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">chm file</param>
/// <returns>true if the hhc content contains a global object tag</returns>
public static bool HasGlobalObjectTag(string hhcFile, CHMFile chmFile)
{
bool bRet = false;
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhcFile, 0) )
{
Match m = ulRE.Match(hhcFile, 0);
int nFirstUL = 0;
nFirstUL = hhcFile.ToLower().IndexOf("<ul>");
if(nFirstUL == -1)
nFirstUL = hhcFile.ToLower().IndexOf("<il>");
if( ObjectRE.IsMatch(hhcFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhcFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
if( mO.Groups[iOTxt].Index <= nFirstUL)
bRet = true;
}
}
return bRet;
}
/// <summary>
/// Gets true if the previously done parsing found merge-links
/// </summary>
public static bool HasMergeLinks
{
get
{
if(_mergeItems==null)
return false;
return _mergeItems.Count > 0;
}
}
/// <summary>
/// Gets all TOCItem references which are holding merge-links
/// </summary>
public static ArrayList MergeItems
{
get { return _mergeItems; }
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseTree( string text, TOCItem parent, ArrayList arrNodes, CHMFile chmFile )
{
string strPreItems="", strPostItems="";
string innerText = "";
int nIndex = 0;
while( NestedRE.IsMatch(text, nIndex) )
{
Match m = NestedRE.Match(text, nIndex);
innerText = m.Value.Substring( 1, m.Length-2);
strPreItems = text.Substring(nIndex,m.Index-nIndex);
ParseItems(strPreItems, parent, arrNodes, chmFile);
if((arrNodes.Count>0) && (innerText.Length > 0) )
{
TOCItem p = ((TOCItem)(arrNodes[arrNodes.Count-1]));
ParseTree( innerText, p, p.Children, chmFile );
}
nIndex = m.Index+m.Length;
}
if( nIndex == 0)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseItems(strPostItems, parent, arrNodes, chmFile);
}
else if( nIndex < text.Length-1)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseTree(strPostItems, parent, arrNodes, chmFile);
}
}
/// <summary>
/// Parses tree nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseItems( string itemstext, TOCItem parent, ArrayList arrNodes, CHMFile chmFile)
{
int innerTextIdx = ObjectRE.GroupNumberFromName("innerText");
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
int nObjStartIndex = 0;
while( ObjectRE.IsMatch(itemstext, nObjStartIndex) )
{
Match m = ObjectRE.Match(itemstext, nObjStartIndex);
string innerText = m.Groups[innerTextIdx].Value;
TOCItem tocItem = new TOCItem();
tocItem.TocMode = DataMode.TextBased;
tocItem.AssociatedFile = chmFile;
tocItem.Parent = parent;
// read parameters
int nParamIndex = 0;
while( ParamRE.IsMatch(innerText, nParamIndex) )
{
Match mP = ParamRE.Match(innerText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
tocItem.Params[paramName] = paramValue;
switch(paramName.ToLower())
{
case "name":
{
tocItem.Name = paramValue;
};break;
case "local":
{
tocItem.Local = paramValue.Replace("../", "").Replace("./", "");
};break;
case "imagenumber":
{
tocItem.ImageIndex = Int32.Parse(paramValue);
tocItem.ImageIndex-=1;
int nFolderAdd = 0;
if((chmFile != null) && (chmFile.ImageTypeFolder))
{
// get the value which should be added, to display folders instead of books
if(HtmlHelpSystem.UseHH2TreePics)
nFolderAdd = 8;
else
nFolderAdd = 4;
}
if(tocItem.ImageIndex%2 != 0)
{
if(tocItem.ImageIndex==1)
tocItem.ImageIndex=0;
}
if(HtmlHelpSystem.UseHH2TreePics)
if( tocItem.ImageIndex == 0)
tocItem.ImageIndex = TOCItem.STD_FOLDER_HH2+nFolderAdd;
};break;
case "merge": // this item contains topics or a full TOC from a merged CHM
{
tocItem.MergeLink = paramValue;
// "register" this item as merge-link
if(_mergeItems==null)
_mergeItems=new ArrayList();
_mergeItems.Add(tocItem);
};break;
case "type": // information type assignment for item
{
tocItem.InfoTypeStrings.Add( paramValue );
};break;
}
nParamIndex = mP.Index+mP.Length;
}
tocItem.ChmFile = chmFile.ChmFilePath;
if(tocItem.MergeLink.Length > 0)
{
if(_lastTopicItem != null)
{
tocItem.Parent = _lastTopicItem;
_lastTopicItem.Children.Add(tocItem);
}
else
arrNodes.Add( tocItem );
}
else
{
_lastTopicItem = tocItem;
arrNodes.Add( tocItem );
}
nObjStartIndex = m.Index+m.Length;
}
}
/// <summary>
/// Parses the very first &lt;OBJECT&gt; tag in the sitemap file and extracts
/// information types and categories.
/// </summary>
/// <param name="sText">text of the object tag</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseGlobalSettings(string sText, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
// read parameters
int nParamIndex = 0;
// 0... unknown
// 1... inclusinve info type name
// 2... exclusive info type name
// 3... hidden info type name
// 4... category name
// 5... incl infotype name for category
// 6... excl infotype name for category
// 7... hidden infotype name for category
int prevItem = 0;
string sName = "";
string sDescription = "";
string curCategory = "";
while( ParamRE.IsMatch(sText, nParamIndex) )
{
Match mP = ParamRE.Match(sText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
switch(paramName.ToLower())
{
case "savetype": // inclusive information type name
{
prevItem = 1;
sName = paramValue;
};break;
case "savetypedesc": // description of information type
{
InformationTypeMode mode = InformationTypeMode.Inclusive;
sDescription = paramValue;
if( prevItem == 1)
mode = InformationTypeMode.Inclusive;
if( prevItem == 2)
mode = InformationTypeMode.Exclusive;
if( prevItem == 3)
mode = InformationTypeMode.Hidden;
if( chmFile.GetInformationType( sName ) == null)
{
// check if the HtmlHelpSystem already holds such an information type
if( chmFile.SystemInstance.GetInformationType( sName ) == null)
{
// info type not found yet
InformationType newType = new InformationType(sName, sDescription, mode);
chmFile.InformationTypes.Add(newType);
}
else
{
InformationType sysType = chmFile.SystemInstance.GetInformationType( sName );
chmFile.InformationTypes.Add( sysType );
}
}
prevItem = 0;
};break;
case "saveexclusive": // exclusive information type name
{
prevItem = 2;
sName = paramValue;
};break;
case "savehidden": // hidden information type name
{
prevItem = 3;
sName = paramValue;
};break;
case "category": // category name
{
prevItem = 4;
sName = paramValue;
curCategory = sName;
};break;
case "categorydesc": // category description
{
sDescription = paramValue;
if( chmFile.GetCategory( sName ) == null)
{
// check if the HtmlHelpSystem already holds such a category
if( chmFile.SystemInstance.GetCategory( sName ) == null)
{
// add category
Category newCat = new Category(sName, sDescription);
chmFile.Categories.Add(newCat);
}
else
{
Category sysCat = chmFile.SystemInstance.GetCategory( sName );
chmFile.Categories.Add( sysCat );
}
}
prevItem = 0;
};break;
case "type": // inclusive information type which is member of the previously read category
{
prevItem = 5;
sName = paramValue;
};break;
case "typedesc": // description of type for category
{
sDescription = paramValue;
Category cat = chmFile.GetCategory( curCategory );
if( cat != null)
{
// category found
InformationType infoType = chmFile.GetInformationType( sName );
if( infoType != null)
{
if( !cat.ContainsInformationType(infoType))
{
infoType.SetCategoryFlag(true);
cat.AddInformationType(infoType);
}
}
}
prevItem = 0;
};break;
case "typeexclusive": // exclusive information type which is member of the previously read category
{
prevItem = 6;
sName = paramValue;
};break;
case "typehidden": // hidden information type which is member of the previously read category
{
prevItem = 7;
sName = paramValue;
};break;
default:
{
prevItem = 0;
sName = "";
sDescription = "";
};break;
}
nParamIndex = mP.Index+mP.Length;
}
}
}
}

View File

@@ -1,220 +0,0 @@
using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHCParser</c> implements a parser for HHC contents files.
/// </summary>
// internal sealed class HHCParser : IHHCParser
public class HHCParser2
{
static private string m_text1="";
static private string m_text2="";
static private int m_CurrentPos=0;
/// <summary>
/// Parses a HHC file and returns an ArrayList with the table of contents (TOC) tree
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the table of contents (TOC) tree</returns>
public static ArrayList ParseHHC(string hhcFile, CHMFile chmFile)
{
DateTime StartTime=DateTime.Now;
ArrayList tocList = new ArrayList();
m_text2=hhcFile;
m_text1=hhcFile.ToLower();
int idx=m_text1.IndexOf("<ul>");
if (idx==-1)
return null;
m_CurrentPos=idx+4;
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParseTree(tocList,chmFile);
DateTime EndTime=DateTime.Now;
TimeSpan Diff=EndTime-StartTime;
string x=Diff.ToString();
return tocList;
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
static private void ParseTree( ArrayList arrNodes, CHMFile chmFile )
{
bool bProcessing=true;
do
{
bProcessing=false;
// Indent
int idxa=m_text1.IndexOf("<ul>",m_CurrentPos);
int idxb=m_text1.IndexOf("<li>",m_CurrentPos);
int idxc=m_text1.IndexOf("</ul>",m_CurrentPos);
if ((idxa<idxb) && (idxa<idxc) && (idxa>-1))
{
bProcessing=true;
m_CurrentPos=idxa+4;
if (arrNodes.Count<1)
{
ParseTree(arrNodes,chmFile);
}
else
{
ParseTree(((TOCItem)(arrNodes[arrNodes.Count-1])).Children,chmFile);
}
continue;
}
// new item
if ((idxb<idxa) && (idxb<idxc) && (idxb>-1))
{
bProcessing=true;
m_CurrentPos=idxb+4;
int idx2=m_text1.IndexOf("<object",m_CurrentPos);
if (idx2!=-1)
{
int idx3=m_text1.IndexOf("</object>",idx2+7);
if (idx3!=-1)
{
string text=m_text2.Substring(idx2,idx3-idx2);
m_CurrentPos=idx3+9;
// Parse items in text.
TOCItem tocItem=ParseItems(text, chmFile);
if (tocItem!=null)
{
arrNodes.Add(tocItem);
}
}
}
}
// Undent
if ((idxc<idxa) && (idxc<idxb) && (idxc>-1))
{
m_CurrentPos=idxc+5;
bProcessing=true;
return;
}
}
while (bProcessing);
}
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Parses tree nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static TOCItem ParseItems( string itemstext, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
TOCItem tocItem = new TOCItem();
// read parameters
int nParamIndex = 0;
while( ParamRE.IsMatch(itemstext, nParamIndex) )
{
Match mP = ParamRE.Match(itemstext, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = attributeValue;
}
if( attributeName.ToLower() == "value")
{
paramValue = attributeValue;
}
nAttrIdx = mA.Index+mA.Length;
}
tocItem.Params[paramName] = paramValue;
switch(paramName.ToLower())
{
case "name":
{
tocItem.Name = paramValue;
};break;
case "local":
{
tocItem.Local = paramValue;
};break;
case "imagenumber":
{
tocItem.ImageIndex = Int32.Parse(paramValue);
if( tocItem.ImageIndex == 2)
tocItem.ImageIndex = TOCItem.STD_FOLDER_HH1;
};break;
}
nParamIndex = mP.Index+mP.Length;
}
tocItem.ChmFile = chmFile.ChmFilePath;
return tocItem;
}
}
}

View File

@@ -1,550 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHKParser</c> implements a parser for HHK contents files.
/// </summary>
internal sealed class HHKParser
{
/// <summary>
/// regular expressions for replacing the sitemap boundary tags
/// </summary>
private static string RE_ULOpening = @"\<ul\>"; // will be replaced by a '(' for nested parsing
private static string RE_ULClosing = @"\</ul\>"; // will be replaced by a ')' for nested parsing
/// <summary>
/// Matching ul-tags
/// </summary>
private static string RE_ULBoundaries = @"\<ul\>(?<innerText>.*)\</ul\>";
/// <summary>
/// Matching the nested tree structure.
/// </summary>
private static string RE_NestedBoundaries = @"\( (?> [^()]+ | \( (?<DEPTH>) | \) (?<-DEPTH>) )* (?(DEPTH)(?!)) \)";
/// <summary>
/// Matching object-tags
/// </summary>
private static string RE_ObjectBoundaries = @"\<object(?<innerText>.*?)\</object\>";
/// <summary>
/// Matching param tags
/// </summary>
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
/// <summary>
/// Extracting tag attributes
/// </summary>
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
/// <summary>
/// private regular expressionobjects
/// </summary>
private static Regex ulRE;
private static Regex NestedRE;
private static Regex ObjectRE;
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Parses a HHK file and returns an ArrayList with the index tree
/// </summary>
/// <param name="hhkFile">string content of the hhk file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the index tree</returns>
public static ArrayList ParseHHK(string hhkFile, CHMFile chmFile)
{
ArrayList indexList = new ArrayList();
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
NestedRE = new Regex(RE_NestedBoundaries, RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhkFile, 0) )
{
Match m = ulRE.Match(hhkFile, 0);
if( ObjectRE.IsMatch(hhkFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhkFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
ParseGlobalSettings( globalText, chmFile );
}
string innerText = m.Groups["innerText"].Value;
innerText = innerText.Replace("(", "&#040;");
innerText = innerText.Replace(")", "&#041;");
innerText = Regex.Replace(innerText, RE_ULOpening, "(", RegexOptions.IgnoreCase);
innerText = Regex.Replace(innerText, RE_ULClosing, ")", RegexOptions.IgnoreCase);
ParseTree( innerText, null, indexList, chmFile );
}
return indexList;
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseTree( string text, IndexItem parent, ArrayList arrNodes, CHMFile chmFile )
{
string strPreItems="", strPostItems="";
string innerText = "";
int nIndex = 0;
while( NestedRE.IsMatch(text, nIndex) )
{
Match m = NestedRE.Match(text, nIndex);
innerText = m.Value.Substring( 1, m.Length-2);
strPreItems = text.Substring(nIndex,m.Index-nIndex);
ParseItems(strPreItems, parent, arrNodes, chmFile);
if((arrNodes.Count>0) && (innerText.Length > 0) )
{
IndexItem p = ((IndexItem)(arrNodes[arrNodes.Count-1]));
ParseTree( innerText, p, arrNodes, chmFile );
}
nIndex = m.Index+m.Length;
}
if( nIndex == 0)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseItems(strPostItems, parent, arrNodes, chmFile);
}
else if( nIndex < text.Length-1)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseTree(strPostItems, parent, arrNodes, chmFile);
}
}
/// <summary>
/// Parses nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="parentItem">parent index item</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseItems( string itemstext, IndexItem parentItem, ArrayList arrNodes, CHMFile chmFile)
{
int innerTextIdx = ObjectRE.GroupNumberFromName("innerText");
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
int nObjStartIndex = 0;
int nLastObjStartIndex = 0;
string sKeyword = "";
while( ObjectRE.IsMatch(itemstext, nObjStartIndex) )
{
Match m = ObjectRE.Match(itemstext, nObjStartIndex);
string innerText = m.Groups[innerTextIdx].Value;
IndexItem idxItem = new IndexItem();
// read parameters
int nParamIndex = 0;
int nNameCnt = 0;
string paramTitle = "";
string paramLocal = "";
bool bAdded = false;
while( ParamRE.IsMatch(innerText, nParamIndex) )
{
Match mP = ParamRE.Match(innerText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
//sKeyword = "";
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
nNameCnt++;
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
if( nNameCnt == 1) // first "Name" param = keyword
{
sKeyword = "";
if(parentItem != null)
sKeyword = parentItem.KeyWordPath + ",";
string sOldKW = sKeyword;
sKeyword += paramValue;
IndexItem idxFind = FindByKeyword(arrNodes, sKeyword);
if(idxFind != null)
{
idxItem = idxFind;
}
else
{
if( sKeyword.Split(new char[] {','}).Length > 1 )
{
idxItem.CharIndex = sKeyword.Length - paramValue.Length;
}
else
{
sKeyword = paramValue;
sOldKW = sKeyword;
idxItem.CharIndex = 0;
}
idxItem.KeyWordPath = sKeyword;
idxItem.Indent = sKeyword.Split(new char[] {','}).Length - 1;
idxItem.IsSeeAlso = false;
sKeyword = sOldKW;
}
}
else
{
if( (nNameCnt > 2) && (paramName.ToLower()=="name") )
{
bAdded = true;
IndexTopic idxTopic = new IndexTopic(paramTitle, paramLocal, chmFile.CompileFile, chmFile.ChmFilePath);
idxItem.Topics.Add( idxTopic );
paramTitle = "";
paramLocal = "";
}
switch(paramName.ToLower())
{
case "name":
//case "keyword":
{
paramTitle = paramValue;
};break;
case "local":
{
paramLocal = paramValue.Replace("../", "").Replace("./", "");
};break;
case "type": // information type assignment for item
{
idxItem.InfoTypeStrings.Add( paramValue );
};break;
case "see also":
{
idxItem.AddSeeAlso(paramValue);
idxItem.IsSeeAlso = true;
bAdded = true;
};break;
}
}
nParamIndex = mP.Index+mP.Length;
}
if(!bAdded)
{
bAdded=false;
IndexTopic idxTopic = new IndexTopic(paramTitle, paramLocal, chmFile.CompileFile, chmFile.ChmFilePath);
idxItem.Topics.Add( idxTopic );
paramTitle = "";
paramLocal = "";
}
idxItem.ChmFile = chmFile;
arrNodes.Add( idxItem );
nLastObjStartIndex = nObjStartIndex;
nObjStartIndex = m.Index+m.Length;
}
}
/// <summary>
/// Searches an index-keyword in the index list
/// </summary>
/// <param name="indexList">index list to search</param>
/// <param name="Keyword">keyword to find</param>
/// <returns>Returns an <see cref="IndexItem">IndexItem</see> instance if found, otherwise null.</returns>
private static IndexItem FindByKeyword(ArrayList indexList, string Keyword)
{
foreach(IndexItem curItem in indexList)
{
if( curItem.KeyWordPath == Keyword)
return curItem;
}
return null;
}
/// <summary>
/// Parses the very first &lt;OBJECT&gt; tag in the sitemap file and extracts
/// information types and categories.
/// </summary>
/// <param name="sText">text of the object tag</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseGlobalSettings(string sText, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
// read parameters
int nParamIndex = 0;
// 0... unknown
// 1... inclusinve info type name
// 2... exclusive info type name
// 3... hidden info type name
// 4... category name
// 5... incl infotype name for category
// 6... excl infotype name for category
// 7... hidden infotype name for category
int prevItem = 0;
string sName = "";
string sDescription = "";
string curCategory = "";
while( ParamRE.IsMatch(sText, nParamIndex) )
{
Match mP = ParamRE.Match(sText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
switch(paramName.ToLower())
{
case "savetype": // inclusive information type name
{
prevItem = 1;
sName = paramValue;
};break;
case "savetypedesc": // description of information type
{
InformationTypeMode mode = InformationTypeMode.Inclusive;
sDescription = paramValue;
if( prevItem == 1)
mode = InformationTypeMode.Inclusive;
if( prevItem == 2)
mode = InformationTypeMode.Exclusive;
if( prevItem == 3)
mode = InformationTypeMode.Hidden;
if( chmFile.GetInformationType( sName ) == null)
{
// check if the HtmlHelpSystem already holds such an information type
if( chmFile.SystemInstance.GetInformationType( sName ) == null)
{
// info type not found yet
InformationType newType = new InformationType(sName, sDescription, mode);
chmFile.InformationTypes.Add(newType);
}
else
{
InformationType sysType = chmFile.SystemInstance.GetInformationType( sName );
chmFile.InformationTypes.Add( sysType );
}
}
prevItem = 0;
};break;
case "saveexclusive": // exclusive information type name
{
prevItem = 2;
sName = paramValue;
};break;
case "savehidden": // hidden information type name
{
prevItem = 3;
sName = paramValue;
};break;
case "category": // category name
{
prevItem = 4;
sName = paramValue;
curCategory = sName;
};break;
case "categorydesc": // category description
{
sDescription = paramValue;
if( chmFile.GetCategory( sName ) == null)
{
// check if the HtmlHelpSystem already holds such a category
if( chmFile.SystemInstance.GetCategory( sName ) == null)
{
// add category
Category newCat = new Category(sName, sDescription);
chmFile.Categories.Add(newCat);
}
else
{
Category sysCat = chmFile.SystemInstance.GetCategory( sName );
chmFile.Categories.Add( sysCat );
}
}
prevItem = 0;
};break;
case "type": // inclusive information type which is member of the previously read category
{
prevItem = 5;
sName = paramValue;
};break;
case "typedesc": // description of type for category
{
sDescription = paramValue;
Category cat = chmFile.GetCategory( curCategory );
if( cat != null)
{
// category found
InformationType infoType = chmFile.GetInformationType( sName );
if( infoType != null)
{
if( !cat.ContainsInformationType(infoType))
{
infoType.SetCategoryFlag(true);
cat.AddInformationType(infoType);
}
}
}
prevItem = 0;
};break;
case "typeexclusive": // exclusive information type which is member of the previously read category
{
prevItem = 6;
sName = paramValue;
};break;
case "typehidden": // hidden information type which is member of the previously read category
{
prevItem = 7;
sName = paramValue;
};break;
default:
{
prevItem = 0;
sName = "";
sDescription = "";
};break;
}
nParamIndex = mP.Index+mP.Length;
}
}
}
}

View File

@@ -1,245 +0,0 @@
using System;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>TopicEntry</c> stores the data for one topic entry
/// </summary>
internal sealed class TopicEntry
{
/// <summary>
/// Internal member storing the offset of this topic entry
/// </summary>
private int _entryOffset = 0;
/// <summary>
/// Internal member storing the index of the binary toc
/// </summary>
private int _tocidxOffset = 0;
/// <summary>
/// Internal member storing the string offset of the title
/// </summary>
private int _titleOffset = 0;
/// <summary>
/// Internal member storuing the urltable offset
/// </summary>
private int _urltableOffset = 0;
/// <summary>
/// Internal member storing the visibility mode
/// </summary>
private int _visibilityMode = 0;
/// <summary>
/// Internal member storing an unknown mode
/// </summary>
private int _unknownMode = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="entryOffset">offset of this entry</param>
/// <param name="tocidxOffset">offset in the binary toc index</param>
/// <param name="titleOffset">offset of the title (in the #STRINGS file)</param>
/// <param name="urltableOffset">offset in the urltable containing the urlstr offset for the url</param>
/// <param name="visibilityMode">visibility mode 2 indicates not in contents, 6 indicates that it is in the contents, 0/4 something else (unknown)</param>
/// <param name="unknownMode">0, 2, 4, 8, 10, 12, 16, 32 (unknown)</param>
public TopicEntry(int entryOffset, int tocidxOffset, int titleOffset, int urltableOffset, int visibilityMode, int unknownMode) :this(entryOffset, tocidxOffset, titleOffset, urltableOffset, visibilityMode, unknownMode, null)
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="entryOffset">offset of this entry</param>
/// <param name="tocidxOffset">offset in the binary toc index</param>
/// <param name="titleOffset">offset of the title (in the #STRINGS file)</param>
/// <param name="urltableOffset">offset in the urltable containing the urlstr offset for the url</param>
/// <param name="visibilityMode">visibility mode 2 indicates not in contents, 6 indicates that it is in the contents, 0/4 something else (unknown)</param>
/// <param name="unknownMode">0, 2, 4, 8, 10, 12, 16, 32 (unknown)</param>
/// <param name="associatedFile">associated chmfile object</param>
internal TopicEntry(int entryOffset, int tocidxOffset, int titleOffset, int urltableOffset, int visibilityMode, int unknownMode, CHMFile associatedFile)
{
_entryOffset = entryOffset;
_tocidxOffset = tocidxOffset;
_titleOffset = titleOffset;
_urltableOffset = urltableOffset;
_visibilityMode = visibilityMode;
_unknownMode = unknownMode;
_associatedFile = associatedFile;
}
/// <summary>
/// Standard constructor
/// </summary>
internal TopicEntry()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _entryOffset );
writer.Write( _tocidxOffset );
writer.Write( _titleOffset );
writer.Write( _urltableOffset );
writer.Write( _visibilityMode );
writer.Write( _unknownMode );
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_entryOffset = reader.ReadInt32();
_tocidxOffset = reader.ReadInt32();
_titleOffset = reader.ReadInt32();
_urltableOffset = reader.ReadInt32();
_visibilityMode = reader.ReadInt32();
_unknownMode = reader.ReadInt32();
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Gets the associated chm file
/// </summary>
internal CHMFile ChmFile
{
get { return _associatedFile; }
}
/// <summary>
/// Gets the offset of this entry
/// </summary>
internal int EntryOffset
{
get { return _entryOffset; }
}
/// <summary>
/// Gets the tocidx offset
/// </summary>
internal int TOCIdxOffset
{
get { return _tocidxOffset; }
}
/// <summary>
/// Gets the title offset of the #STRINGS file
/// </summary>
internal int TitleOffset
{
get { return _titleOffset; }
}
/// <summary>
/// Gets the urltable offset
/// </summary>
internal int UrlTableOffset
{
get { return _urltableOffset; }
}
/// <summary>
/// Gets the title of the topic entry
/// </summary>
public string Title
{
get
{
if( _associatedFile == null)
return String.Empty;
if( _associatedFile.StringsFile == null)
return String.Empty;
string sTemp = (string)_associatedFile.StringsFile[ _titleOffset ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Gets the url of the topic
/// </summary>
public string Locale
{
get
{
if( _associatedFile == null)
return String.Empty;
if( _associatedFile.UrltblFile == null)
return String.Empty;
UrlTableEntry utEntry = (UrlTableEntry)_associatedFile.UrltblFile[ _urltableOffset ];
if(utEntry == null)
return String.Empty;
if(utEntry.URL == "")
return String.Empty;
return utEntry.URL;
}
}
/// <summary>
/// Gets the URL of this topic
/// </summary>
public string URL
{
get
{
if(Locale.Length <= 0)
return "about:blank";
if( (Locale.ToLower().IndexOf("http://") >= 0) ||
(Locale.ToLower().IndexOf("https://") >= 0) ||
(Locale.ToLower().IndexOf("mailto:") >= 0) ||
(Locale.ToLower().IndexOf("ftp://") >= 0) ||
(Locale.ToLower().IndexOf("ms-its:") >= 0))
return Locale;
return HtmlHelpSystem.UrlPrefix + _associatedFile.ChmFilePath + "::/" + Locale;
}
}
/// <summary>
/// Gets the visibility mode
/// </summary>
public int VisibilityMode
{
get { return _visibilityMode; }
}
/// <summary>
/// Gets the unknown mode
/// </summary>
public int UknownMode
{
get { return _unknownMode; }
}
}
}

View File

@@ -1,175 +0,0 @@
using System;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>UrlTableEntry</c> stores data for an URL-Table entry
/// </summary>
internal sealed class UrlTableEntry
{
/// <summary>
/// Internal member storing the offset of this entry
/// </summary>
private int _entryOffset = 0;
/// <summary>
/// Internal member storing a unique id
/// </summary>
private uint _uniqueID = 0;
/// <summary>
/// Internal member storing the topics index
/// </summary>
private int _topicsIndex = 0;
/// <summary>
/// Internal member storing the offset in the urlstr table
/// </summary>
private int _urlStrOffset = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="uniqueID">unique id</param>
/// <param name="entryOffset">offset of the entry</param>
/// <param name="topicIndex">topic index</param>
/// <param name="urlstrOffset">urlstr offset for filename</param>
public UrlTableEntry(uint uniqueID, int entryOffset, int topicIndex, int urlstrOffset) : this(uniqueID, entryOffset, topicIndex, urlstrOffset, null)
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="uniqueID">unique id</param>
/// <param name="entryOffset">offset of the entry</param>
/// <param name="topicIndex">topic index</param>
/// <param name="urlstrOffset">urlstr offset for filename</param>
/// <param name="associatedFile">associated chm file</param>
internal UrlTableEntry(uint uniqueID, int entryOffset, int topicIndex, int urlstrOffset, CHMFile associatedFile)
{
_uniqueID = uniqueID;
_entryOffset = entryOffset;
_topicsIndex = topicIndex;
_urlStrOffset = urlstrOffset;
_associatedFile = associatedFile;
}
/// <summary>
/// Standard constructor
/// </summary>
internal UrlTableEntry()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlStrOffset );
writer.Write( _entryOffset );
writer.Write( _topicsIndex );
writer.Write( _urlStrOffset );
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_urlStrOffset = reader.ReadInt32();
_entryOffset = reader.ReadInt32();
_topicsIndex = reader.ReadInt32();
_urlStrOffset = reader.ReadInt32();
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Gets the unique id of the entry
/// </summary>
internal uint UniqueID
{
get {return _uniqueID; }
}
/// <summary>
/// Gets the offset of the entry
/// </summary>
internal int EntryOffset
{
get {return _entryOffset; }
}
/// <summary>
/// Gets the topics index
/// </summary>
internal int TopicIndex
{
get {return _topicsIndex; }
}
/// <summary>
/// Gets the urlstr offset
/// </summary>
internal int UrlstrOffset
{
get { return _urlStrOffset; }
}
/// <summary>
/// Gets the url of the entry
/// </summary>
public string URL
{
get
{
if(_associatedFile == null)
return String.Empty;
if(_associatedFile.UrlstrFile == null)
return String.Empty;
string sTemp = (string)_associatedFile.UrlstrFile.GetURLatOffset( _urlStrOffset );
if( sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Gets the associated topic for this url entry
/// </summary>
internal TopicEntry Topic
{
get
{
if(_associatedFile == null)
return null;
if(_associatedFile.TopicsFile == null)
return null;
TopicEntry tentry = _associatedFile.TopicsFile[ _topicsIndex*16 ];
return tentry;
}
}
}
}

View File

@@ -1,19 +0,0 @@
using System;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// Enumeration for specifying the extraction mode of an toc or index item.
/// </summary>
public enum DataMode
{
/// <summary>
/// TextBased - this item comes from a text-based sitemap file
/// </summary>
TextBased = 0,
/// <summary>
/// Binary - this item was extracted out of a binary stream
/// </summary>
Binary = 1
}
}

View File

@@ -1,16 +0,0 @@
<Combine fileversion="1.0" name="CHMLibrary" description="">
<StartMode startupentry="CHMLibrary" single="True">
<Execute entry="CHMLibrary" type="None" />
</StartMode>
<Entries>
<Entry filename=".\.\CHMLibrary.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="CHMLibrary" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="CHMLibrary" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

View File

@@ -1,58 +0,0 @@
<Project name="CHMLibrary" standardNamespace="CHMLibrary" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Category.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\ChmFileInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Default.build" subtype="Code" buildaction="Nothing" dependson="" data="" />
<File name=".\HtmlHelpSystem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\HttpUtility.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Index.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\IndexItem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\IndexTopic.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\InformationType.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\TableOfContents.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\TOCItem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Storage" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\Storage\CHMStream.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\BinaryReaderHelp.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMBtree.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMFile.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMIdxhdr.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMStrings.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMSystem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMTocidx.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMTopics.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMUrlstr.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMUrltable.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\DumpingInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\enumerations.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\FullTextEngine.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHCParser2.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHCParser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHKParser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\TopicEntry.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\UrlTableEntry.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
</Contents>
<References>
<Reference type="Project" refto="Compression" localcopy="True" />
</References>
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Release" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

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