Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/mty-makai/mty.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 238 by notanpe, Wed Feb 17 09:26:53 2010 UTC revision 250 by notanpe, Wed Dec 22 09:04:00 2010 UTC
# Line 21  Line 21 
21  #include <sys/timeb.h>  #include <sys/timeb.h>
22  #include <sys/types.h>  #include <sys/types.h>
23    
24  #include <unistd.h>  #ifndef __ICL
25  #include <libgen.h>   #include <unistd.h>
26     #include <libgen.h>
27    #endif /* not __ICL */
28    
29  #include <limits.h>  #include <limits.h>
30  #ifdef REON  #ifdef REON
31   #ifdef ONI   #ifdef ONI
# Line 1274  thread_crypt64(void *a_param) Line 1277  thread_crypt64(void *a_param)
1277          }          }
1278  }  }
1279    
1280    char
1281    *bname( char *path )
1282    {
1283      char  *p;
1284    
1285    #ifdef OLDEBUG
1286      printf( "path <%s>\n", path );
1287    #endif /* DEBUG */
1288    
1289      for ( p = path; *p != '\0'; p++ )
1290       ;
1291      while ( *p != '/' && *p != '\\' && p != path ) {
1292       if ( *p == '.' ) {
1293        *p = '\0';
1294       }
1295       p--;
1296      }
1297      if ( p != path ) {
1298       p++;
1299      }
1300    
1301    #ifdef OLDEBUG
1302      printf( "p <%s>\n", p );
1303    #endif /* DEBUG */
1304    
1305      return( p );
1306    }
1307    
1308  void  void
1309  usage( path )  usage( path )
1310  char    *path;  char    *path;
1311  {  {
1312    char  *myName, *chPtr;    char  *myName;
1313    
1314    myName = basename( path );    myName = bname( path );
   for ( chPtr = myName; *chPtr != '\0'; chPtr++ ) {  
    if ( *chPtr == '.' ) {  
     *chPtr = '\0';  
     break;  
    }  
   }  
1315  #ifdef ALLKEY  #ifdef ALLKEY
1316    printf( "%s [-t num] [-m mask] [-s num] [-g num] [-k salt] [-v] [\"str\"]\n", myName );    printf( "%s [-t num] [-m mask] [-s num] [-g num] [-k salt] [-v] [\"str\"]\n", myName );
1317  #else /* ALLKEY */  #else /* ALLKEY */
# Line 1678  main(int argc, char *argv[]) Line 1703  main(int argc, char *argv[])
1703     if ( gear != DEF_GEAR ) {     if ( gear != DEF_GEAR ) {
1704      printf( "がんばりぐあい : %d\n", gear );      printf( "がんばりぐあい : %d\n", gear );
1705     }     }
1706    #ifdef KEYLOG
1707       if ( keyLog == MAKAI_TRUE ) {
1708        printf( "検索したキー空間のロギング\n" );
1709       }
1710    #endif /* KEYLOG */
1711    }    }
1712    
1713    /* コードを生成・展開    /* コードを生成・展開

Legend:
Removed from v.238  
changed lines
  Added in v.250

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26