00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 #include <stdio.h>
00027 
00028 
00029 
00030 
00031 
00032 void myputc(c, l)
00033 char *c;
00034 long l;
00035 {
00036     putchar(*c);
00037     fflush(stdout);
00038 }
00039 
00040 void myputc_(c, l)
00041 char *c;
00042 long l;
00043 {
00044     myputc(c, l);
00045 }
00046 
00047 void mygetc(c, l)
00048 char *c;
00049 long l;
00050 {
00051     *c = getchar();
00052 }
00053 
00054 void mygetc_(c, l)
00055 char *c;
00056 long l;
00057 {
00058     mygetc(c, l);
00059 }
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 void cflush()
00075 {
00076     fflush(stdout);
00077 }
00078 
00079 void cflush_()
00080 {
00081     cflush();
00082 }
00083 
00084 #include <stdlib.h>
00085 
00086 
00087 
00088 
00089 
00090 
00091 void cgetenv(name, value, ln, lv)
00092 char *name, *value;
00093 long ln, lv;
00094 {
00095     int i;
00096     char *c;
00097     char temp[100];
00098 
00099     
00100 
00101     for (i = 0; i < ln; i++) temp[i] = name[i];
00102     temp[ln] = '\0';
00103 
00104     lv = 0;
00105     value[0] = '\0';
00106 
00107     if ( c = getenv(temp) )
00108       do {value[lv++] = *c;} while ( *(++c) > '\0' );
00109 }
00110 
00111 void cgetenv_(name, value, ln, lv)
00112 char *name, *value;
00113 long ln, lv;
00114 {
00115     cgetenv(name, value, ln, lv);
00116 }
00117 
00118 
00119 
00120 
00121 
00122 
00123 int csystem(string, length)
00124 char *string;
00125 long int length;
00126 {
00127     char *str;
00128     int i;
00129     
00130     str = (char*) malloc(length+1);
00131     for (i = 0; i < length; i++) str[i] = string[i];
00132     str[length] = '\0';
00133 
00134     return system(str);
00135 }
00136 
00137 int csystem_(string, length)
00138 char *string;
00139 long int length;
00140 {
00141     csystem(string, length);
00142 }
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 uwait(iwait)
00151 int *iwait;
00152 {
00153 #ifdef HAS_USLEEP
00154     usleep (*iwait);
00155 #endif
00156 }
00157 
00158 uwait_(iwait)
00159 int *iwait;
00160 {
00161     uwait(iwait);
00162 }