User login

Navigation

You are here

honeycomb material

Dear members,

https://www.hlrn.de/home/view/System/STAR-CD#5_Online_Documentation

http://www.smbc.co.jp/kojin/kinri/chart.html

· 。 ° · 。 · ˚ ˚ ˛ ˚ ˛
。° 。 ° 。˚ ˛ · ˚ ˚ ˛
*★MERRY★* 。 · ˚ ˚ ˛ ˚ ˛ · ·
。CHRISTMAS 。* 。° 。 ° ˛ ˚ ˛
* _Π____*。*˚ ˚ ˛ ˚ ˛ ·˛ ·˚
*/_____/~\。˚ ˚ ˛ ˚ ˛ ·˛ ·˚
| 田田 |門| ˚ ˛ ˚ ˛ ·
Merry Christmas and Happy New Year!!!

And then, i want to know the properties of honeycomb material, so would you please sent to me somes documents which related to this material.

 

/* A simple grep by Mac OSX
* file name: gunofkid.c
* compile: gcc gunofkid.c
* execution: ./a.out 'key word' <file1 <file2 <file...>>>
*/

#include <stdio.h>
#include <string.h> // strstr()
#include <stdlib.h> // exit()

#define SIZE 256

char *grep (char *paten, char *moji);
char *cut (char *paten, char *field, char *moji);

//int main(int argc, char *argv[]) {
int main() {

 char *cut_chek;
 int line;
 char *file_name, read_buff[SIZE];
 FILE *fp;

 char *grep_chek;
 char *key_word = "A";
    file_name = "greptest";

 // 任意ファイルを開く
 fp = fopen(file_name, "r");
 if (fp == NULL) {
  printf("%s file not found.\n", file_name);
  exit(1);
 }
 line = 0;
  fgets(read_buff, SIZE, fp);
  while (!feof(fp)) {
   line += 1;
   grep_chek = grep(key_word, read_buff);
   if (grep_chek != NULL){
    //printf("%s",grep_chek);
    char *cut_chek = cut(" ", "4", grep_chek);
    printf("%s", cut_chek);
                printf("\n");
   }

   fgets(read_buff, SIZE, fp);
  }
 
 system("pause");

return 0;
}

char *grep (char *paten, char *moji)
{
 if (strstr(moji, paten) != NULL){
        return moji;
 } else{
        return 0;
 }
}

char *cut (char *paten, char *field, char *moji)
{
   char rst[20]="";
   int cont;
   char buff1[10];   //第1引数のために使用するグループ
   char *pb1;
   char buff2[10];   //第2引数のために使用するグループ 
   char *pb2;
   int i;
   char buff3[256];   //第3引数のために使用するグループ
   char *pb3;
   char temp[256];   //繰り返し処理のために使用するグループ
   char *iii;

      /*****  第2引数から数字を変換、最終的に i に代入される、なんか納得いかない処理  ******/
   pb2 = buff2;
   //strcpy(pb2,argv[2]);
   strcpy(pb2,field);
   i = (buff2[0] - 48);   //'0'の文字コードが48なので
   // printf("第2引数の数字: %d\n",i);


   pb1 = buff1;
   strcpy(pb1,paten);   //ポインタの初期化と引数1の前処理

   cont = 1;

   if(i != cont)
   {
    pb3 = buff3;
    strcpy(pb3,moji);   //ポインタの初期化と引数3の前処理 (第2引数が2以上の場合)

    iii = temp;         //第2引数が2以上の場合の場合の1回目のソート
    iii = strstr(buff3,buff1);
    ++iii;
    ++cont;
   }else
   {
    iii = temp;      //ポインタの初期化と引数3の前処理 (第2引数が1の場合)
    strcpy(iii,moji);
   }
  
   /***** 第2引数が2以上の場合の場合の2回目以降のソート *****/
   while(i > cont){
      strcpy(pb3,iii);
      iii = strstr(buff3,buff1);
      ++iii;
      ++cont;
   }

   //最終処理
   // 例: #cut-simple A 2 xxxAyyyyAzzzzA    ならばこの時点で yyyyAzzzzA までソートされている
   while(*iii != *pb1 ){
      if (iii != NULL || iii != "\\n")
      strcat(rst, iii);
      //printf("%c",*iii);   // ↑の例だとAに出会うまで1文字づつ出力
      ++iii;
   }
  
   // ↑の例だと最終的に yyyy が出力される
   //printf("\n ");
   return rst;
}

/*
char *grep (char *paten, char *file)
{
 int line;
 char *file_name, *key_word, read_buff[SIZE];
 FILE *fp;
       
  /\ 任意ファイルを開く
  file_name = file;
  fp = fopen(file_name, "r");
  if (fp == NULL) {
   printf("%s file not found.\n", file_name);
   exit(1);
  }

  // メイン・プログラム部
  key_word = paten;
  line = 0;
  fgets(read_buff, SIZE, fp);
  while (!feof(fp)) {
   line += 1;
   if (strstr(read_buff, key_word) != NULL)
   printf("%s %d: %s", file_name, line, read_buff);
   
   fgets(read_buff, SIZE, fp);
  }

  // 任意ファイルを閉じる
  fclose(fp);

        return 0;
}
*/

Thanks,

Subscribe to Comments for "honeycomb material"

Recent comments

More comments

Syndicate

Subscribe to Syndicate