⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system.c

📁 gcc-fortran,linux使用fortran的编译软件。很好用的。
💻 C
字号:
/* Implementation of the SYSTEM intrinsic.   Copyright (C) 2004 Free Software Foundation, Inc.   Contributed by Tobias Schlüter.This file is part of the GNU Fortran 95 runtime library (libgfortran).Libgfortran is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the FreeSoftware Foundation; either version 2, or (at your option) any laterversion.In addition to the permissions in the GNU General Public License, theFree Software Foundation gives you unlimited permission to link thecompiled version of this file into combinations with other programs,and to distribute those combinations without any restriction comingfrom the use of this file.  (The General Public License restrictionsdo apply in other respects; for example, they cover modification ofthe file, and distribution when not linked into a combinedexecutable.)Libgfortran is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public Licensefor more details.You should have received a copy of the GNU General Public Licensealong with libgfortran; see the file COPYING.  If not, write to the FreeSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA02110-1301, USA.  */#include "config.h"#ifdef HAVE_STRING_H#include <string.h>#endif#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#include "libgfortran.h"extern void system_sub (const char *fcmd, GFC_INTEGER_4 * status,			gfc_charlen_type cmd_len);iexport_proto(system_sub);voidsystem_sub (const char *fcmd, GFC_INTEGER_4 *status, gfc_charlen_type cmd_len){  char cmd[cmd_len + 1];  int stat;  memcpy (cmd, fcmd, cmd_len);  cmd[cmd_len] = '\0';  stat = system (cmd);  if (status)    *status = stat;}iexport(system_sub);extern GFC_INTEGER_4 PREFIX(system) (const char *, gfc_charlen_type);export_proto_np(PREFIX(system));GFC_INTEGER_4PREFIX(system) (const char *fcmd, gfc_charlen_type cmd_len){  GFC_INTEGER_4 stat;  system_sub (fcmd, &stat, cmd_len);  return stat;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -