dosccpp 发表于 2009-10-6 22:44:29

病***毒程序,仅供研究!

/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
* treepath.C -
*   
\*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
#include<stdlib.h>
#include<stdio.h>
#include<assert.h>
#include<string.h>
#include"generic.h"
#include"sarray.h"
#include"Tree.h"
#include"Misc.h"
#include"treepath.h"
/*--- Constants ---*/

/*--- Start of Code ---*/

voidTreePath::init( char* line, FILE* fl )
{
    charbuf[ LINE_SIZE ];
    line_typeword;
    char* start_brace, * end_brace, * str;
    strcpy( buf, line );
    while( ! str_is_close_brace( line ) ) {
      if( ! getLine( fl, line ) ) {
            fprintf( stderr, "Unexpected end of file!\n" );
            exit( -1 );
      }
      strcat( buf, line );
    }
   
    start_brace = (char *)str_pos_unquoted( buf, '{' );
    end_brace = (char *)str_pos_unquoted( buf, '}' );
   
    if( ( start_brace == NULL )||( end_brace == NULL ) )
      my_error( "Either { or } missing in line!\n" );
    str = start_brace + 1;
    while( *str != '}' ) {
      str_skip( str, " \t\n," );
      if( *str == '}' )
            break;
      if( *str != '"' ) {
            fprintf( stderr, "Unexpected character encountered: [%c]\n",
                     *str );
            exit( -1 );
      }
      
      str_get_quoted_word( str, word );
      
      push( word );
    }
    if( str != end_brace )
      my_error( "Unbalanced braces!\n" );
    str++;
   
    strcpy( new_file_name, str );
    str_kill_empty_suffix_prefix( new_file_name );
    if( strlen( new_file_name ) <= 0 )
      my_error( "No filename given for filename!" );
}

    /*
filename { "Bookmarks",
         "Computers",
         "Computer Science",
         "Computatoional Geometry" }cg_links.html
    */


/* treepath.C - End of File ------------------------------------------*/

Oo乖咕噜oO 发表于 2009-10-7 09:05:44

这是病毒程序吗 ?    你好厉害哦

数据丢失 发表于 2009-10-7 13:48:16

什么毒.......................

yangxi1215 发表于 2009-10-7 19:26:32

没看明白有说明吗?

m461945983 发表于 2009-10-7 21:14:57

什么东西啊!不懂!

jiang_qinggen 发表于 2009-10-9 20:15:25

呵呵    高级啊

赵龙 发表于 2009-10-10 02:32:18

看不懂啊,说明一下啊

517120890 发表于 2009-10-10 19:02:13

就是 呀   没有说明呀{:7_268:}

0620710304 发表于 2009-10-18 10:25:48

太深奥了,看不懂

wtu403 发表于 2009-11-14 04:15:53

太深奥了,看不懂啊
但还是顶一个
页: [1] 2
查看完整版本: 病***毒程序,仅供研究!