Minor changes to remove warnings "memmory" -> "memory" Modified: trunk/reactos/subsys/system/cmd/dir.c Modified: trunk/reactos/subsys/system/cmd/todo.txt _____
Modified: trunk/reactos/subsys/system/cmd/dir.c --- trunk/reactos/subsys/system/cmd/dir.c 2005-03-08 19:03:11 UTC (rev 13882) +++ trunk/reactos/subsys/system/cmd/dir.c 2005-03-08 19:19:45 UTC (rev 13883) @@ -1646,9 +1646,9 @@
if ((ptrStartNode = malloc(sizeof(struct TDirFindListNode))) == NULL) { #ifdef _DEBUG - ConErrPrintf("DEBUG: Cannot allocate memmory for ptrStartNode!\n"); + ConErrPrintf("DEBUG: Cannot allocate memory for ptrStartNode!\n"); #endif - return 1; /* Error cannot allocate memmory for 1st object */ + return 1; /* Error cannot allocate memory for 1st object */ } ptrNextNode = ptrStartNode;
@@ -1701,6 +1701,7 @@ } }while(FindNextFile(hSearch,&wfdFileInfo)); + FindClose(hSearch);
/* Terminate list */ ptrNextNode->ptrNext = NULL; @@ -1710,7 +1711,7 @@ if (!(ptrFileArray)) { #ifdef _DEBUG - ConErrPrintf("DEBUG: Cannot allocate memmory for ptrFileArray!\n"); + ConErrPrintf("DEBUG: Cannot allocate memory for ptrFileArray!\n"); #endif goto _DirList_clear_n_exit; } @@ -1732,6 +1733,9 @@
/* Print Data */ DirPrintFiles(ptrFileArray, dwCount, szFullPath, lpFlags); + + /* Free array */ + free(ptrFileArray);
/* Print Directory Summary */ /* Condition to print summary is: @@ -1774,10 +1778,11 @@ } } }while(FindNextFile(hRecSearch,&wfdFileInfo)); + FindClose(hRecSearch); }
_DirList_clear_n_exit: -/* Deallocate memmory */ +/* Deallocate memory */ /* Free linked list */ while (ptrStartNode) { @@ -1786,15 +1791,7 @@ ptrStartNode = ptrNextNode; dwCount --; } - /* Free array */ - free(ptrFileArray);
- /* Close Handles */ - if (hSearch != INVALID_HANDLE_VALUE) - FindClose(hSearch); - if (hRecSearch != INVALID_HANDLE_VALUE) - FindClose(hRecSearch); - return 0; }
_____
Modified: trunk/reactos/subsys/system/cmd/todo.txt --- trunk/reactos/subsys/system/cmd/todo.txt 2005-03-08 19:03:11 UTC (rev 13882) +++ trunk/reactos/subsys/system/cmd/todo.txt 2005-03-08 19:19:45 UTC (rev 13883) @@ -5,8 +5,6 @@
Optimize the code! For size and speed. There are numerous places where the code is hardly optimal for either.
-Sorting in DIR command ("dir /o..."). - ^S and ^Q to pause/resume displays.
Improve DEL, COPY and MOVE commands.