]> gitweb.factorcode.org Git - factor.git/commitdiff
Minor cleanups; fix copyright notices
authorMackenzie Straight <eizneckam@gmail.com>
Wed, 29 Dec 2004 07:16:03 +0000 (07:16 +0000)
committerMackenzie Straight <eizneckam@gmail.com>
Wed, 29 Dec 2004 07:16:03 +0000 (07:16 +0000)
factor.vcproj
library/bootstrap/win32-io.factor
library/io/buffer.factor
library/io/win32-console.factor
library/io/win32-io-internals.factor
library/io/win32-server.factor
library/io/win32-stream.factor
library/win32/win32-errors.factor
library/win32/win32-io.factor
library/win32/winsock.factor

index 0f86356cea11004ff2b802f1e56c21d49a6d8698..6726f24b2c810e70e95ff1feaaa145cd4509a5a2 100644 (file)
@@ -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"
                        <File
                                RelativePath="native\cons.c">
                        </File>
+                       <File
+                               RelativePath=".\native\debug.c">
+                       </File>
                        <File
                                RelativePath="native\error.c">
                        </File>
                        <File
                                RelativePath="native\cons.h">
                        </File>
+                       <File
+                               RelativePath=".\native\debug.h">
+                       </File>
                        <File
                                RelativePath="native\error.h">
                        </File>
index 561adcd24fd0fc10ba08cb31437171f7ec85bad0..2cfe934d43b3ea61df15bc89a6fb1886fc247604 100644 (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:
index 0a44ef07168b19d6586eca99e9731419ce677808..bfbec80db50929c055a71a702b338cbd64593bd6 100644 (file)
@@ -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:
index d9cdd346057d094bf6bc8968d3fb88fb366cd08c..5f5cbb82f35349e8a1a5acef2ad2236f039a22b9 100644 (file)
@@ -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:
index 5ba9da2ddb830e82ae21b14ec166f48d3ce8f73e..2796a6506f35de04bf98e65b3edc25aeda3a7de2 100644 (file)
@@ -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
index 24004b591329a11db2f2ddc808ee6825a356cd46..ee1dc3d80add6e6d4c7db8c2b8cd03df370d7695 100644 (file)
@@ -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
-                [ 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
+            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
+        swap dup add-completion <win32-stream> dupd <win32-client-stream>
+        swap buffer-free
     ] bind ;
 
index 34ffd52fa33f53354d2658b95a6926578509c622..9b12faf0983c1bb642b369b57bc825ce15a24f8a 100644 (file)
@@ -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:
index 541b6876ab64061764801a83c3ef307ed792af2d..5cb481271d6d52c1acf6f1f4824e308dfe7c4146 100644 (file)
@@ -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:
index e4b906d538c045b66bb9d410c0afc45715dd9796..ecebf9d05499c2fa8f201c9b88c30c1c937358a9 100644 (file)
@@ -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:
index 27f1d83fafc579fe53d13249269bc84b2ce3dce4..407c37457aa423219a4016aa31b6fe6fcb6207f8 100644 (file)
@@ -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: