91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 68.75MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2022-11-11
  • 語言: 其他
  • 標簽: OpenGrADS??

資源簡介

OpenGrADS2.1.a2-氣象家園整合版.7z,可用于畫圖,讀取文件等

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#define?MAX_BUF?1024

main?(int?argc?char?*argv[])
{
????
????int???line?i?iflag;
????char??buf[MAX_BUF];
????char??tokbuf[MAX_BUF];??/*?copy?of?buf[]?for?strtok()?to?work?on?*/
????int???f?x?y?scale?ref?dw;
????char??*valp;

????char*?units;
????char*?description;
????char?file_in[70]?file_out[70];
????FILE?*fp_in?*fp_out;

????if?(?argc?!=?2?)
????{
??????printf(“?ERROR:??no?arguments\n“);
??????printf(“?convert???????exit(-1);
????}
????sprintf(file_in“%s.old“argv[1]);
????printf(“?full?input?file?name?=%s\n“?file_in);
????sprintf(file_out“%s“argv[1]);
????printf(“?full?output?file?name?=%s\n“?file_out);
????sprintf(buf?“mv?%s?%s.old\n“?argv[1]?argv[1]);
????system(buf);
????
????if(?(fp_in?=?fopen(?file_in?“r“?))?==?NULL?)
????{
????????sprintf(?buf?“Can‘t?open?input?file?\“%s\“\n“?file_in?);
????????exit(1);
????}
????if(?(fp_out?=?fopen(?file_out?“w“?))?==?NULL?)
????{
????????sprintf(?buf?“Can‘t?open?output?file?\“%s\“\n“?file_in?);
????????exit(1);
????}
????
????for(?line=1;?fgets(?buf?MAX_BUF?fp_in?)?!=?NULL;?line++?)
????{
????????iflag?=?0;
????????valp?=?buf;
????????if(?*valp?==?‘#‘)
????????{
??????????fprintf(fp_out“%s“?buf);
????????}?else?if?(?strlen(buf)?==?1?)?{
??????????fprintf(fp_out“\n“);
????????}else{
??????????/*
??????????*?Since?strtok()?mangles?the?string?it?works?on?let?strtok()?use
??????????*?a?copy?of?buf.
??????????*/

??????????strcpy(?tokbuf?buf?);

??????????/*
??????????*?Trim?trailing?whitespace?in?‘tokbuf‘?(this?makes?it?easier
??????????*?to?get?the?description?later?on).
??????????*/

??????????/*??092997??LAH:?Added?char?cast?to?correct?Linux?warning?*/
??????????/*?100997?LAH:?Added?ulong_t?cast?*/
??????????for(?valp=&tokbuf[strlen(tokbuf)-1];?isspace(?*valp?);?valp--?)
?????????????*valp?=?(char)?NULL;

??????????/*?Get?F?X?and?Y?portion?and?compute?table?location?*/

??????????if(?(valp?=?strtok(?tokbuf?“?-\t“?))?==?NULL?)
??????????{
????????????printf(“Line?%d:?Missing?F?descriptor\n“?line);
????????????iflag?=?1;
??????????}
??????????else
????????????f?=?atoi(?valp?);

??????????if?(iflag?==?0)
??????????{
????????????if(?(valp?=?strtok(?NULL?“?-\t“?))?==?NULL?)
????????????{
??????????????printf(“Line?%d:?Missing?X?descriptor\n“?line);
??????????????iflag?=1;
???????????
????????????}
????????????else
??????????????x?=?atoi(?valp?);
??????????}

??????????if?(?iflag?==?0)
??????????{
????????????if(?(valp?=?strtok(?NULL?“?\t“?))?==?NULL?)
????????????{
??????????????printf(“%Line?%d:?Missing?Y?descriptor\n“?line);
??????????????iflag?=?1;
????????????}
????????????else
?????????????y?=?atoi(?valp?);
??????????}

??????????
/*?Check?for?descriptor?duplication.?*/
??????????if?(iflag?==?0?)
??????????{
?????? ????if(?(valp?=?strtok(?NULL?“?\t“?))?==?NULL?)
????????????{
??????????????printf(“Line?%d:?Missing?Scale?value\n“?line);
????????????}?else
??????????????

評論

共有 條評論

相關資源