Changeset 5317 for trunk/tools
- Timestamp:
- Mar 14, 2001, 9:17:52 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/fastdep/fastdep.c
r5282 r5317 1 /* $Id: fastdep.c,v 1.2 5 2001-03-02 11:23:24 phallerExp $1 /* $Id: fastdep.c,v 1.26 2001-03-14 20:17:52 bird Exp $ 2 2 * 3 3 * Fast dependents. (Fast = Quick and Dirty!) 4 4 * 5 * Copyright (c) 1999-200 0knut st. osmundsen5 * Copyright (c) 1999-2001 knut st. osmundsen 6 6 * 7 7 * PH 2001-03-01 added optional support for a super-dependency … … 17 17 #define INCL_FILEMGR 18 18 19 /* 20 * Size of the \n charater (forget '\r'). 21 * If you're compiling this under a UNICODE system this may perhaps change, 22 * but I doubd that fastdep will work at all under a UNICODE system. ;-) 23 */ 24 #if defined(UNICODE) && !defined(__WIN32OS2__) 25 #define CBNEWLINE (2) 26 #else 27 #define CBNEWLINE (1) 28 #endif 29 30 19 31 20 32 /******************************************************************************* 21 33 * Header Files * 22 34 *******************************************************************************/ 35 #if defined(OS2FAKE) 36 #include "os2fake.h" 37 #else 23 38 #include <os2.h> 39 #endif 40 24 41 #include <stdio.h> 25 42 #include <string.h> … … 726 743 int i; 727 744 745 728 746 /* 729 747 * If append option is specified we'll have to read the existing dep file … … 817 835 { 818 836 printf( 819 "FastDep v0.3 1\n"837 "FastDep v0.32\n" 820 838 "Dependency scanner. Creates a makefile readable depend file.\n" 821 839 " - was quick and dirty, now it's just quick -\n" … … 850 868 " -obr-: No object rule, rule for source filename is generated.\n" 851 869 " -obj[ ]<objext> Object extention. Default: obj\n" 852 " -s <name> Insert super-dependency on top of tree, Default: alltargets:\n" 870 " -s[ ][name] Insert super-dependency on top of tree.\n" 871 " If not specified name defaults to 'alltargets'.\n" 872 " Default: disabled\n" 853 873 " -r[ ]<rsrcext> Resource binary extention. Default: res\n" 854 874 " -x[ ]<f1[;f2]> Files to exclude. Only exact filenames.\n" … … 856 876 "\n" 857 877 "Options and files could be mixed.\n" 858 " copyright (c) 1999-200 0 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)\n",878 " copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)\n", 859 879 pszDefaultDepFile 860 880 ); … … 2577 2597 int cch; 2578 2598 2579 /* PH Note: might not be CRLF on other platforms */2580 int iCRLF = strlen("\n");2581 2582 2583 2599 /* @@@PH 2001-03-01 2584 2600 * If option is selected to generate a parent … … 2612 2628 2613 2629 /* Add two new lines. Flush buffer first if necessary. */ 2614 if (iBuffer + iCRLF + iCRLF>= sizeof(szBuffer))2630 if (iBuffer + CBNEWLINE*2 >= sizeof(szBuffer)) 2615 2631 { 2616 2632 fwrite(szBuffer, iBuffer, 1, phFile); … … 2620 2636 /* add 2 linefeeds */ 2621 2637 strcpy(szBuffer + iBuffer, "\n\n"); 2622 iBuffer += iCRLF + iCRLF;2638 iBuffer += CBNEWLINE*2; 2623 2639 } 2624 2640 … … 2659 2675 2660 2676 /* Add two new lines. Flush buffer first if necessary. */ 2661 if (iBuffer + iCRLF + iCRLF>= sizeof(szBuffer))2677 if (iBuffer + CBNEWLINE*2 >= sizeof(szBuffer)) 2662 2678 { 2663 2679 fwrite(szBuffer, iBuffer, 1, phFile); … … 2667 2683 /* add 2 linefeeds */ 2668 2684 strcpy(szBuffer + iBuffer, "\n\n"); 2669 iBuffer += iCRLF + iCRLF;2685 iBuffer += CBNEWLINE*2; 2670 2686 2671 2687 /* next rule */ … … 2879 2895 2880 2896 2897 2898 2881 2899 /* 2882 2900 * Testing purpose. 2883 2901 */ 2902 #if !defined(OS2FAKE) 2884 2903 #include <os2.h> 2904 #endif 2885 2905 #ifdef OLEMANN 2886 2906 #include "olemann.h" … … 2889 2909 2890 2910 2911
Note:
See TracChangeset
for help on using the changeset viewer.