ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2005
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
28 participants
703 discussions
Start a n
N
ew thread
[royce] 12784: use ntoskrnl/module.xml
by royce@svn.reactos.com
use ntoskrnl/module.xml Modified: branches/xmlbuildsystem/reactos/ReactOS.xml _____ Modified: branches/xmlbuildsystem/reactos/ReactOS.xml --- branches/xmlbuildsystem/reactos/ReactOS.xml 2005-01-04 07:05:04 UTC (rev 12783) +++ branches/xmlbuildsystem/reactos/ReactOS.xml 2005-01-04 07:05:31 UTC (rev 12784) @@ -5,368 +5,6 @@ </module> </directory> <directory name="ntoskrnl"> - <module name="ntoskrnl" type="kernelmodedll"> - <include>./include</include> - <include>../lib/kjs/include</include> - <library>kjs</library> - <directory name="cc"> - <file>cacheman.c</file> - <file>copy.c</file> - <file>fs.c</file> - <file>mdl.c</file> - <file>misc.c</file> - <file>pin.c</file> - <file>view.c</file> - </directory> - <directory name="cm"> - <file>import.c</file> - <file>ntfunc.c</file> - <file>regfile.c</file> - <file>registry.c</file> - <file>regobj.c</file> - <file>rtlfunc.c</file> - </directory> - <directory name="dbg"> - <if property="arch" value="i386"> - <directory name="i386"> - <if property="kdbg" value="true"> - <group> - <file>i386-dis.c</file> - <file>kdb_help.S</file> - </group> - </if> - </directory> - </if> - <if property="kdbg" value="true"> - <group> - <file>kdb.c</file> - <file>kdb_keyboard.c</file> - <file>kdb_serial.c</file> - <file>profile.c</file> - <file>rdebug.c</file> - </group> - </if> - <or> - <if property="kdbg" value="true"> - <group> - <file>kdb_stabs.c</file> - <file>kdb_symbols.c</file> - </group> - </if> - <if property="dbg" value="true"> - <group> - <file>kdb_stabs.c</file> - <file>kdb_symbols.c</file> - </group> - </if> - </or> - <file>user.c</file> - <file>dbgctrl.c</file> - <file>errinfo.c</file> - <file>print.c</file> - </directory> - <directory name="ex"> - <if property="arch" value="i386"> - <directory name="i386"> - <file>interlck.c</file> - </directory> - </if> - <file>btree.c</file> - <file>callback.c</file> - <file>fmutex.c</file> - <file>hashtab.c</file> - <file>init.c</file> - <file>interlck.c</file> - <file>list.c</file> - <file>lookas.c</file> - <file>napi.c</file> - <file>power.c</file> - <file>resource.c</file> - <file>rundown.c</file> - <file>stree.c</file> - <file>synch.c</file> - <file>sysinfo.c</file> - <file>time.c</file> - <file>util.c</file> - <file>uuid.c</file> - <file>win32k.c</file> - <file>work.c</file> - <file>zone.c</file> - </directory> - <directory name="fs"> - <file>dbcsname.c</file> - <file>filelock.c</file> - <file>mcb.c</file> - <file>mdl.c</file> - <file>name.c</file> - <file>notify.c</file> - <file>oplock.c</file> - <file>pool.c</file> - <file>tunnel.c</file> - <file>unc.c</file> - <file>util.c</file> - </directory> - <directory name="inbv"> - <if property="arch" value="i386"> - <directory name="i386"> - </directory> - </if> - <file>inbv.c</file> - </directory> - <directory name="io"> - <file>adapter.c</file> - <file>arcname.c</file> - <file>bootlog.c</file> - <file>buildirp.c</file> - <file>cancel.c</file> - <file>cleanup.c</file> - <file>cntrller.c</file> - <file>create.c</file> - <file>device.c</file> - <file>deviface.c</file> - <file>dir.c</file> - <file>driver.c</file> - <file>errlog.c</file> - <file>error.c</file> - <file>event.c</file> - <file>file.c</file> - <file>flush.c</file> - <file>fs.c</file> - <file>iocomp.c</file> - <file>ioctrl.c</file> - <file>iomgr.c</file> - <file>iowork.c</file> - <file>irp.c</file> - <file>irq.c</file> - <file>lock.c</file> - <file>mailslot.c</file> - <file>mdl.c</file> - <file>npipe.c</file> - <file>page.c</file> - <file>parttab.c</file> - <file>pnpdma.c</file> - <file>pnpmgr.c</file> - <file>pnpnotify.c</file> - <file>pnpreport.c</file> - <file>pnproot.c</file> - <file>process.c</file> - <file>queue.c</file> - <file>rawfs.c</file> - <file>remlock.c</file> - <file>resource.c</file> - <file>rw.c</file> - <file>share.c</file> - <file>shutdown.c</file> - <file>symlink.c</file> - <file>timer.c</file> - <file>vpb.c</file> - <file>wdm.c</file> - <file>wmi.c</file> - <file>xhaldisp.c</file> - <file>xhaldrv.c</file> - </directory> - <directory name="kd"> - <file>dlog.c</file> - <file>gdbstub.c</file> - <file>kdebug.c</file> - <file>mda.c</file> - <file>service.c</file> - </directory> - <directory name="ke"> - <if property="arch" value="i386"> - <directory name="i386"> - <file>bios.c</file> - <file>brkpoint.c</file> - <file>bthread.S</file> - <file>exp.c</file> - <file>fpu.c</file> - <file>gdt.c</file> - <file>i386-mcount.S</file> - <file>idt.c</file> - <file>irq.c</file> - <file>irqhand.S</file> - <file>kernel.c</file> - <file>kernel.c</file> - <file>ldt.c</file> - <file>multiboot.S</file> - <file>stkswitch.S</file> - <file>syscall.S</file> - <file>thread.c</file> - <file>tlbflush.S</file> - <file>trap.S</file> - <file>tskswitch.S</file> - <file>tss.c</file> - <file>usercall.c</file> - <file>usertrap.c</file> - <file>v86m.c</file> - <file>v86m_sup.S</file> - </directory> - </if> - <file>apc.c</file> - <file>bug.c</file> - <file>catch.c</file> - <file>critical.c</file> - <file>device.c</file> - <file>dpc.c</file> - <file>error.c</file> - <file>event.c</file> - <file>gmutex.c</file> - <file>ipi.c</file> - <file>kqueue.c</file> - <file>kthread.c</file> - <file>main.c</file> - <file>mutex.c</file> - <file>process.c</file> - <file>profile.c</file> - <file>queue.c</file> - <file>sem.c</file> - <file>spinlock.c</file> - <file>timer.c</file> - <file>wait.c</file> - </directory> - <directory name="ldr"> - <file>init.c</file> - <file>loader.c</file> - <file>resource.c</file> - <file>rtl.c</file> - <file>sysdll.c</file> - <file>userldr.c</file> - </directory> - <directory name="lpc"> - <file>close.c</file> - <file>complete.c</file> - <file>connect.c</file> - <file>create.c</file> - <file>listen.c</file> - <file>port.c</file> - <file>query.c</file> - <file>queue.c</file> - <file>receive.c</file> - <file>reply.c</file> - <file>send.c</file> - </directory> - <directory name="mm"> - <if property="arch" value="i386"> - <directory name="i386"> - <file>memsafe.s</file> - <file>page.c</file> - <file>pfault.c</file> - </directory> - </if> - <file>anonmem.c</file> - <file>aspace.c</file> - <file>balance.c</file> - <file>cont.c</file> - <file>drvlck.c</file> - <file>freelist.c</file> - <file>iospace.c</file> - <file>kmap.c</file> - <file>marea.c</file> - <file>mdl.c</file> - <file>mm.c</file> - <file>mminit.c</file> - <file>mpw.c</file> - <file>ncache.c</file> - <file>npool.c</file> - <file>pagefile.c</file> - <file>pageop.c</file> - <file>pager.c</file> - <file>pagfault.c</file> - <file>paging.c</file> - <file>physical.c</file> - <file>pool.c</file> - <file>ppool.c</file> - <file>region.c</file> - <file>rmap.c</file> - <file>section.c</file> - <file>slab.c</file> - <file>verifier.c</file> - <file>virtual.c</file> - <file>wset.c</file> - </directory> - <directory name="nt"> - <file>channel.c</file> - <file>efi.c</file> - <file>evtpair.c</file> - <file>misc.c</file> - <file>mutant.c</file> - <file>nt.c</file> - <file>ntevent.c</file> - <file>ntsem.c</file> - <file>nttimer.c</file> - <file>plugplay.c</file> - <file>profile.c</file> - <file>vdm.c</file> - </directory> - <directory name="ob"> - <file>dirobj.c</file> - <file>handle.c</file> - <file>namespc.c</file> - <file>ntobj.c</file> - <file>object.c</file> - <file>sdcache.c</file> - <file>security.c</file> - <file>symlink.c</file> - </directory> - <directory name="po"> - <file>power.c</file> - </directory> - <directory name="ps"> - <if property="arch" value="i386"> - <directory name="i386"> - <file>continue.c</file> - </directory> - </if> - <file>cid.c</file> - <file>create.c</file> - <file>debug.c</file> - <file>idle.c</file> - <file>job.c</file> - <file>kill.c</file> - <file>locale.c</file> - <file>process.c</file> - <file>psmgr.c</file> - <file>suspend.c</file> - <file>thread.c</file> - <file>tinfo.c</file> - <file>w32call.c</file> - <file>win32.c</file> - </directory> - <directory name="rtl"> - <if property="arch" value="i386"> - <directory name="i386"> - <file>exception.c</file> - </directory> - </if> - <file>atom.c</file> - <file>capture.c</file> - <file>ctype.c</file> - <file>handle.c</file> - <file>libsupp.c</file> - <file>message.c</file> - <file>nls.c</file> - <file>purecall.c</file> - <file>rangelist.c</file> - <file>regio.c</file> - <file>sprintf.c</file> - <file>stdlib.c</file> - <file>string.c</file> - <file>strtok.c</file> - <file>swprintf.c</file> - <file>wstring.c</file> - </directory> - <directory name="se"> - <file>access.c</file> - <file>acl.c</file> - <file>audit.c</file> - <file>lsa.c</file> - <file>luid.c</file> - <file>priv.c</file> - <file>sd.c</file> - <file>semgr.c</file> - <file>sid.c</file> - <file>token.c</file> - </directory> - </module> + <xi:include href="ntoskrnl/module.xml" /> </directory> </project>
19 years, 10 months
1
0
0
0
[royce] 12783: xml file for ntoskrnl module
by royce@svn.reactos.com
xml file for ntoskrnl module Added: branches/xmlbuildsystem/reactos/ntoskrnl/module.xml _____ Added: branches/xmlbuildsystem/reactos/ntoskrnl/module.xml --- branches/xmlbuildsystem/reactos/ntoskrnl/module.xml 2005-01-04 07:03:59 UTC (rev 12782) +++ branches/xmlbuildsystem/reactos/ntoskrnl/module.xml 2005-01-04 07:05:04 UTC (rev 12783) @@ -0,0 +1,363 @@ +<module name="ntoskrnl" type="kernelmodedll"> + <include>./include</include> + <include>../lib/kjs/include</include> + <library>kjs</library> + <directory name="cc"> + <file>cacheman.c</file> + <file>copy.c</file> + <file>fs.c</file> + <file>mdl.c</file> + <file>misc.c</file> + <file>pin.c</file> + <file>view.c</file> + </directory> + <directory name="cm"> + <file>import.c</file> + <file>ntfunc.c</file> + <file>regfile.c</file> + <file>registry.c</file> + <file>regobj.c</file> + <file>rtlfunc.c</file> + </directory> + <directory name="dbg"> + <if property="arch" value="i386"> + <directory name="i386"> + <if property="kdbg" value="true"> + <group> + <file>i386-dis.c</file> + <file>kdb_help.S</file> + </group> + </if> + </directory> + </if> + <if property="kdbg" value="true"> + <group> + <file>kdb.c</file> + <file>kdb_keyboard.c</file> + <file>kdb_serial.c</file> + <file>profile.c</file> + <file>rdebug.c</file> + </group> + </if> + <or> + <if property="kdbg" value="true"> + <group> + <file>kdb_stabs.c</file> + <file>kdb_symbols.c</file> + </group> + </if> + <if property="dbg" value="true"> + <group> + <file>kdb_stabs.c</file> + <file>kdb_symbols.c</file> + </group> + </if> + </or> + <file>user.c</file> + <file>dbgctrl.c</file> + <file>errinfo.c</file> + <file>print.c</file> + </directory> + <directory name="ex"> + <if property="arch" value="i386"> + <directory name="i386"> + <file>interlck.c</file> + </directory> + </if> + <file>btree.c</file> + <file>callback.c</file> + <file>fmutex.c</file> + <file>hashtab.c</file> + <file>init.c</file> + <file>interlck.c</file> + <file>list.c</file> + <file>lookas.c</file> + <file>napi.c</file> + <file>power.c</file> + <file>resource.c</file> + <file>rundown.c</file> + <file>stree.c</file> + <file>synch.c</file> + <file>sysinfo.c</file> + <file>time.c</file> + <file>util.c</file> + <file>uuid.c</file> + <file>win32k.c</file> + <file>work.c</file> + <file>zone.c</file> + </directory> + <directory name="fs"> + <file>dbcsname.c</file> + <file>filelock.c</file> + <file>mcb.c</file> + <file>mdl.c</file> + <file>name.c</file> + <file>notify.c</file> + <file>oplock.c</file> + <file>pool.c</file> + <file>tunnel.c</file> + <file>unc.c</file> + <file>util.c</file> + </directory> + <directory name="inbv"> + <if property="arch" value="i386"> + <directory name="i386"> + </directory> + </if> + <file>inbv.c</file> + </directory> + <directory name="io"> + <file>adapter.c</file> + <file>arcname.c</file> + <file>bootlog.c</file> + <file>buildirp.c</file> + <file>cancel.c</file> + <file>cleanup.c</file> + <file>cntrller.c</file> + <file>create.c</file> + <file>device.c</file> + <file>deviface.c</file> + <file>dir.c</file> + <file>driver.c</file> + <file>errlog.c</file> + <file>error.c</file> + <file>event.c</file> + <file>file.c</file> + <file>flush.c</file> + <file>fs.c</file> + <file>iocomp.c</file> + <file>ioctrl.c</file> + <file>iomgr.c</file> + <file>iowork.c</file> + <file>irp.c</file> + <file>irq.c</file> + <file>lock.c</file> + <file>mailslot.c</file> + <file>mdl.c</file> + <file>npipe.c</file> + <file>page.c</file> + <file>parttab.c</file> + <file>pnpdma.c</file> + <file>pnpmgr.c</file> + <file>pnpnotify.c</file> + <file>pnpreport.c</file> + <file>pnproot.c</file> + <file>process.c</file> + <file>queue.c</file> + <file>rawfs.c</file> + <file>remlock.c</file> + <file>resource.c</file> + <file>rw.c</file> + <file>share.c</file> + <file>shutdown.c</file> + <file>symlink.c</file> + <file>timer.c</file> + <file>vpb.c</file> + <file>wdm.c</file> + <file>wmi.c</file> + <file>xhaldisp.c</file> + <file>xhaldrv.c</file> + </directory> + <directory name="kd"> + <file>dlog.c</file> + <file>gdbstub.c</file> + <file>kdebug.c</file> + <file>mda.c</file> + <file>service.c</file> + </directory> + <directory name="ke"> + <if property="arch" value="i386"> + <directory name="i386"> + <file>bios.c</file> + <file>brkpoint.c</file> + <file>bthread.S</file> + <file>exp.c</file> + <file>fpu.c</file> + <file>gdt.c</file> + <file>i386-mcount.S</file> + <file>idt.c</file> + <file>irq.c</file> + <file>irqhand.S</file> + <file>kernel.c</file> + <file>kernel.c</file> + <file>ldt.c</file> + <file>multiboot.S</file> + <file>stkswitch.S</file> + <file>syscall.S</file> + <file>thread.c</file> + <file>tlbflush.S</file> + <file>trap.S</file> + <file>tskswitch.S</file> + <file>tss.c</file> + <file>usercall.c</file> + <file>usertrap.c</file> + <file>v86m.c</file> + <file>v86m_sup.S</file> + </directory> + </if> + <file>apc.c</file> + <file>bug.c</file> + <file>catch.c</file> + <file>critical.c</file> + <file>device.c</file> + <file>dpc.c</file> + <file>error.c</file> + <file>event.c</file> + <file>gmutex.c</file> + <file>ipi.c</file> + <file>kqueue.c</file> + <file>kthread.c</file> + <file>main.c</file> + <file>mutex.c</file> + <file>process.c</file> + <file>profile.c</file> + <file>queue.c</file> + <file>sem.c</file> + <file>spinlock.c</file> + <file>timer.c</file> + <file>wait.c</file> + </directory> + <directory name="ldr"> + <file>init.c</file> + <file>loader.c</file> + <file>resource.c</file> + <file>rtl.c</file> + <file>sysdll.c</file> + <file>userldr.c</file> + </directory> + <directory name="lpc"> + <file>close.c</file> + <file>complete.c</file> + <file>connect.c</file> + <file>create.c</file> + <file>listen.c</file> + <file>port.c</file> + <file>query.c</file> + <file>queue.c</file> + <file>receive.c</file> + <file>reply.c</file> + <file>send.c</file> + </directory> + <directory name="mm"> + <if property="arch" value="i386"> + <directory name="i386"> + <file>memsafe.s</file> + <file>page.c</file> + <file>pfault.c</file> + </directory> + </if> + <file>anonmem.c</file> + <file>aspace.c</file> + <file>balance.c</file> + <file>cont.c</file> + <file>drvlck.c</file> + <file>freelist.c</file> + <file>iospace.c</file> + <file>kmap.c</file> + <file>marea.c</file> + <file>mdl.c</file> + <file>mm.c</file> + <file>mminit.c</file> + <file>mpw.c</file> + <file>ncache.c</file> + <file>npool.c</file> + <file>pagefile.c</file> + <file>pageop.c</file> + <file>pager.c</file> + <file>pagfault.c</file> + <file>paging.c</file> + <file>physical.c</file> + <file>pool.c</file> + <file>ppool.c</file> + <file>region.c</file> + <file>rmap.c</file> + <file>section.c</file> + <file>slab.c</file> + <file>verifier.c</file> + <file>virtual.c</file> + <file>wset.c</file> + </directory> + <directory name="nt"> + <file>channel.c</file> + <file>efi.c</file> + <file>evtpair.c</file> + <file>misc.c</file> + <file>mutant.c</file> + <file>nt.c</file> + <file>ntevent.c</file> + <file>ntsem.c</file> + <file>nttimer.c</file> + <file>plugplay.c</file> + <file>profile.c</file> + <file>vdm.c</file> + </directory> + <directory name="ob"> + <file>dirobj.c</file> + <file>handle.c</file> + <file>namespc.c</file> + <file>ntobj.c</file> + <file>object.c</file> + <file>sdcache.c</file> + <file>security.c</file> + <file>symlink.c</file> + </directory> + <directory name="po"> + <file>power.c</file> + </directory> + <directory name="ps"> + <if property="arch" value="i386"> + <directory name="i386"> + <file>continue.c</file> + </directory> + </if> + <file>cid.c</file> + <file>create.c</file> + <file>debug.c</file> + <file>idle.c</file> + <file>job.c</file> + <file>kill.c</file> + <file>locale.c</file> + <file>process.c</file> + <file>psmgr.c</file> + <file>suspend.c</file> + <file>thread.c</file> + <file>tinfo.c</file> + <file>w32call.c</file> + <file>win32.c</file> + </directory> + <directory name="rtl"> + <if property="arch" value="i386"> + <directory name="i386"> + <file>exception.c</file> + </directory> + </if> + <file>atom.c</file> + <file>capture.c</file> + <file>ctype.c</file> + <file>handle.c</file> + <file>libsupp.c</file> + <file>message.c</file> + <file>nls.c</file> + <file>purecall.c</file> + <file>rangelist.c</file> + <file>regio.c</file> + <file>sprintf.c</file> + <file>stdlib.c</file> + <file>string.c</file> + <file>strtok.c</file> + <file>swprintf.c</file> + <file>wstring.c</file> + </directory> + <directory name="se"> + <file>access.c</file> + <file>acl.c</file> + <file>audit.c</file> + <file>lsa.c</file> + <file>luid.c</file> + <file>priv.c</file> + <file>sd.c</file> + <file>semgr.c</file> + <file>sid.c</file> + <file>token.c</file> + </directory> +</module>
19 years, 10 months
1
0
0
0
[royce] 12782: support for <xi:include href="foo/foo.xml">, including the "relative path-mucking" necessary
by royce@svn.reactos.com
support for <xi:include href="foo/foo.xml">, including the "relative path-mucking" necessary Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 06:24:17 UTC (rev 12781) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 07:03:59 UTC (rev 12782) @@ -7,11 +7,16 @@ #include <stdio.h> #include <io.h> #include <assert.h> +#include <direct.h> #include "rbuild.h" using std::string; using std::vector; +#ifdef WIN32 +#define getcwd _getcwd +#endif//WIN32 + #ifdef _MSC_VER unsigned __int64 #else @@ -32,6 +37,86 @@ static const char* WS = " \t\r\n"; static const char* WSEQ = " =\t\r\n"; +Path::Path() +{ + string s; + s.resize ( _MAX_PATH ); + s[0] = 0; + getcwd ( &s[0], s.size() ); + s.resize ( strlen ( s.c_str() ) ); + const char* p = strtok ( &s[0], "/\\" ); + while ( p ) + { + if ( *p ) + path.push_back ( p ); + p = strtok ( NULL, "/\\" ); + } +} + +Path::Path ( const Path& cwd, const string& file ) +{ + string s ( cwd.Fixup ( file, false ) ); + const char* p = strtok ( &s[0], "/\\" ); + while ( p ) + { + if ( *p ) + path.push_back ( p ); + p = strtok ( NULL, "/\\" ); + } +} + +string Path::Fixup ( const string& file, bool include_filename ) const +{ + if ( strchr ( "/\\", file[0] ) +#ifdef WIN32 + // this squirreliness is b/c win32 has drive letters and *nix doesn't... + || file[1] == ':' +#endif//WIN32 + ) + { + return file; + } + vector<string> pathtmp ( path ); + string tmp ( file ); + const char* prev = strtok ( &tmp[0], "/\\" ); + const char* p = strtok ( NULL, "/\\" ); + while ( p ) + { + if ( !strcmp ( prev, "." ) ) + ; // do nothing + else if ( !strcmp ( prev, ".." ) ) + { + // this squirreliness is b/c win32 has drive letters and *nix doesn't... +#ifdef WIN32 + if ( pathtmp.size() > 1 ) +#else + if ( pathtmp.size() ) +#endif + pathtmp.resize ( pathtmp.size() - 1 ); + } + else + pathtmp.push_back ( prev ); + prev = p; + p = strtok ( NULL, "/\\" ); + } + if ( include_filename ) + pathtmp.push_back ( prev ); + + // reuse tmp variable to return recombined path + tmp.resize(0); + for ( size_t i = 0; i < pathtmp.size(); i++ ) + { + // this squirreliness is b/c win32 has drive letters and *nix doesn't... +#ifdef WIN32 + if ( i ) tmp += "/"; +#else + tmp += "/"; +#endif + tmp += pathtmp[i]; + } + return tmp; +} + XMLFile::XMLFile() { } @@ -47,10 +132,10 @@ _p = _end = NULL; } -bool XMLFile::open(const char* filename) +bool XMLFile::open(const string& filename) { close(); - FILE* f = fopen ( filename, "r" ); + FILE* f = fopen ( filename.c_str(), "rb" ); if ( !f ) return false; unsigned long len = (unsigned long)filelen(f); @@ -205,7 +290,8 @@ return !( *p == '/' ) && !end_tag; } -const XMLAttribute* XMLElement::GetAttribute ( const string& attribute ) const +const XMLAttribute* XMLElement::GetAttribute ( const string& attribute, + bool required ) const { // this would be faster with a tree-based container, but our attribute // lists are likely to stay so short as to not be an issue. @@ -214,6 +300,11 @@ if ( attribute == attributes[i]->name ) return attributes[i]; } + if ( required ) + { + printf ( "syntax error: attribute '%s' required for <%s>\n", + attribute.c_str(), name.c_str() ); + } return NULL; } @@ -226,6 +317,7 @@ // it's parsed data. Keep calling this function until it returns NULL // (no more data) XMLElement* XMLParse(XMLFile& f, + const Path& path, bool* pend_tag = NULL) { string token; @@ -233,8 +325,35 @@ return NULL; XMLElement* e = new XMLElement; bool end_tag; - if ( !e->Parse ( token, end_tag ) ) + + bool bNeedEnd = e->Parse ( token, end_tag ); + + if ( e->name == "xi:include" ) { + const XMLAttribute* att; + att = e->GetAttribute("href",true); + if ( att ) + { + string file ( path.Fixup(att->value,true) ); + XMLFile fInc; + if ( !fInc.open ( file ) ) + printf ( "xi:include error, couldn't find file '%s'\n", file.c_str() ); + else + { + Path path2 ( path, att->value ); + for ( ;; ) + { + XMLElement* e2 = XMLParse ( fInc, path2 ); + if ( !e2 ) + break; + e->subElements.push_back ( e2 ); + } + } + } + } + + if ( !bNeedEnd ) + { if ( pend_tag ) *pend_tag = end_tag; else if ( end_tag ) @@ -249,7 +368,7 @@ { if ( f.next_is_text() ) { - if ( !f.get_token ( token ) ) + if ( !f.get_token ( token ) || !token.size() ) { printf ( "internal tool error - get_token() failed when more_tokens() returned true\n" ); break; @@ -266,7 +385,7 @@ } else { - XMLElement* e2 = XMLParse ( f, &end_tag ); + XMLElement* e2 = XMLParse ( f, path, &end_tag ); if ( end_tag ) { if ( e->name != e2->name ) @@ -292,7 +411,7 @@ string subpath(path); if ( e.name == "project" ) { - att = e.GetAttribute ( "name" ); + att = e.GetAttribute ( "name", false ); if ( !att ) name = "Unnamed"; else @@ -300,24 +419,18 @@ } else if ( e.name == "module" ) { - att = e.GetAttribute ( "name" ); + att = e.GetAttribute ( "name", true ); if ( !att ) - { - printf ( "syntax error: 'name' attribute required for <module>\n" ); return; - } Module* module = new Module ( e, att->value, path ); modules.push_back ( module ); return; // REM TODO FIXME no processing of modules... yet } else if ( e.name == "directory" ) { - const XMLAttribute* att = e.GetAttribute("name"); + const XMLAttribute* att = e.GetAttribute ( "name", true ); if ( !att ) - { - printf ( "syntax error: 'name' attribute required for <directory>\n" ); return; - } subpath = path + "/" + att->value; } for ( size_t i = 0; i < e.subElements.size(); i++ ) @@ -327,6 +440,7 @@ int main ( int argc, char** argv ) { XMLFile f; + Path path; if ( !f.open ( "ReactOS.xml" ) ) { printf ( "couldn't open ReactOS.xml!\n" ); @@ -335,7 +449,7 @@ for ( ;; ) { - XMLElement* head = XMLParse ( f ); + XMLElement* head = XMLParse ( f, path ); if ( !head ) break; // end of file _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 06:24:17 UTC (rev 12781) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 07:03:59 UTC (rev 12782) @@ -4,13 +4,22 @@ #include <string> #include <vector> +class Path +{ + std::vector<std::string> path; +public: + Path(); // initializes path to getcwd(); + Path ( const Path& cwd, const std::string& filename ); + std::string Fixup ( const std::string& filename, bool include_filename ) const; +}; + class XMLFile { friend class XMLElement; public: XMLFile(); void close(); - bool open(const char* filename); + bool open(const std::string& filename); void next_token(); bool next_is_text(); bool more_tokens(); @@ -47,7 +56,8 @@ ~XMLElement(); bool Parse(const std::string& token, bool& end_tag); - const XMLAttribute* GetAttribute ( const std::string& attribute ) const; + const XMLAttribute* GetAttribute ( const std::string& attribute, + bool required) const; }; class Project;
19 years, 10 months
1
0
0
0
[royce] 12781: buffer overflow (& invalid registry path for device) bugfix: DataPtr != KeyInformation->Data on 2nd+ passes
by royce@svn.reactos.com
buffer overflow (& invalid registry path for device) bugfix: DataPtr != KeyInformation->Data on 2nd+ passes Modified: trunk/reactos/drivers/net/ndis/ndis/protocol.c _____ Modified: trunk/reactos/drivers/net/ndis/ndis/protocol.c --- trunk/reactos/drivers/net/ndis/ndis/protocol.c 2005-01-04 05:09:53 UTC (rev 12780) +++ trunk/reactos/drivers/net/ndis/ndis/protocol.c 2005-01-04 06:24:17 UTC (rev 12781) @@ -855,7 +855,7 @@ } wcscpy(RegistryPathStr, SERVICES_KEY); - wcscat(RegistryPathStr, (((WCHAR *)(KeyInformation->Data)) +8 )); + wcscat(RegistryPathStr, DataPtr + 8 ); wcscat(RegistryPathStr, PARAMETERS_KEY); wcsncat(RegistryPathStr, ProtocolCharacteristics->Name.Buffer, ProtocolCharacteristics->Name.Length / sizeof(WCHAR) );
19 years, 10 months
1
0
0
0
[royce] 12780: dump first 128 bytes of violated memory blocks
by royce@svn.reactos.com
dump first 128 bytes of violated memory blocks Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h _____ Modified: trunk/reactos/ntoskrnl/mm/RPoolMgr.h --- trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-04 04:45:00 UTC (rev 12779) +++ trunk/reactos/ntoskrnl/mm/RPoolMgr.h 2005-01-04 05:09:53 UTC (rev 12780) @@ -1,4 +1,4 @@ -/* $Id: RPoolMgr.h,v 1.4 2004/12/24 17:06:59 navaraf Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -369,6 +369,39 @@ RiPrintLastOwner ( pUsed ); R_DEBUG ( "\n" ); + R_DEBUG ( "Contents of Block:\n" ); + for ( i = 0; i < 8*16 && i < pUsed->UserSize; i += 16 ) + { + int j; + R_DEBUG ( "%04X ", i ); + for ( j = 0; j < 16; j++ ) + { + if ( i+j < pUsed->UserSize ) + { + R_DEBUG ( "%02X ", (unsigned)(unsigned char)Addr[i+j] ); + } + else + { + R_DEBUG ( " " ); + } + } + R_DEBUG(" "); + for ( j = 0; j < 16; j++ ) + { + if ( i+j < pUsed->UserSize ) + { + char c = Addr[i+j]; + if ( c < 0x20 || c > 0x7E ) + c = '.'; + R_DEBUG ( "%c", c ); + } + else + { + R_DEBUG ( " " ); + } + } + R_DEBUG("\n"); + } R_PANIC(); } static void @@ -423,11 +456,11 @@ } if ( !bLow || !bHigh ) { - const char* violation = "High and Low-side redzone"; + const char* violation = "High and Low-side redzone overwrite"; if ( bHigh ) // high is okay, so it was just low failed - violation = "Low-side redzone"; + violation = "Low-side redzone overwrite"; else if ( bLow ) // low side is okay, so it was just high failed - violation = "High-side redzone"; + violation = "High-side redzone overwrite"; RiBadBlock ( pUsed, Addr, violation, file, line, 1 ); } }
19 years, 10 months
1
0
0
0
[gdalsnes] 12779: -move structs OBJECT_TYPE/OBJECT_HEADER into private headers
by gdalsnes@svn.reactos.com
-move structs OBJECT_TYPE/OBJECT_HEADER into private headers -correct OBJECT_TYPE_INFORMATION struct -rename meaningless members OBJECT_TYPE->MaxObjects/MaxHandles to PeakObjects/PeakHandles and init to zero. Both are still unused. Modified: trunk/reactos/include/ntos/obtypes.h Modified: trunk/reactos/ntoskrnl/cm/registry.c Modified: trunk/reactos/ntoskrnl/ex/callback.c Modified: trunk/reactos/ntoskrnl/ex/win32k.c Modified: trunk/reactos/ntoskrnl/include/internal/ob.h Modified: trunk/reactos/ntoskrnl/io/driver.c Modified: trunk/reactos/ntoskrnl/io/iocomp.c Modified: trunk/reactos/ntoskrnl/io/iomgr.c Modified: trunk/reactos/ntoskrnl/lpc/port.c Modified: trunk/reactos/ntoskrnl/mm/section.c Modified: trunk/reactos/ntoskrnl/nt/evtpair.c Modified: trunk/reactos/ntoskrnl/nt/mutant.c Modified: trunk/reactos/ntoskrnl/nt/ntevent.c Modified: trunk/reactos/ntoskrnl/nt/ntsem.c Modified: trunk/reactos/ntoskrnl/nt/nttimer.c Modified: trunk/reactos/ntoskrnl/nt/profile.c Modified: trunk/reactos/ntoskrnl/ob/namespc.c Modified: trunk/reactos/ntoskrnl/ob/symlink.c Modified: trunk/reactos/ntoskrnl/ps/job.c Modified: trunk/reactos/ntoskrnl/ps/process.c Modified: trunk/reactos/ntoskrnl/ps/thread.c Modified: trunk/reactos/ntoskrnl/se/token.c _____ Modified: trunk/reactos/include/ntos/obtypes.h --- trunk/reactos/include/ntos/obtypes.h 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/include/ntos/obtypes.h 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,6 +1,6 @@ #ifndef _INCLUDE_DDK_OBTYPES_H #define _INCLUDE_DDK_OBTYPES_H -/* $Id: obtypes.h,v 1.9 2004/11/21 06:51:17 ion Exp $ */ +/* $Id$ */ struct _DIRECTORY_OBJECT; struct _OBJECT_ATTRIBUTES; @@ -35,23 +35,28 @@ } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION; -typedef struct _OBJECT_TYPE_INFORMATION -{ - UNICODE_STRING Name; - ULONG ObjectCount; - ULONG ReferenceCount; - ULONG Reserved1[4]; - ULONG PeakObjectCount; - ULONG PeakHandleCount; - ULONG Reserved2[4]; - ULONG InvalidAttributes; - GENERIC_MAPPING GenericMapping; - ULONG ValidAccess; - UCHAR Unknown; - BOOLEAN MainitainHandleDatabase; - POOL_TYPE PoolType; - ULONG PagedPoolUsage; - ULONG NonPagedPoolUsage; +typedef struct _OBJECT_TYPE_INFORMATION { + UNICODE_STRING TypeName; + ULONG TotalNumberOfObjects; + ULONG TotalNumberOfHandles; + ULONG TotalPagedPoolUsage; + ULONG TotalNonPagedPoolUsage; + ULONG TotalNamePoolUsage; + ULONG TotalHandleTableUsage; + ULONG PeakNumberOfObjects; + ULONG PeakNumberOfHandles; + ULONG PeakPagedPoolUsage; + ULONG PeakNonPagedPoolUsage; + ULONG PeakNamePoolUsage; + ULONG PeakHandleTableUsage; + ULONG InvalidAttributes; + GENERIC_MAPPING GenericMapping; + ULONG ValidAccessMask; + BOOLEAN SecurityRequired; + BOOLEAN MaintainHandleCount; + ULONG PoolType; + ULONG DefaultPagedPoolCharge; + ULONG DefaultNonPagedPoolCharge; } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION; @@ -68,169 +73,10 @@ BOOLEAN ProtectFromClose; } OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION; -#endif /* __USE_W32API */ -typedef struct _OBJECT_TYPE -{ - /* - * PURPOSE: Tag to be used when allocating objects of this type - */ - ULONG Tag; - - /* - * PURPOSE: Name of the type - */ - UNICODE_STRING TypeName; - - /* - * PURPOSE: Total number of objects of this type - */ - ULONG TotalObjects; - - /* - * PURPOSE: Total number of handles of this type - */ - ULONG TotalHandles; - - /* - * PURPOSE: Maximum objects of this type - */ - ULONG MaxObjects; - - /* - * PURPOSE: Maximum handles of this type - */ - ULONG MaxHandles; - - /* - * PURPOSE: Paged pool charge - */ - ULONG PagedPoolCharge; - - /* - * PURPOSE: Nonpaged pool charge - */ - ULONG NonpagedPoolCharge; - - /* - * PURPOSE: Mapping of generic access rights - */ - PGENERIC_MAPPING Mapping; - - /* - * PURPOSE: Dumps the object - * NOTE: To be defined - */ - VOID STDCALL_FUNC (*Dump)(VOID); - - /* - * PURPOSE: Opens the object - * NOTE: To be defined - */ - VOID STDCALL_FUNC (*Open)(VOID); - - /* - * PURPOSE: Called to close an object if OkayToClose returns true - */ - VOID STDCALL_FUNC (*Close)(PVOID ObjectBody, - ULONG HandleCount); - - /* - * PURPOSE: Called to delete an object when the last reference is removed - */ - VOID STDCALL_FUNC (*Delete)(PVOID ObjectBody); - - /* - * PURPOSE: Called when an open attempts to open a file apparently - * residing within the object - * RETURNS - * STATUS_SUCCESS NextObject was found - * STATUS_UNSUCCESSFUL NextObject not found - * STATUS_REPARSE Path changed, restart parsing the path - */ - NTSTATUS STDCALL_FUNC (*Parse)(PVOID ParsedObject, - PVOID *NextObject, - PUNICODE_STRING FullPath, - PWSTR *Path, - ULONG Attributes); - - /* - * PURPOSE: Called to set, query, delete or assign a security-descriptor - * to the object - * RETURNS - * STATUS_SUCCESS NextObject was found - */ - NTSTATUS STDCALL_FUNC (*Security)(PVOID ObjectBody, - SECURITY_OPERATION_CODE OperationCode, - SECURITY_INFORMATION SecurityInformation, - PSECURITY_DESCRIPTOR SecurityDescriptor, - PULONG BufferLength); - - /* - * PURPOSE: Called to query the name of the object - * RETURNS - * STATUS_SUCCESS NextObject was found - */ - NTSTATUS STDCALL_FUNC (*QueryName)(PVOID ObjectBody, - POBJECT_NAME_INFORMATION ObjectNameInfo, - ULONG Length, - PULONG ReturnLength); - - /* - * PURPOSE: Called when a process asks to close the object - */ - VOID STDCALL_FUNC (*OkayToClose)(VOID); - - NTSTATUS STDCALL_FUNC (*Create)(PVOID ObjectBody, - PVOID Parent, - PWSTR RemainingPath, - struct _OBJECT_ATTRIBUTES* ObjectAttributes); - - VOID STDCALL_FUNC (*DuplicationNotify)(PEPROCESS DuplicateTo, - PEPROCESS DuplicateFrom, - PVOID Object); -} OBJECT_TYPE; - -#ifndef __USE_W32API - typedef struct _OBJECT_TYPE *POBJECT_TYPE; -#endif /* __USE_W32API */ - -typedef struct _OBJECT_HEADER -/* - * PURPOSE: Header for every object managed by the object manager - */ -{ - UNICODE_STRING Name; - LIST_ENTRY Entry; - LONG RefCount; - LONG HandleCount; - BOOLEAN CloseInProcess; - BOOLEAN Permanent; - BOOLEAN Inherit; - struct _DIRECTORY_OBJECT* Parent; - POBJECT_TYPE ObjectType; - PSECURITY_DESCRIPTOR SecurityDescriptor; - - /* - * PURPOSE: Object type - * NOTE: This overlaps the first member of the object body - */ - CSHORT Type; - - /* - * PURPOSE: Object size - * NOTE: This overlaps the second member of the object body - */ - CSHORT Size; - - -} OBJECT_HEADER, *POBJECT_HEADER; - -#ifndef __USE_W32API - typedef struct _OBJECT_ATTRIBUTES { ULONG Length; _____ Modified: trunk/reactos/ntoskrnl/cm/registry.c --- trunk/reactos/ntoskrnl/cm/registry.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/cm/registry.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.129 2004/12/12 22:36:10 ekohl Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -259,8 +259,8 @@ CmiKeyType->Tag = TAG('R', 'e', 'g', 'K'); CmiKeyType->TotalObjects = 0; CmiKeyType->TotalHandles = 0; - CmiKeyType->MaxObjects = LONG_MAX; - CmiKeyType->MaxHandles = LONG_MAX; + CmiKeyType->PeakObjects = 0; + CmiKeyType->PeakHandles = 0; CmiKeyType->PagedPoolCharge = 0; CmiKeyType->NonpagedPoolCharge = sizeof(KEY_OBJECT); CmiKeyType->Mapping = &CmiKeyMapping; _____ Modified: trunk/reactos/ntoskrnl/ex/callback.c --- trunk/reactos/ntoskrnl/ex/callback.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ex/callback.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: callback.c,v 1.13 2004/10/30 14:02:04 navaraf Exp $ +/* $Id$ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/callback.c @@ -72,8 +72,8 @@ ExCallbackObjectType->Tag = CALLBACK_TAG; ExCallbackObjectType->TotalObjects = 0; ExCallbackObjectType->TotalHandles = 0; - ExCallbackObjectType->MaxObjects = 0xFFFFFFFF; - ExCallbackObjectType->MaxHandles = 0xFFFFFFFF; + ExCallbackObjectType->PeakObjects = 0; + ExCallbackObjectType->PeakHandles = 0; ExCallbackObjectType->PagedPoolCharge = 0; ExCallbackObjectType->Dump = NULL; ExCallbackObjectType->Open = NULL; _____ Modified: trunk/reactos/ntoskrnl/ex/win32k.c --- trunk/reactos/ntoskrnl/ex/win32k.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ex/win32k.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -297,8 +297,8 @@ ExWindowStationObjectType->Tag = TAG('W', 'I', 'N', 'S'); ExWindowStationObjectType->TotalObjects = 0; ExWindowStationObjectType->TotalHandles = 0; - ExWindowStationObjectType->MaxObjects = ULONG_MAX; - ExWindowStationObjectType->MaxHandles = ULONG_MAX; + ExWindowStationObjectType->PeakObjects = 0; + ExWindowStationObjectType->PeakHandles = 0; ExWindowStationObjectType->PagedPoolCharge = 0; ExWindowStationObjectType->NonpagedPoolCharge = sizeof(WINSTATION_OBJECT); ExWindowStationObjectType->Mapping = &ExpWindowStationMapping; @@ -327,8 +327,8 @@ ExDesktopObjectType->Tag = TAG('D', 'E', 'S', 'K'); ExDesktopObjectType->TotalObjects = 0; ExDesktopObjectType->TotalHandles = 0; - ExDesktopObjectType->MaxObjects = ULONG_MAX; - ExDesktopObjectType->MaxHandles = ULONG_MAX; + ExDesktopObjectType->PeakObjects = 0; + ExDesktopObjectType->PeakHandles = 0; ExDesktopObjectType->PagedPoolCharge = 0; ExDesktopObjectType->NonpagedPoolCharge = sizeof(DESKTOP_OBJECT); ExDesktopObjectType->Mapping = &ExpDesktopMapping; _____ Modified: trunk/reactos/ntoskrnl/include/internal/ob.h --- trunk/reactos/ntoskrnl/include/internal/ob.h 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/include/internal/ob.h 2005-01-04 04:45:00 UTC (rev 12779) @@ -24,6 +24,162 @@ typedef PVOID POBJECT; + +typedef struct _OBJECT_TYPE +{ + /* + * PURPOSE: Tag to be used when allocating objects of this type + */ + ULONG Tag; + + /* + * PURPOSE: Name of the type + */ + UNICODE_STRING TypeName; + + /* + * PURPOSE: Total number of objects of this type + */ + ULONG TotalObjects; + + /* + * PURPOSE: Total number of handles of this type + */ + ULONG TotalHandles; + + /* + * PURPOSE: Peak objects of this type + */ + ULONG PeakObjects; + + /* + * PURPOSE: Peak handles of this type + */ + ULONG PeakHandles; + + /* + * PURPOSE: Paged pool charge + */ + ULONG PagedPoolCharge; + + /* + * PURPOSE: Nonpaged pool charge + */ + ULONG NonpagedPoolCharge; + + /* + * PURPOSE: Mapping of generic access rights + */ + PGENERIC_MAPPING Mapping; + + /* + * PURPOSE: Dumps the object + * NOTE: To be defined + */ + VOID STDCALL_FUNC (*Dump)(VOID); + + /* + * PURPOSE: Opens the object + * NOTE: To be defined + */ + VOID STDCALL_FUNC (*Open)(VOID); + + /* + * PURPOSE: Called to close an object if OkayToClose returns true + */ + VOID STDCALL_FUNC (*Close)(PVOID ObjectBody, + ULONG HandleCount); + + /* + * PURPOSE: Called to delete an object when the last reference is removed + */ + VOID STDCALL_FUNC (*Delete)(PVOID ObjectBody); + + /* + * PURPOSE: Called when an open attempts to open a file apparently + * residing within the object + * RETURNS + * STATUS_SUCCESS NextObject was found + * STATUS_UNSUCCESSFUL NextObject not found + * STATUS_REPARSE Path changed, restart parsing the path + */ + NTSTATUS STDCALL_FUNC (*Parse)(PVOID ParsedObject, + PVOID *NextObject, + PUNICODE_STRING FullPath, + PWSTR *Path, + ULONG Attributes); + + /* + * PURPOSE: Called to set, query, delete or assign a security-descriptor + * to the object + * RETURNS + * STATUS_SUCCESS NextObject was found + */ + NTSTATUS STDCALL_FUNC (*Security)(PVOID ObjectBody, + SECURITY_OPERATION_CODE OperationCode, + SECURITY_INFORMATION SecurityInformation, + PSECURITY_DESCRIPTOR SecurityDescriptor, + PULONG BufferLength); + + /* + * PURPOSE: Called to query the name of the object + * RETURNS + * STATUS_SUCCESS NextObject was found + */ + NTSTATUS STDCALL_FUNC (*QueryName)(PVOID ObjectBody, + POBJECT_NAME_INFORMATION ObjectNameInfo, + ULONG Length, + PULONG ReturnLength); + + /* + * PURPOSE: Called when a process asks to close the object + */ + VOID STDCALL_FUNC (*OkayToClose)(VOID); + + NTSTATUS STDCALL_FUNC (*Create)(PVOID ObjectBody, + PVOID Parent, + PWSTR RemainingPath, + struct _OBJECT_ATTRIBUTES* ObjectAttributes); + + VOID STDCALL_FUNC (*DuplicationNotify)(PEPROCESS DuplicateTo, + PEPROCESS DuplicateFrom, + PVOID Object); +} OBJECT_TYPE; + + + +typedef struct _OBJECT_HEADER +/* + * PURPOSE: Header for every object managed by the object manager + */ +{ + UNICODE_STRING Name; + LIST_ENTRY Entry; + LONG RefCount; + LONG HandleCount; + BOOLEAN CloseInProcess; + BOOLEAN Permanent; + BOOLEAN Inherit; + struct _DIRECTORY_OBJECT* Parent; + POBJECT_TYPE ObjectType; + PSECURITY_DESCRIPTOR SecurityDescriptor; + + /* + * PURPOSE: Object type + * NOTE: This overlaps the first member of the object body + */ + CSHORT Type; + + /* + * PURPOSE: Object size + * NOTE: This overlaps the second member of the object body + */ + CSHORT Size; + + +} OBJECT_HEADER, *POBJECT_HEADER; + + typedef struct _DIRECTORY_OBJECT { CSHORT Type; _____ Modified: trunk/reactos/ntoskrnl/io/driver.c --- trunk/reactos/ntoskrnl/io/driver.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/io/driver.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -97,8 +97,8 @@ IoDriverObjectType->Tag = TAG('D', 'R', 'V', 'R'); IoDriverObjectType->TotalObjects = 0; IoDriverObjectType->TotalHandles = 0; - IoDriverObjectType->MaxObjects = ULONG_MAX; - IoDriverObjectType->MaxHandles = ULONG_MAX; + IoDriverObjectType->PeakObjects = 0; + IoDriverObjectType->PeakHandles = 0; IoDriverObjectType->PagedPoolCharge = 0; IoDriverObjectType->NonpagedPoolCharge = sizeof(DRIVER_OBJECT); IoDriverObjectType->Dump = NULL; _____ Modified: trunk/reactos/ntoskrnl/io/iocomp.c --- trunk/reactos/ntoskrnl/io/iocomp.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/io/iocomp.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -123,8 +123,8 @@ RtlCreateUnicodeString(&ExIoCompletionType->TypeName, L"IoCompletion"); ExIoCompletionType->Tag = IOC_TAG; - ExIoCompletionType->MaxObjects = ULONG_MAX; - ExIoCompletionType->MaxHandles = ULONG_MAX; + ExIoCompletionType->PeakObjects = 0; + ExIoCompletionType->PeakHandles = 0; ExIoCompletionType->TotalObjects = 0; ExIoCompletionType->TotalHandles = 0; ExIoCompletionType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/io/iomgr.c --- trunk/reactos/ntoskrnl/io/iomgr.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/io/iomgr.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: iomgr.c,v 1.55 2004/12/21 18:37:28 gvg Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -395,8 +395,8 @@ IoDeviceObjectType->Tag = TAG_DEVICE_TYPE; IoDeviceObjectType->TotalObjects = 0; IoDeviceObjectType->TotalHandles = 0; - IoDeviceObjectType->MaxObjects = ULONG_MAX; - IoDeviceObjectType->MaxHandles = ULONG_MAX; + IoDeviceObjectType->PeakObjects = 0; + IoDeviceObjectType->PeakHandles = 0; IoDeviceObjectType->PagedPoolCharge = 0; IoDeviceObjectType->NonpagedPoolCharge = sizeof (DEVICE_OBJECT); IoDeviceObjectType->Mapping = &IopFileMapping; @@ -424,8 +424,8 @@ IoFileObjectType->Tag = TAG_FILE_TYPE; IoFileObjectType->TotalObjects = 0; IoFileObjectType->TotalHandles = 0; - IoFileObjectType->MaxObjects = ULONG_MAX; - IoFileObjectType->MaxHandles = ULONG_MAX; + IoFileObjectType->PeakObjects = 0; + IoFileObjectType->PeakHandles = 0; IoFileObjectType->PagedPoolCharge = 0; IoFileObjectType->NonpagedPoolCharge = sizeof(FILE_OBJECT); IoFileObjectType->Mapping = &IopFileMapping; @@ -451,8 +451,8 @@ sizeof (OBJECT_TYPE)); RtlZeroMemory(IoAdapterObjectType, sizeof(OBJECT_TYPE)); IoAdapterObjectType->Tag = TAG_ADAPTER_TYPE; - IoAdapterObjectType->MaxObjects = ULONG_MAX; - IoAdapterObjectType->MaxHandles = ULONG_MAX; + IoAdapterObjectType->PeakObjects = 0; + IoAdapterObjectType->PeakHandles = 0; IoDeviceObjectType->Mapping = &IopFileMapping; RtlRosInitUnicodeStringFromLiteral(&IoAdapterObjectType->TypeName, L"Adapter"); ObpCreateTypeObject(IoAdapterObjectType); _____ Modified: trunk/reactos/ntoskrnl/lpc/port.c --- trunk/reactos/ntoskrnl/lpc/port.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/lpc/port.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -44,8 +44,8 @@ RtlRosInitUnicodeStringFromLiteral(&LpcPortObjectType->TypeName,L"Port") ; LpcPortObjectType->Tag = TAG('L', 'P', 'R', 'T'); - LpcPortObjectType->MaxObjects = ULONG_MAX; - LpcPortObjectType->MaxHandles = ULONG_MAX; + LpcPortObjectType->PeakObjects = 0; + LpcPortObjectType->PeakHandles = 0; LpcPortObjectType->TotalObjects = 0; LpcPortObjectType->TotalHandles = 0; LpcPortObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/mm/section.c --- trunk/reactos/ntoskrnl/mm/section.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/mm/section.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -2148,8 +2148,8 @@ MmSectionObjectType->Tag = TAG('S', 'E', 'C', 'T'); MmSectionObjectType->TotalObjects = 0; MmSectionObjectType->TotalHandles = 0; - MmSectionObjectType->MaxObjects = ULONG_MAX; - MmSectionObjectType->MaxHandles = ULONG_MAX; + MmSectionObjectType->PeakObjects = 0; + MmSectionObjectType->PeakHandles = 0; MmSectionObjectType->PagedPoolCharge = 0; MmSectionObjectType->NonpagedPoolCharge = sizeof(SECTION_OBJECT); MmSectionObjectType->Mapping = &MmpSectionMapping; _____ Modified: trunk/reactos/ntoskrnl/nt/evtpair.c --- trunk/reactos/ntoskrnl/nt/evtpair.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/evtpair.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: evtpair.c,v 1.23 2004/09/28 15:02:29 weiden Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -66,8 +66,8 @@ RtlCreateUnicodeString(&ExEventPairObjectType->TypeName, L"EventPair"); ExEventPairObjectType->Tag = TAG('E', 'v', 'P', 'a'); - ExEventPairObjectType->MaxObjects = ULONG_MAX; - ExEventPairObjectType->MaxHandles = ULONG_MAX; + ExEventPairObjectType->PeakObjects = 0; + ExEventPairObjectType->PeakHandles = 0; ExEventPairObjectType->TotalObjects = 0; ExEventPairObjectType->TotalHandles = 0; ExEventPairObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/nt/mutant.c --- trunk/reactos/ntoskrnl/nt/mutant.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/mutant.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -81,8 +81,8 @@ RtlCreateUnicodeString(&ExMutantObjectType->TypeName, L"Mutant"); ExMutantObjectType->Tag = TAG('M', 'T', 'N', 'T'); - ExMutantObjectType->MaxObjects = ULONG_MAX; - ExMutantObjectType->MaxHandles = ULONG_MAX; + ExMutantObjectType->PeakObjects = 0; + ExMutantObjectType->PeakHandles = 0; ExMutantObjectType->TotalObjects = 0; ExMutantObjectType->TotalHandles = 0; ExMutantObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/nt/ntevent.c --- trunk/reactos/ntoskrnl/nt/ntevent.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/ntevent.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -70,8 +70,8 @@ RtlCreateUnicodeString(&ExEventObjectType->TypeName, L"Event"); ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T'); - ExEventObjectType->MaxObjects = ULONG_MAX; - ExEventObjectType->MaxHandles = ULONG_MAX; + ExEventObjectType->PeakObjects = 0; + ExEventObjectType->PeakHandles = 0; ExEventObjectType->TotalObjects = 0; ExEventObjectType->TotalHandles = 0; ExEventObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/nt/ntsem.c --- trunk/reactos/ntoskrnl/nt/ntsem.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/ntsem.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: ntsem.c,v 1.24 2004/12/26 17:48:19 navaraf Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -52,8 +52,8 @@ RtlCreateUnicodeString(&ExSemaphoreObjectType->TypeName, L"Semaphore"); ExSemaphoreObjectType->Tag = TAG('S', 'E', 'M', 'T'); - ExSemaphoreObjectType->MaxObjects = ULONG_MAX; - ExSemaphoreObjectType->MaxHandles = ULONG_MAX; + ExSemaphoreObjectType->PeakObjects = 0; + ExSemaphoreObjectType->PeakHandles = 0; ExSemaphoreObjectType->TotalObjects = 0; ExSemaphoreObjectType->TotalHandles = 0; ExSemaphoreObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/nt/nttimer.c --- trunk/reactos/ntoskrnl/nt/nttimer.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/nttimer.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: nttimer.c,v 1.26 2004/10/24 16:49:49 weiden Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -119,8 +119,8 @@ RtlCreateUnicodeString(&ExTimerType->TypeName, L"Timer"); ExTimerType->Tag = TAG('T', 'I', 'M', 'T'); - ExTimerType->MaxObjects = ULONG_MAX; - ExTimerType->MaxHandles = ULONG_MAX; + ExTimerType->PeakObjects = 0; + ExTimerType->PeakHandles = 0; ExTimerType->TotalObjects = 0; ExTimerType->TotalHandles = 0; ExTimerType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/nt/profile.c --- trunk/reactos/ntoskrnl/nt/profile.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/nt/profile.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -371,8 +371,8 @@ RtlCreateUnicodeString(&ExProfileObjectType->TypeName, L"Profile"); ExProfileObjectType->Tag = TAG('P', 'R', 'O', 'F'); - ExProfileObjectType->MaxObjects = ULONG_MAX; - ExProfileObjectType->MaxHandles = ULONG_MAX; + ExProfileObjectType->PeakObjects = 0; + ExProfileObjectType->PeakHandles = 0; ExProfileObjectType->TotalObjects = 0; ExProfileObjectType->TotalHandles = 0; ExProfileObjectType->PagedPoolCharge = 0; _____ Modified: trunk/reactos/ntoskrnl/ob/namespc.c --- trunk/reactos/ntoskrnl/ob/namespc.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ob/namespc.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: namespc.c,v 1.50 2004/11/21 10:59:10 weiden Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -376,8 +376,8 @@ ObDirectoryType->Tag = TAG('D', 'I', 'R', 'T'); ObDirectoryType->TotalObjects = 0; ObDirectoryType->TotalHandles = 0; - ObDirectoryType->MaxObjects = ULONG_MAX; - ObDirectoryType->MaxHandles = ULONG_MAX; + ObDirectoryType->PeakObjects = 0; + ObDirectoryType->PeakHandles = 0; ObDirectoryType->PagedPoolCharge = 0; ObDirectoryType->NonpagedPoolCharge = sizeof(DIRECTORY_OBJECT); ObDirectoryType->Mapping = &ObpDirectoryMapping; @@ -401,8 +401,8 @@ ObTypeObjectType->Tag = TAG('T', 'y', 'p', 'T'); ObTypeObjectType->TotalObjects = 0; ObTypeObjectType->TotalHandles = 0; - ObTypeObjectType->MaxObjects = ULONG_MAX; - ObTypeObjectType->MaxHandles = ULONG_MAX; + ObTypeObjectType->PeakObjects = 0; + ObTypeObjectType->PeakHandles = 0; ObTypeObjectType->PagedPoolCharge = 0; ObTypeObjectType->NonpagedPoolCharge = sizeof(TYPE_OBJECT); ObTypeObjectType->Mapping = &ObpTypeMapping; _____ Modified: trunk/reactos/ntoskrnl/ob/symlink.c --- trunk/reactos/ntoskrnl/ob/symlink.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ob/symlink.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -1,4 +1,4 @@ -/* $Id: symlink.c,v 1.12 2004/10/25 14:22:21 blight Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -165,8 +165,8 @@ ObSymbolicLinkType->Tag = TAG('S', 'Y', 'M', 'T'); ObSymbolicLinkType->TotalObjects = 0; ObSymbolicLinkType->TotalHandles = 0; - ObSymbolicLinkType->MaxObjects = ULONG_MAX; - ObSymbolicLinkType->MaxHandles = ULONG_MAX; + ObSymbolicLinkType->PeakObjects = 0; + ObSymbolicLinkType->PeakHandles = 0; ObSymbolicLinkType->PagedPoolCharge = 0; ObSymbolicLinkType->NonpagedPoolCharge = sizeof(SYMLINK_OBJECT); ObSymbolicLinkType->Mapping = &ObpSymbolicLinkMapping; _____ Modified: trunk/reactos/ntoskrnl/ps/job.c --- trunk/reactos/ntoskrnl/ps/job.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ps/job.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -47,8 +47,8 @@ PsJobType->Tag = TAG('E', 'J', 'O', 'B'); PsJobType->TotalObjects = 0; PsJobType->TotalHandles = 0; - PsJobType->MaxObjects = ULONG_MAX; - PsJobType->MaxHandles = ULONG_MAX; + PsJobType->PeakObjects = 0; + PsJobType->PeakHandles = 0; PsJobType->PagedPoolCharge = 0; PsJobType->NonpagedPoolCharge = sizeof(EJOB); PsJobType->Mapping = &PiJobMapping; _____ Modified: trunk/reactos/ntoskrnl/ps/process.c --- trunk/reactos/ntoskrnl/ps/process.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ps/process.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -258,8 +258,8 @@ PsProcessType->Tag = TAG('P', 'R', 'O', 'C'); PsProcessType->TotalObjects = 0; PsProcessType->TotalHandles = 0; - PsProcessType->MaxObjects = ULONG_MAX; - PsProcessType->MaxHandles = ULONG_MAX; + PsProcessType->PeakObjects = 0; + PsProcessType->PeakHandles = 0; PsProcessType->PagedPoolCharge = 0; PsProcessType->NonpagedPoolCharge = sizeof(EPROCESS); PsProcessType->Mapping = &PiProcessMapping; _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -684,8 +684,8 @@ PsThreadType->Tag = TAG('T', 'H', 'R', 'T'); PsThreadType->TotalObjects = 0; PsThreadType->TotalHandles = 0; - PsThreadType->MaxObjects = 0; - PsThreadType->MaxHandles = 0; + PsThreadType->PeakObjects = 0; + PsThreadType->PeakHandles = 0; PsThreadType->PagedPoolCharge = 0; PsThreadType->NonpagedPoolCharge = sizeof(ETHREAD); PsThreadType->Mapping = &PiThreadMapping; _____ Modified: trunk/reactos/ntoskrnl/se/token.c --- trunk/reactos/ntoskrnl/se/token.c 2005-01-04 04:09:04 UTC (rev 12778) +++ trunk/reactos/ntoskrnl/se/token.c 2005-01-04 04:45:00 UTC (rev 12779) @@ -538,8 +538,8 @@ SepTokenObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); SepTokenObjectType->Tag = TAG('T', 'O', 'K', 'T'); - SepTokenObjectType->MaxObjects = ULONG_MAX; - SepTokenObjectType->MaxHandles = ULONG_MAX; + SepTokenObjectType->PeakObjects = 0; + SepTokenObjectType->PeakHandles = 0; SepTokenObjectType->TotalObjects = 0; SepTokenObjectType->TotalHandles = 0; SepTokenObjectType->PagedPoolCharge = 0;
19 years, 10 months
1
0
0
0
[royce] 12778: proper destruction for Project objects
by royce@svn.reactos.com
proper destruction for Project objects Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 04:04:32 UTC (rev 12777) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 04:09:04 UTC (rev 12778) @@ -280,6 +280,12 @@ return e; } +Project::~Project() +{ + for ( size_t i = 0; i < modules.size(); i++ ) + delete modules[i]; +} + void Project::ProcessXML ( const XMLElement& e, const string& path ) { const XMLAttribute *att; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 04:04:32 UTC (rev 12777) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 04:09:04 UTC (rev 12778) @@ -59,6 +59,7 @@ std::string name; std::vector<Module*> modules; + ~Project(); void ProcessXML ( const XMLElement& e, const std::string& path ); };
19 years, 10 months
1
0
0
0
[royce] 12777: initial code to step through tree looking for modules, and calculating their relative paths, for now just print out our findings and clean up.
by royce@svn.reactos.com
initial code to step through tree looking for modules, and calculating their relative paths, for now just print out our findings and clean up. Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-01-04 04:03:57 UTC (rev 12776) +++ branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-01-04 04:04:32 UTC (rev 12777) @@ -1,5 +1,13 @@ #include "rbuild.h" -Module::Module(XMLElement moduleNode) -{ +using std::string; +using std::vector; + +Module::Module ( const XMLElement& moduleNode, + const string& moduleName, + const string& modulePath) + : node(moduleNode), + name(moduleName), + path(modulePath) +{ } _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 04:03:57 UTC (rev 12776) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.cpp 2005-01-04 04:04:32 UTC (rev 12777) @@ -9,6 +9,9 @@ #include <assert.h> #include "rbuild.h" +using std::string; +using std::vector; + #ifdef _MSC_VER unsigned __int64 #else @@ -118,26 +121,25 @@ { } -XMLAttribute::XMLAttribute(const XMLAttribute& src) +XMLElement::XMLElement() { - name = src.name; - value = src.value; } -XMLAttribute& XMLAttribute::operator=(const XMLAttribute& src) +XMLElement::~XMLElement() { - name = src.name; - value = src.value; - return *this; + size_t i; + for ( i = 0; i < attributes.size(); i++ ) + delete attributes[i]; + for ( i = 0; i < subElements.size(); i++ ) + delete subElements[i]; } - -XMLElement::XMLElement() -{ -} - -// Parse() returns true if you need to look for a </tag> for -// this one... +// Parse() +// This function takes a single xml tag ( i.e. beginning with '<' and +// ending with '>', and parses out it's tag name and constituent +// attributes. +// Return Value: returns true if you need to look for a </tag> for +// the one it just parsed... bool XMLElement::Parse(const string& token, bool& end_tag) { @@ -198,12 +200,31 @@ p++; p += strspn ( p, WS ); } - attributes.push_back ( XMLAttribute ( attribute, value ) ); + attributes.push_back ( new XMLAttribute ( attribute, value ) ); } return !( *p == '/' ) && !end_tag; } +const XMLAttribute* XMLElement::GetAttribute ( const string& attribute ) const +{ + // this would be faster with a tree-based container, but our attribute + // lists are likely to stay so short as to not be an issue. + for ( int i = 0; i < attributes.size(); i++ ) + { + if ( attribute == attributes[i]->name ) + return attributes[i]; + } + return NULL; +} +// XMLParse() +// This function reads a "token" from the file loaded in XMLFile +// REM TODO FIXME: At the moment it can't handle comments or non-xml tags. +// if it finds a tag that is non-singular, it parses sub-elements and/or +// inner text into the XMLElement that it is building to return. +// Return Value: an XMLElement allocated via the new operator that contains +// it's parsed data. Keep calling this function until it returns NULL +// (no more data) XMLElement* XMLParse(XMLFile& f, bool* pend_tag = NULL) { @@ -259,19 +280,80 @@ return e; } +void Project::ProcessXML ( const XMLElement& e, const string& path ) +{ + const XMLAttribute *att; + string subpath(path); + if ( e.name == "project" ) + { + att = e.GetAttribute ( "name" ); + if ( !att ) + name = "Unnamed"; + else + name = att->value; + } + else if ( e.name == "module" ) + { + att = e.GetAttribute ( "name" ); + if ( !att ) + { + printf ( "syntax error: 'name' attribute required for <module>\n" ); + return; + } + Module* module = new Module ( e, att->value, path ); + modules.push_back ( module ); + return; // REM TODO FIXME no processing of modules... yet + } + else if ( e.name == "directory" ) + { + const XMLAttribute* att = e.GetAttribute("name"); + if ( !att ) + { + printf ( "syntax error: 'name' attribute required for <directory>\n" ); + return; + } + subpath = path + "/" + att->value; + } + for ( size_t i = 0; i < e.subElements.size(); i++ ) + ProcessXML ( *e.subElements[i], subpath ); +} + int main ( int argc, char** argv ) { XMLFile f; - if ( !f.open ( "rbuild.xml" ) ) + if ( !f.open ( "ReactOS.xml" ) ) { - printf ( "couldn't open rbuild.xml!\n" ); + printf ( "couldn't open ReactOS.xml!\n" ); return -1; } - XMLElement* head = XMLParse(f); - if (head) + for ( ;; ) { - // REM TODO FIXME actually do something with the parsed info + XMLElement* head = XMLParse ( f ); + if ( !head ) + break; // end of file + + if ( head->name != "project" ) + { + printf ( "error: expecting 'project', got '%s'\n", head->name.c_str() ); + continue; + } + + Project* proj = new Project; + proj->ProcessXML ( *head, "." ); + + // REM TODO FIXME actually do something with Project object... + printf ( "Found %lu modules:\n", proj->modules.size() ); + for ( size_t i = 0; i < proj->modules.size(); i++ ) + { + Module& m = *proj->modules[i]; + printf ( "\t%s in folder: %s\n", + m.name.c_str(), + m.path.c_str() ); + } + + delete proj; + delete head; } return 0; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 04:03:57 UTC (rev 12776) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-04 04:04:32 UTC (rev 12777) @@ -4,9 +4,6 @@ #include <string> #include <vector> -using std::string; -using std::vector; - class XMLFile { friend class XMLElement; @@ -17,11 +14,11 @@ void next_token(); bool next_is_text(); bool more_tokens(); - bool get_token(string& token); + bool get_token(std::string& token); private: - vector<FILE*> _f; - string _buf; + std::vector<FILE*> _f; + std::string _buf; const char *_p, *_end; }; @@ -30,35 +27,51 @@ class XMLAttribute { public: - string name; - string value; + std::string name; + std::string value; XMLAttribute(); - XMLAttribute ( const string& name_, const string& value_ ); -// : name(name_), value(value_); - XMLAttribute ( const XMLAttribute& src ); - XMLAttribute& operator = ( const XMLAttribute& src ); + XMLAttribute ( const std::string& name_, const std::string& value_ ); }; class XMLElement { public: - string name; - vector<XMLAttribute> attributes; - vector<XMLElement*> subElements; - string value; + std::string name; + std::vector<XMLAttribute*> attributes; + std::vector<XMLElement*> subElements; + std::string value; XMLElement(); - bool Parse(const string& token, + ~XMLElement(); + bool Parse(const std::string& token, bool& end_tag); + const XMLAttribute* GetAttribute ( const std::string& attribute ) const; }; +class Project; +class Module; +class Project +{ +public: + std::string name; + std::vector<Module*> modules; + + void ProcessXML ( const XMLElement& e, const std::string& path ); +}; + class Module { public: - Module(XMLElement moduleNode); + const XMLElement& node; + std::string name; + std::string path; + + Module ( const XMLElement& moduleNode, + const std::string& moduleName, + const std::string& modulePath ); }; #endif /* __RBUILD_H */ _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-01-04 04:03:57 UTC (rev 12776) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-01-04 04:04:32 UTC (rev 12777) @@ -110,10 +110,10 @@ } if (numberOfFailedTests > 0) - printf("%d tests failed", + printf("%d tests failed\n", numberOfFailedTests); else - printf("All tests succeeded"); + printf("All tests succeeded\n"); } private:
19 years, 10 months
1
0
0
0
[sedwards] 12776: added a port of netkit ftp.exe
by sedwards@svn.reactos.com
added a port of netkit ftp.exe Added: trunk/reactos/apps/utils/net/ftp/ Added: trunk/reactos/apps/utils/net/ftp/cmds.c Added: trunk/reactos/apps/utils/net/ftp/cmdtab.c Added: trunk/reactos/apps/utils/net/ftp/domacro.c Added: trunk/reactos/apps/utils/net/ftp/fake.c Added: trunk/reactos/apps/utils/net/ftp/fake.h Added: trunk/reactos/apps/utils/net/ftp/ftp.c Added: trunk/reactos/apps/utils/net/ftp/ftp.mak Added: trunk/reactos/apps/utils/net/ftp/ftp.mak.orig Added: trunk/reactos/apps/utils/net/ftp/ftp.rc Added: trunk/reactos/apps/utils/net/ftp/ftp_var.h Added: trunk/reactos/apps/utils/net/ftp/main.c Added: trunk/reactos/apps/utils/net/ftp/makefile Added: trunk/reactos/apps/utils/net/ftp/pathnames.h Added: trunk/reactos/apps/utils/net/ftp/prototypes.h Added: trunk/reactos/apps/utils/net/ftp/ruserpass.c _____ Added: trunk/reactos/apps/utils/net/ftp/cmds.c --- trunk/reactos/apps/utils/net/ftp/cmds.c 2005-01-04 03:10:07 UTC (rev 12775) +++ trunk/reactos/apps/utils/net/ftp/cmds.c 2005-01-04 04:03:57 UTC (rev 12776) @@ -0,0 +1,2376 @@ +/* + * Copyright (c) 1985, 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)cmds.c 5.18 (Berkeley) 4/20/89"; +#endif /* not lint */ + +/* + * FTP User Program -- Command Routines. + */ +//#include <sys/param.h> +//#include <sys/wait.h> +#include <sys/stat.h> +#if !defined(WIN32) +#include <sys/socket.h> +#include <arpa/ftp.h> +#include <netinet/in.h> +#include <netdb.h> +#else +#include <winsock.h> +#endif + +#include <signal.h> +#include <direct.h> +#include <stdio.h> +#include <errno.h> +#include <ctype.h> +#include <time.h> + +#include "ftp_var.h" +#include "pathnames.h" +#include "prototypes.h" + +extern char *globerr; +extern char **glob(); +extern char home[]; +extern char *remglob(); +extern char *getenv(); +extern int allbinary; +extern off_t restart_point; +extern char reply_string[]; + +char *mname; +jmp_buf jabort; +char *dotrans(), *domap(); + +extern short portnum; +extern char *hostname; +extern int autologin; +/* + * Connect to peer server and + * auto-login, if possible. + */ +void setpeer(int argc, char *argv[]) +{ + char *host, *hookup(); + + if (connected) { + printf("Already connected to %s, use close first.\n", + hostname); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(to) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc > 3) { + printf("usage: %s host-name [port]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc > 2) { + portnum = atoi(argv[2]); + if (portnum <= 0) { + printf("%s: bad port number-- %s\n", argv[1], argv[2]); + printf ("usage: %s host-name [port]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + portnum = htons(portnum); + } + host = hookup(argv[1], portnum); + if (host) { +#if defined(unix) && NBBY == 8 + int overbose; +#endif + connected = 1; + if (autologin) + (void) login(argv[1]); + +#if defined(unix) && NBBY == 8 +/* + * this ifdef is to keep someone form "porting" this to an incompatible + * system and not checking this out. This way they have to think about it. + */ + overbose = verbose; + if (debug == 0) + verbose = -1; + allbinary = 0; + if (command("SYST") == COMPLETE && overbose) { + register char *cp, c; + cp = index(reply_string+4, ' '); + if (cp == NULL) + cp = index(reply_string+4, '\r'); + if (cp) { + if (cp[-1] == '.') + cp--; + c = *cp; + *cp = '\0'; + } + + printf("Remote system type is %s.\n", + reply_string+4); + if (cp) + *cp = c; + } + if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) { + setbinary(); + /* allbinary = 1; this violates the RFC */ + if (overbose) + printf("Using %s mode to transfer files.\n", + typename); + } else if (overbose && + !strncmp(reply_string, "215 TOPS20", 10)) { + printf( +"Remember to set tenex mode when transfering binary files from this machine.\n"); + } + verbose = overbose; +#endif /* unix */ + } + (void) fflush(stdout); +} + +struct types { + char *t_name; + char *t_mode; + int t_type; + char *t_arg; +} types[] = { + { "ascii", "A", TYPE_A, 0 }, + { "binary", "I", TYPE_I, 0 }, + { "image", "I", TYPE_I, 0 }, + { "ebcdic", "E", TYPE_E, 0 }, + { "tenex", "L", TYPE_L, bytename }, + 0 +}; + +/* + * Set transfer type. + */ +void settype(argc, argv) + char *argv[]; +{ + register struct types *p; + int comret; + + if (argc > 2) { + char *sep; + + printf("usage: %s [", argv[0]); + sep = " "; + for (p = types; p->t_name; p++) { + printf("%s%s", sep, p->t_name); + if (*sep == ' ') + sep = " | "; + } + printf(" ]\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 2) { + printf("Using %s mode to transfer files.\n", typename); + (void) fflush(stdout); + code = 0; + return; + } + for (p = types; p->t_name; p++) + if (strcmp(argv[1], p->t_name) == 0) + break; + if (p->t_name == 0) { + printf("%s: unknown mode\n", argv[1]); + (void) fflush(stdout); + code = -1; + return; + } + if ((p->t_arg != NULL) && (*(p->t_arg) != '\0')) + comret = command ("TYPE %s %s", p->t_mode, p->t_arg); + else + comret = command("TYPE %s", p->t_mode); + if (comret == COMPLETE) { + (void) strcpy(typename, p->t_name); + type = p->t_type; + } +} + +char *stype[] = { + "type", + "", + 0 +}; + +/* + * Set binary transfer type. + */ +/*VARARGS*/ +void setbinary() +{ + stype[1] = "binary"; + settype(2, stype); +} + +/* + * Set ascii transfer type. + */ +/*VARARGS*/ +void setascii() +{ + stype[1] = "ascii"; + settype(2, stype); +} + +/* + * Set tenex transfer type. + */ +/*VARARGS*/ +void settenex() +{ + stype[1] = "tenex"; + settype(2, stype); +} + +/* + * Set ebcdic transfer type. + */ +/*VARARGS*/ +void setebcdic() +{ + stype[1] = "ebcdic"; + settype(2, stype); +} + +/* + * Set file transfer mode. + */ +#if 0 +/*ARGSUSED*/ +void setmode(argc, argv) + char *argv[]; +{ + + printf("We only support %s mode, sorry.\n", modename); + (void) fflush(stdout); + code = -1; +} +#endif + +/* + * Set file transfer format. + */ +/*ARGSUSED*/ +void setform(argc, argv) + char *argv[]; +{ + + printf("We only support %s format, sorry.\n", formname); + (void) fflush(stdout); + code = -1; +} + +/* + * Set file transfer structure. + */ +/*ARGSUSED*/ +void setstruct(argc, argv) + char *argv[]; +{ + + printf("We only support %s structure, sorry.\n", structname); + (void) fflush(stdout); + code = -1; +} + +/* + * Send a single file. + */ +void put(argc, argv) + int argc; + char *argv[]; +{ + char *cmd; + int loc = 0; + char *oldargv1, *oldargv2; + + if (argc == 2) { + argc++; + argv[2] = argv[1]; + loc++; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(local-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { +usage: + printf("usage:%s local-file remote-file\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(remote-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) + goto usage; + oldargv1 = argv[1]; + oldargv2 = argv[2]; + if (!globulize(&argv[1])) { + code = -1; + return; + } + /* + * If "globulize" modifies argv[1], and argv[2] is a copy of + * the old argv[1], make it a copy of the new argv[1]. + */ + if (argv[1] != oldargv1 && argv[2] == oldargv1) { + argv[2] = argv[1]; + } + cmd = (argv[0][0] == 'a') ? "APPE" : ((sunique) ? "STOU" : "STOR"); + if (loc && ntflag) { + argv[2] = dotrans(argv[2]); + } + if (loc && mapflag) { + argv[2] = domap(argv[2]); + } + sendrequest(cmd, argv[1], argv[2], + argv[1] != oldargv1 || argv[2] != oldargv2); +} + +/* + * Send multiple files. + */ +void mput(argc, argv) + char *argv[]; +{ + register int i; + int ointer; + void mabort(); + extern jmp_buf jabort; + char *tp; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(local-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s local-files\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT, mabort); + (void) setjmp(jabort); + if (proxy) { + char *cp, *tp2, tmpbuf[MAXPATHLEN]; + + while ((cp = remglob(argv,0)) != NULL) { + if (*cp == 0) { + mflag = 0; + continue; + } + if (mflag && confirm(argv[0], cp)) { + tp = cp; + if (mcase) { + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = cp; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + } + tp = tmpbuf; + } + if (ntflag) { + tp = dotrans(tp); + } + if (mapflag) { + tp = domap(tp); + } + sendrequest((sunique) ? "STOU" : "STOR", + cp, tp, cp != tp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; + return; + } + for (i = 1; i < argc; i++) { + register char **cpp, **gargs; + + if (!doglob) { + if (mflag && confirm(argv[0], argv[i])) { + tp = (ntflag) ? dotrans(argv[i]) : argv[i]; + tp = (mapflag) ? domap(tp) : tp; + sendrequest((sunique) ? "STOU" : "STOR", + argv[i], tp, tp != argv[i] || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + continue; + } + gargs = glob(argv[i]); + if (globerr != NULL) { + printf("%s\n", globerr); + (void) fflush(stdout); + if (gargs) { + blkfree(gargs); + free((char *)gargs); + } + continue; + } + for (cpp = gargs; cpp && *cpp != NULL; cpp++) { + if (mflag && confirm(argv[0], *cpp)) { + tp = (ntflag) ? dotrans(*cpp) : *cpp; + tp = (mapflag) ? domap(tp) : tp; + sendrequest((sunique) ? "STOU" : "STOR", + *cpp, tp, *cpp != tp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + } + if (gargs != NULL) { + blkfree(gargs); + free((char *)gargs); + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; +} + +void reget(argc, argv) + char *argv[]; +{ + (void) getit(argc, argv, 1, "r+w"); +} + +void get(argc, argv) + char *argv[]; +{ + (void) getit(argc, argv, 0, restart_point ? "r+w" : "w" ); +} + +/* + * Receive one file. + */ +int getit(argc, argv, restartit, mode) + char *argv[]; + char *mode; +{ + int loc = 0; + char *oldargv1, *oldargv2; + + if (argc == 2) { + argc++; + argv[2] = argv[1]; + loc++; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { +usage: + printf("usage: %s remote-file [ local-file ]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return (0); + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(local-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) + goto usage; + oldargv1 = argv[1]; + oldargv2 = argv[2]; + if (!globulize(&argv[2])) { + code = -1; + return (0); + } + if (loc && mcase) { + char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN]; + + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = argv[2]; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + argv[2] = tmpbuf; + } + } + if (loc && ntflag) + argv[2] = dotrans(argv[2]); + if (loc && mapflag) + argv[2] = domap(argv[2]); + if (restartit) { + struct stat stbuf; + int ret; + + ret = stat(argv[2], &stbuf); + if (restartit == 1) { + if (ret < 0) { + perror(argv[2]); + return (0); + } + restart_point = stbuf.st_size; + } else { + if (ret == 0) { + int overbose; + + overbose = verbose; + if (debug == 0) + verbose = -1; + if (command("MDTM %s", argv[1]) == COMPLETE) { + int yy, mo, day, hour, min, sec; + struct tm *tm; + verbose = overbose; + sscanf(reply_string, + "%*s %04d%02d%02d%02d%02d%02d", + &yy, &mo, &day, &hour, &min, &sec); + tm = gmtime(&stbuf.st_mtime); + tm->tm_mon++; + if (tm->tm_year > yy%100) + return (1); + else if (tm->tm_year == yy%100) { + if (tm->tm_mon > mo) + return (1); + } else if (tm->tm_mon == mo) { + if (tm->tm_mday > day) + return (1); + } else if (tm->tm_mday == day) { + if (tm->tm_hour > hour) + return (1); + } else if (tm->tm_hour == hour) { + if (tm->tm_min > min) + return (1); + } else if (tm->tm_min == min) { + if (tm->tm_sec > sec) + return (1); + } + } else { + printf("%s\n", reply_string); + (void) fflush(stdout); + verbose = overbose; + return (0); + } + } + } + } + + recvrequest("RETR", argv[2], argv[1], mode, + argv[1] != oldargv1 || argv[2] != oldargv2); + restart_point = 0; + return (0); +} + +void +mabort() +{ + int ointer; + extern jmp_buf jabort; + + printf("\n"); + (void) fflush(stdout); + if (mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with", mname)) { + interactive = ointer; + longjmp(jabort,0); + } + interactive = ointer; + } + mflag = 0; + longjmp(jabort,0); +} + +/* + * Get multiple files. + */ +void mget(argc, argv) + char *argv[]; +{ + char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN]; + int ointer; + void mabort(); + extern jmp_buf jabort; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s remote-files\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT,mabort); + (void) setjmp(jabort); + while ((cp = remglob(argv,proxy)) != NULL) { + if (*cp == '\0') { + mflag = 0; + continue; + } + if (mflag && confirm(argv[0], cp)) { + tp = cp; + if (mcase) { + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = cp; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + } + tp = tmpbuf; + } + if (ntflag) { + tp = dotrans(tp); + } + if (mapflag) { + tp = domap(tp); + } + recvrequest("RETR", tp, cp, "w", + tp != cp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mget")) { + mflag++; + } + interactive = ointer; + } + } + } +// (void) signal(SIGINT,oldintr); + mflag = 0; +} + +char * +remglob(argv,doswitch) + char *argv[]; + int doswitch; +{ + char temp[16]; + static char buf[MAXPATHLEN]; + static FILE *ftemp = NULL; + static char **args; + int oldverbose, oldhash; + char *cp, *mode; + + if (!mflag) { + if (!doglob) { + args = NULL; + } + else { + if (ftemp) { + (void) fclose(ftemp); + ftemp = NULL; + } + } + return(NULL); + } + if (!doglob) { + if (args == NULL) + args = argv; + if ((cp = *++args) == NULL) + args = NULL; + return (cp); + } + if (ftemp == NULL) { + (void) strcpy(temp, _PATH_TMP); + (void) mktemp(temp); + oldverbose = verbose, verbose = 0; + oldhash = hash, hash = 0; + if (doswitch) { + pswitch(!proxy); + } + for (mode = "w"; *++argv != NULL; mode = "a") + recvrequest ("NLST", temp, *argv, mode, 0); + if (doswitch) { + pswitch(!proxy); + } + verbose = oldverbose; hash = oldhash; + ftemp = fopen(temp, "r"); + (void) unlink(temp); + if (ftemp == NULL) { + printf("can't find list of remote files, oops\n"); + (void) fflush(stdout); + return (NULL); + } + } + if (fgets(buf, sizeof (buf), ftemp) == NULL) { + (void) fclose(ftemp), ftemp = NULL; + return (NULL); + } + if ((cp = index(buf, '\n')) != NULL) + *cp = '\0'; + return (buf); +} + +char * +onoff(bool) + int bool; +{ + + return (bool ? "on" : "off"); +} + +/* + * Show status. + */ +/*ARGSUSED*/ +void status(argc, argv) + char *argv[]; +{ + int i; + + if (connected) + printf("Connected to %s.\n", hostname); + else + printf("Not connected.\n"); + if (!proxy) { + pswitch(1); + if (connected) { + printf("Connected for proxy commands to %s.\n", hostname); + } + else { + printf("No proxy connection.\n"); + } + pswitch(0); + } + printf("Mode: %s; Type: %s; Form: %s; Structure: %s\n", + modename, typename, formname, structname); + printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n", + onoff(verbose), onoff(bell), onoff(interactive), + onoff(doglob)); + printf("Store unique: %s; Receive unique: %s\n", onoff(sunique), + onoff(runique)); + printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag)); + if (ntflag) { + printf("Ntrans: (in) %s (out) %s\n", ntin,ntout); + } + else { + printf("Ntrans: off\n"); + } + if (mapflag) { + printf("Nmap: (in) %s (out) %s\n", mapin, mapout); + } + else { + printf("Nmap: off\n"); + } + printf("Hash mark printing: %s; Use of PORT cmds: %s\n", + onoff(hash), onoff(sendport)); + if (macnum > 0) { + printf("Macros:\n"); + for (i=0; i<macnum; i++) { + printf("\t%s\n",macros[i].mac_name); + } + } + (void) fflush(stdout); + code = 0; +} + +/* + * Set beep on cmd completed mode. + */ +/*VARARGS*/ +void setbell() +{ + + bell = !bell; + printf("Bell mode %s.\n", onoff(bell)); + (void) fflush(stdout); + code = bell; +} + +/* + * Turn on packet tracing. + */ +/*VARARGS*/ +void settrace() +{ + + trace = !trace; + printf("Packet tracing %s.\n", onoff(trace)); + (void) fflush(stdout); + code = trace; +} + +/* + * Toggle hash mark printing during transfers. + */ +/*VARARGS*/ +void sethash() +{ + + hash = !hash; + printf("Hash mark printing %s", onoff(hash)); + code = hash; + if (hash) + printf(" (%d bytes/hash mark)", 1024); + printf(".\n"); + (void) fflush(stdout); +} + +/* + * Turn on printing of server echo's. + */ +/*VARARGS*/ +void setverbose() +{ + + verbose = !verbose; + printf("Verbose mode %s.\n", onoff(verbose)); + (void) fflush(stdout); + code = verbose; +} + +/* + * Toggle PORT cmd use before each data connection. + */ +/*VARARGS*/ +void setport() +{ + + sendport = !sendport; + printf("Use of PORT cmds %s.\n", onoff(sendport)); + (void) fflush(stdout); + code = sendport; +} + +/* + * Turn on interactive prompting + * during mget, mput, and mdelete. + */ +/*VARARGS*/ +void setprompt() +{ + + interactive = !interactive; + printf("Interactive mode %s.\n", onoff(interactive)); + (void) fflush(stdout); + code = interactive; +} + +/* + * Toggle metacharacter interpretation + * on local file names. + */ +/*VARARGS*/ +void setglob() +{ + + doglob = !doglob; + printf("Globbing %s.\n", onoff(doglob)); + (void) fflush(stdout); + code = doglob; +} + +/* + * Set debugging mode on/off and/or + * set level of debugging. + */ +/*VARARGS*/ +void setdebug(argc, argv) + char *argv[]; +{ + int val; + + if (argc > 1) { + val = atoi(argv[1]); + if (val < 0) { + printf("%s: bad debugging value.\n", argv[1]); + (void) fflush(stdout); + code = -1; + return; + } + } else + val = !debug; + debug = val; + if (debug) + options |= SO_DEBUG; + else + options &= ~SO_DEBUG; [truncated at 1000 lines; 5858 more skipped]
19 years, 10 months
1
0
0
0
[royce] 12775: don't pass vector<pointer> by value unless you are looking for trouble, also fixed Assert() to take stdargs to make it's usage simpler and less error-prone. Also fixed IsTrue(), etc, to take file and line info by args and created macros to pass that info automatically.
by royce@svn.reactos.com
don't pass vector<pointer> by value unless you are looking for trouble, also fixed Assert() to take stdargs to make it's usage simpler and less error-prone. Also fixed IsTrue(), etc, to take file and line info by args and created macros to pass that info automatically. Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h --- branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-01-04 01:51:16 UTC (rev 12774) +++ branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-01-04 03:10:07 UTC (rev 12775) @@ -11,17 +11,29 @@ virtual ~BaseTest(); virtual void Run() = 0; protected: - void Assert(char *message); - void IsTrue(bool condition); - void IsFalse(bool condition); + void Assert(const char *message, ...); + void IsTrue(bool condition, + const char* file, + int line ); + void IsFalse(bool condition, + const char* file, + int line ); void AreEqual(int expected, - int actual); + int actual, + const char* file, + int line ); void AreNotEqual(int expected, - int actual); + int actual, + const char* file, + int line ); private: void Fail(); }; +#define IS_TRUE(condition) IsTrue(condition,__FILE__,__LINE__) +#define IS_FALSE(condition) IsFalse(condition,__FILE__,__LINE__) +#define ARE_EQUAL(expected,actual) AreEqual(expected,actual,__FILE__,__LINE__) +#define ARE_NOT_EQUAL(expected,actual) AreNotEqual(expected,actual,__FILE__,__LINE__) class ModuleTest : public BaseTest { _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-01-04 01:51:16 UTC (rev 12774) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp 2005-01-04 03:10:07 UTC (rev 12775) @@ -1,3 +1,4 @@ +#include <stdarg.h> #include "rbuild.h" #include "test.h" @@ -10,69 +11,68 @@ { } -void BaseTest::Assert(char *message) +void BaseTest::Assert(const char *message, ...) { - printf(message); + va_list args; + va_start ( args, message ); + vprintf(message, args); + va_end ( args ); Fail(); } -void BaseTest::IsTrue(bool condition) +void BaseTest::IsTrue(bool condition, + const char* file, + int line) { if (!condition) { - char message[100]; - sprintf(message, - "Condition was not true at %s:%d", - __FILE__, - __LINE__); - Assert(message); + Assert("Condition was not true at %s:%d\n", + file, + line); } } -void BaseTest::IsFalse(bool condition) +void BaseTest::IsFalse(bool condition, + const char* file, + int line) { if (condition) { - char message[100]; - sprintf(message, - "Condition was not false at %s:%d", - __FILE__, - __LINE__); - Assert(message); + Assert("Condition was not false at %s:%d\n", + file, + line); } } void BaseTest::AreEqual(int expected, - int actual) + int actual, + const char* file, + int line) { if (actual != expected) { - char message[100]; - sprintf(message, - "Expected %d/0x%.08x was %d/0x%.08x at %s:%d", - expected, - expected, - actual, - actual, - __FILE__, - __LINE__); - Assert(message); + Assert("Expected %d/0x%.08x was %d/0x%.08x at %s:%d\n", + expected, + expected, + actual, + actual, + file, + line); } } void BaseTest::AreNotEqual(int expected, - int actual) + int actual, + const char* file, + int line) { if (actual == expected) { - char message[100]; - sprintf(message, - "Actual value expected to be different from %d/0x%.08x at %s:%d", - expected, - expected, - __FILE__, - __LINE__); - Assert(message); + Assert("Actual value expected to be different from %d/0x%.08x at %s:%d\n", + expected, + expected, + file, + line); } } @@ -99,11 +99,12 @@ void Run() { int numberOfFailedTests = 0; - BaseTestList tests = GetTests(); + BaseTestList tests; + GetTests(tests); for (size_t i = 0; i < tests.size(); i++) { BaseTest& test = *tests[i]; - /*test.Run();*/ + test.Run(); if (test.Failed) numberOfFailedTests++; } @@ -116,11 +117,9 @@ } private: - BaseTestList GetTests() + void GetTests ( BaseTestList& tests ) { - BaseTestList tests; tests.push_back(new ModuleTest()); - return tests; } }; @@ -128,7 +127,7 @@ int main(int argc, char** argv) { - TestDispatcher testDispatcher = TestDispatcher(); + TestDispatcher testDispatcher; testDispatcher.Run(); return 0; }; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp 2005-01-04 01:51:16 UTC (rev 12774) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp 2005-01-04 03:10:07 UTC (rev 12775) @@ -2,5 +2,5 @@ void ModuleTest::Run() { - IsTrue(false); + IS_TRUE(false); }
19 years, 10 months
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200