Author: peterw Date: Sat Dec 8 15:45:02 2007 New Revision: 31067
URL: http://svn.reactos.org/svn/reactos?rev=31067&view=rev Log: - Stop scut from listing the default shortcut and inform the user there are no shortcuts if none are found. - Fix six memory leaks in scut (who added these? :P).
Modified: trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt trunk/tools/RosBE/RosBE-Windows/Tools/echoh.c trunk/tools/RosBE/RosBE-Windows/Tools/info.txt trunk/tools/RosBE/RosBE-Windows/Tools/scut.c trunk/tools/RosBE/Tools/SVN-Readme.txt
Modified: trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Chan... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt Sat Dec 8 15:45:02 2007 @@ -27,6 +27,9 @@ - Switch default install directory back to PROGRAMFILES\RosBE. (Peter Ward) - Detect if running on a x64 system and install to "Program Files" and not "Program Files (x86)" to avoid problems with (). (Peter Ward) - Add a "Standard MinGW Build Environment" and the associated MinGW.cmd + an icon. (Peter Ward) +- Make tee read and write in blocks so it's much faster. (Peter Ward) +- Stop scut from listing the default shortcut and inform the user there are no shortcuts if none are found. (Peter Ward) +- Fix six memory leaks in scut (who added these? :P). (Peter Ward)
*** Nov 18th, 2007 - RosBE 1.0 Released
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/echoh.c URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/ech... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Tools/echoh.c (original) +++ trunk/tools/RosBE/RosBE-Windows/Tools/echoh.c Sat Dec 8 15:45:02 2007 @@ -10,8 +10,10 @@ #include <stdio.h> #include <stdlib.h>
-int main(int argc, char** argv) { - if (argc == 2) - printf("%x", atoi(argv[1])); - return 0; +int main(int argc, char** argv) +{ + if (argc == 2) + printf("%x", atoi(argv[1])); + + return 0; }
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/info.txt URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/inf... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Tools/info.txt (original) +++ trunk/tools/RosBE/RosBE-Windows/Tools/info.txt Sat Dec 8 15:45:02 2007 @@ -1,4 +1,4 @@ Additional Tools needed: svn: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
-Built Tools and Rest needs to be copied to /Root/Tools/ +Built Tools and Rest needs to be copied to /Components/Tools/
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/scut.c URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/scu... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Tools/scut.c (original) +++ trunk/tools/RosBE/RosBE-Windows/Tools/scut.c Sat Dec 8 15:45:02 2007 @@ -25,6 +25,7 @@ char* programname; char rosbeappdata[248]; char shortcutfile[260]; +int hasshortcuts = 0;
PSHORTCUT addshortcut(PSHORTCUT ptr, char* name, char* path); void checkfile(void); @@ -93,12 +94,24 @@ shortcuts = readshortcuts(); current = shortcuts;
- printf("All available shortcuts:\n\n"); - while(current) - { - printf("Shortcut Name: %s\n", current->name); - printf(" -> Path: %s\n", current->path); - current = current->next; + if (hasshortcuts) + { + printf("All available shortcuts:\n\n"); + while(current) + { + if (!_stricmp(current->name, "Default")) + { + current = current->next; + continue; + } + printf("Shortcut Name: %s\n", current->name); + printf(" -> Path: %s\n", current->path); + current = current->next; + } + } + else + { + printf("No shortcuts found, use 'scut add' to create one.\n"); } freeshortcuts(shortcuts); } @@ -119,7 +132,10 @@ fflush(stdin);
if(!fgets(name, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(name) <= 1);
strcpy(name, strtok(name, "\n")); @@ -142,7 +158,10 @@ fflush(stdin);
if(!fgets(path, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(path) <= 1);
strcpy(path, strtok(path, "\n")); @@ -176,7 +195,10 @@ fflush(stdin);
if(!fgets(name, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(name) <= 1);
strcpy(name, strtok(name, "\n")); @@ -226,7 +248,10 @@ fflush(stdin);
if(!fgets(name, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(name) <= 1);
strcpy(name, strtok(name, "\n")); @@ -253,7 +278,10 @@ fflush(stdin);
if(!fgets(path, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(path) <= 1);
strcpy(path, strtok(path, "\n")); @@ -293,7 +321,10 @@ fflush(stdin);
if(!fgets(name, 260, stdin)) - return 1; + { + freeshortcuts(shortcuts); + return -1; + } } while(strlen(name) <= 1);
strcpy(name, strtok(name, "\n")); @@ -311,6 +342,11 @@ } else { + if (argc > 2) + { + fprintf(stderr, "%s: Error too many parameters specified.\n", programname); + return -1; + } shortcuts = readshortcuts(); current = shortcuts;
@@ -569,6 +605,11 @@ path = strtok(NULL, "\n"); if (name && path) { + if (_stricmp(name, "Default") && + !hasshortcuts) + { + hasshortcuts = 1; + } head = addshortcut(head, name, path); } }
Modified: trunk/tools/RosBE/Tools/SVN-Readme.txt URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/Tools/SVN-Readme.txt?re... ============================================================================== --- trunk/tools/RosBE/Tools/SVN-Readme.txt (original) +++ trunk/tools/RosBE/Tools/SVN-Readme.txt Sat Dec 8 15:45:02 2007 @@ -2,7 +2,7 @@
For RosBE-Windows ------------------ - The built tools need to be copied to RosBE-Windows\Root\Tools + The built tools need to be copied to RosBE-Windows\Components\Tools
For RosBE-Unix ---------------