Minor cleanups; fix copyright notices

cvs
Mackenzie Straight 2004-12-29 07:16:03 +00:00
parent d9328473d1
commit d632a1dfc7
10 changed files with 31 additions and 27 deletions

View File

@ -19,7 +19,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="FFI;WIN32" PreprocessorDefinitions="FFI;WIN32;F_DEBUG"
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="5" RuntimeLibrary="5"
@ -70,7 +70,7 @@
GlobalOptimizations="TRUE" GlobalOptimizations="TRUE"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OmitFramePointers="TRUE" OmitFramePointers="TRUE"
PreprocessorDefinitions="FFI;WIN32" PreprocessorDefinitions="FFI;WIN32;F_DEBUG"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="4" RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
@ -138,6 +138,9 @@
<File <File
RelativePath="native\cons.c"> RelativePath="native\cons.c">
</File> </File>
<File
RelativePath=".\native\debug.c">
</File>
<File <File
RelativePath="native\error.c"> RelativePath="native\error.c">
</File> </File>
@ -391,6 +394,9 @@
<File <File
RelativePath="native\cons.h"> RelativePath="native\cons.h">
</File> </File>
<File
RelativePath=".\native\debug.h">
</File>
<File <File
RelativePath="native\error.h"> RelativePath="native\error.h">
</File> </File>

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2003, 2004 Slava Pestov. ! Copyright (C) 2003, 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:
@ -59,6 +59,9 @@ SYMBOL: callbacks
f free-list set f free-list set
] extend io-queue set ; ] extend io-queue set ;
: add-completion ( handle -- )
completion-port get NULL 1 CreateIoCompletionPort drop ;
: get-access ( -- file-mode ) : get-access ( -- file-mode )
"file-mode" get uncons "file-mode" get uncons
GENERIC_WRITE 0 ? >r GENERIC_WRITE 0 ? >r
@ -79,7 +82,7 @@ SYMBOL: callbacks
cons "file-mode" set cons "file-mode" set
get-access get-sharemode NULL get-create FILE_FLAG_OVERLAPPED NULL get-access get-sharemode NULL get-create FILE_FLAG_OVERLAPPED NULL
CreateFile dup INVALID_HANDLE_VALUE = [ win32-throw-error ] when CreateFile dup INVALID_HANDLE_VALUE = [ win32-throw-error ] when
dup completion-port get NULL 1 CreateIoCompletionPort drop dup add-completion
] with-scope ; ] with-scope ;
BEGIN-STRUCT: indirect-pointer BEGIN-STRUCT: indirect-pointer

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:
@ -79,8 +79,8 @@ SYMBOL: socket
: <win32-client-stream> ( buf stream -- stream ) : <win32-client-stream> ( buf stream -- stream )
[ [
buffer-ptr <alien> 0 32 32 buffer-ptr <alien> 0 32 32
<sockaddr-in> dup >r <indirect-pointer> <sockaddr-in> dup >r over <sockaddr-in> dup >r <indirect-pointer> <sockaddr-in> dup >r
GetAcceptExSockaddrs r> r> drop <indirect-pointer> GetAcceptExSockaddrs r> r> drop
dup sockaddr-in-port ntohs swap sockaddr-in-addr inet-ntoa dup sockaddr-in-port ntohs swap sockaddr-in-addr inet-ntoa
[ , ":" , unparse , ] make-string "client" set [ , ":" , unparse , ] make-string "client" set
] extend ; ] extend ;
@ -88,7 +88,7 @@ SYMBOL: socket
C: win32-server ( port -- server ) C: win32-server ( port -- server )
[ [
maybe-init-winsock new-socket swap over bind-socket dup listen-socket maybe-init-winsock new-socket swap over bind-socket dup listen-socket
dup completion-port get NULL 1 CreateIoCompletionPort drop dup add-completion
socket set socket set
] extend ; ] extend ;
@ -97,18 +97,13 @@ M: win32-server fclose ( server -- )
M: win32-server accept ( server -- client ) M: win32-server accept ( server -- client )
[ [
new-socket 1024 <buffer>
[ [
new-socket "ns" set 1024 <buffer> "buf" set alloc-io-task init-overlapped >r >r >r socket get r> r>
[ buffer-ptr <alien> 0 "sockaddr-in" size 16 + dup NULL r> AcceptEx
alloc-io-task init-overlapped >r [ handle-socket-error ] unless (yield)
socket get "ns" get "buf" get buffer-ptr <alien> 0 ] callcc0
"sockaddr-in" size 16 + dup NULL r> AcceptEx swap dup add-completion <win32-stream> dupd <win32-client-stream>
[ handle-socket-error ] unless (yield) swap buffer-free
] callcc0
"buf" get "ns" get
dup completion-port get NULL 1 CreateIoCompletionPort drop
<win32-stream> <win32-client-stream>
"buf" get buffer-free
] with-scope
] bind ; ] bind ;

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met:

View File

@ -2,7 +2,7 @@
! $Id$ ! $Id$
! !
! Copyright (C) 2004 Slava Pestov. ! Copyright (C) 2004 Mackenzie Straight.
! !
! Redistribution and use in source and binary forms, with or without ! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met: ! modification, are permitted provided that the following conditions are met: