none
请问这个方法怎么用啊? RRS feed

  • 问题

  • /***************************************************************************
     * msr_writemseed:
     *
     * Pack MSRecord data into Mini-SEED record(s) by calling msr_pack() and
     * write to a specified file.
     *
     * Returns the number of records written on success and -1 on error.
     ***************************************************************************/

    msr_writemseed (MSRecord *msr, const char *msfile, flag overwrite, int reclen, flag encoding, flag byteorder, flag verbose) { FILE *ofp; char srcname[50]; char *perms = (overwrite) ? "wb" : "ab"; int packedrecords = 0; if (!msr || !msfile) return -1; /* Open output file or use stdout */ if (strcmp (msfile, "-") == 0) { ofp = stdout; } else if ((ofp = fopen (msfile, perms)) == NULL) { ms_log (1, "Cannot open output file %s: %s\n", msfile, strerror (errno)); return -1; } /* Pack the MSRecord */ if (msr->numsamples > 0) { msr->encoding = encoding; msr->reclen = reclen; msr->byteorder = byteorder; packedrecords = msr_pack (msr, &ms_record_handler_int, ofp, NULL, 1, verbose - 1); if (packedrecords < 0) { msr_srcname (msr, srcname, 1); ms_log (1, "Cannot write Mini-SEED for %s\n", srcname); } } /* Close file and return record count */ fclose (ofp); return (packedrecords >= 0) ? packedrecords : -1; } /* End of msr_writemseed() */

    这段代码用c#表示,是什么意思啊?

    please verify my account

    2017年11月29日 4:55

全部回复

  • Hi,

    欢迎在MSDN论坛发帖。

    /***************************************************************************
     * msr_writemseed:
     *
     * Pack MSRecord data into Mini-SEED record(s) by calling msr_pack() and
     * write to a specified file.
     *
     * Returns the number of records written on success and -1 on error.

    根据这个注释来看,这个函数应该是MS的数据写道mini-SEED中,然后返回值是是写入的数据大小,如果失败返回-1.

    你使用这个代码出现了什么错误了吗? 能否提供详细的信息,这样方便解决问题。

    根据你的描述你的问题貌似和开发没什么关系。

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2017年11月29日 8:43
    版主