Minor cleanups; fix copyright notices
parent
d9328473d1
commit
d632a1dfc7
|
@ -19,7 +19,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="FFI;WIN32"
|
||||
PreprocessorDefinitions="FFI;WIN32;F_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
|
@ -70,7 +70,7 @@
|
|||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
PreprocessorDefinitions="FFI;WIN32"
|
||||
PreprocessorDefinitions="FFI;WIN32;F_DEBUG"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
|
@ -138,6 +138,9 @@
|
|||
<File
|
||||
RelativePath="native\cons.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\native\debug.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="native\error.c">
|
||||
</File>
|
||||
|
@ -391,6 +394,9 @@
|
|||
<File
|
||||
RelativePath="native\cons.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\native\debug.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="native\error.h">
|
||||
</File>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2003, 2004 Slava Pestov.
|
||||
! Copyright (C) 2003, 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
@ -59,6 +59,9 @@ SYMBOL: callbacks
|
|||
f free-list set
|
||||
] extend io-queue set ;
|
||||
|
||||
: add-completion ( handle -- )
|
||||
completion-port get NULL 1 CreateIoCompletionPort drop ;
|
||||
|
||||
: get-access ( -- file-mode )
|
||||
"file-mode" get uncons
|
||||
GENERIC_WRITE 0 ? >r
|
||||
|
@ -79,7 +82,7 @@ SYMBOL: callbacks
|
|||
cons "file-mode" set
|
||||
get-access get-sharemode NULL get-create FILE_FLAG_OVERLAPPED NULL
|
||||
CreateFile dup INVALID_HANDLE_VALUE = [ win32-throw-error ] when
|
||||
dup completion-port get NULL 1 CreateIoCompletionPort drop
|
||||
dup add-completion
|
||||
] with-scope ;
|
||||
|
||||
BEGIN-STRUCT: indirect-pointer
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
@ -79,8 +79,8 @@ SYMBOL: socket
|
|||
: <win32-client-stream> ( buf stream -- stream )
|
||||
[
|
||||
buffer-ptr <alien> 0 32 32
|
||||
<sockaddr-in> dup >r <indirect-pointer> <sockaddr-in> dup >r over
|
||||
GetAcceptExSockaddrs r> r> drop
|
||||
<sockaddr-in> dup >r <indirect-pointer> <sockaddr-in> dup >r
|
||||
<indirect-pointer> GetAcceptExSockaddrs r> r> drop
|
||||
dup sockaddr-in-port ntohs swap sockaddr-in-addr inet-ntoa
|
||||
[ , ":" , unparse , ] make-string "client" set
|
||||
] extend ;
|
||||
|
@ -88,7 +88,7 @@ SYMBOL: socket
|
|||
C: win32-server ( port -- server )
|
||||
[
|
||||
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
|
||||
] extend ;
|
||||
|
||||
|
@ -97,18 +97,13 @@ M: win32-server fclose ( server -- )
|
|||
|
||||
M: win32-server accept ( server -- client )
|
||||
[
|
||||
new-socket 1024 <buffer>
|
||||
[
|
||||
new-socket "ns" set 1024 <buffer> "buf" set
|
||||
[
|
||||
alloc-io-task init-overlapped >r
|
||||
socket get "ns" get "buf" get buffer-ptr <alien> 0
|
||||
"sockaddr-in" size 16 + dup NULL r> AcceptEx
|
||||
alloc-io-task init-overlapped >r >r >r socket get r> r>
|
||||
buffer-ptr <alien> 0 "sockaddr-in" size 16 + dup NULL r> AcceptEx
|
||||
[ handle-socket-error ] unless (yield)
|
||||
] callcc0
|
||||
"buf" get "ns" get
|
||||
dup completion-port get NULL 1 CreateIoCompletionPort drop
|
||||
<win32-stream> <win32-client-stream>
|
||||
"buf" get buffer-free
|
||||
] with-scope
|
||||
swap dup add-completion <win32-stream> dupd <win32-client-stream>
|
||||
swap buffer-free
|
||||
] bind ;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
! $Id$
|
||||
!
|
||||
! Copyright (C) 2004 Slava Pestov.
|
||||
! Copyright (C) 2004 Mackenzie Straight.
|
||||
!
|
||||
! Redistribution and use in source and binary forms, with or without
|
||||
! modification, are permitted provided that the following conditions are met:
|
||||
|
|
Loading…
Reference in New Issue