File: fileManager.c1 /* 2 * fileManager.c 3 * 4 * Code generation for function 'fileManager' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "Datalogger4ChConverter_ErrInsensitiveSound.h" 11 #include "fileManager.h" 12 #include "Datalogger4ChConverter_ErrInsensitiveSound_emxutil.h" 13 #include "fread.h" 14 #include "Datalogger4ChConverter_ErrInsensitiveSound_mexutil.h" 15 #include <stdio.h> 16 17 /* Variable Definitions */ 18 static emlrtRSInfo o_emlrtRSI = { 36, "fileManager", 19 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 20 }; 21 22 static emlrtRSInfo u_emlrtRSI = { 23, "fileManager", 23 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 24 }; 25 26 static emlrtMCInfo emlrtMCI = { 101, 14, "fileManager", 27 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 28 }; 29 30 static emlrtMCInfo d_emlrtMCI = { 166, 21, "fileManager", 31 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 32 }; 33 34 static emlrtMCInfo e_emlrtMCI = { 166, 13, "fileManager", 35 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 36 }; 37 38 static emlrtRTEInfo g_emlrtRTEI = { 1, 18, "fileManager", 39 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 40 }; 41 42 static emlrtRSInfo ob_emlrtRSI = { 167, "fileManager", 43 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 44 }; 45 46 static emlrtRSInfo pb_emlrtRSI = { 166, "fileManager", 47 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 48 }; 49 50 static emlrtRSInfo sb_emlrtRSI = { 101, "fileManager", 51 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\iofun\\private\\fileManager.m" 52 }; 53 54 /* Function Declarations */ 55 static const mxArray *c_feval(const emlrtStack *sp, const mxArray *b, const 56 mxArray *c, emlrtMCInfo *location); 57 static boolean_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *failp, 58 const char_T *identifier); 59 static boolean_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, 60 const emlrtMsgIdentifier *parentId); 61 static const mxArray *feval(const emlrtStack *sp, const mxArray *b, const 62 mxArray *c, const mxArray *d, emlrtMCInfo *location); 63 static boolean_T k_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, 64 const emlrtMsgIdentifier *msgId); 65 static const mxArray *logical(const emlrtStack *sp, const mxArray *b, 66 emlrtMCInfo *location); 67 68 /* Function Definitions */ 69 static const mxArray *c_feval(const emlrtStack *sp, const mxArray *b, const 70 mxArray *c, emlrtMCInfo *location) 71 { 72 const mxArray *pArrays[2]; 73 const mxArray *m8; 74 pArrays[0] = b; 75 pArrays[1] = c; 76 return emlrtCallMATLABR2012b(sp, 1, &m8, 2, pArrays, "feval", true, location); 77 } 78 79 static boolean_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *failp, 80 const char_T *identifier) 81 { 82 boolean_T y; 83 emlrtMsgIdentifier thisId; 84 thisId.fIdentifier = identifier; 85 thisId.fParent = NULL; 86 thisId.bParentIsCell = false; 87 y = f_emlrt_marshallIn(sp, emlrtAlias(failp), &thisId); 88 emlrtDestroyArray(&failp); 89 return y; 90 } 91 92 static boolean_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, 93 const emlrtMsgIdentifier *parentId) 94 { 95 boolean_T y; 96 y = k_emlrt_marshallIn(sp, emlrtAlias(u), parentId); 97 emlrtDestroyArray(&u); 98 return y; 99 } 100 101 static const mxArray *feval(const emlrtStack *sp, const mxArray *b, const 102 mxArray *c, const mxArray *d, emlrtMCInfo *location) 103 { 104 const mxArray *pArrays[3]; 105 const mxArray *m6; 106 pArrays[0] = b; 107 pArrays[1] = c; 108 pArrays[2] = d; 109 return emlrtCallMATLABR2012b(sp, 1, &m6, 3, pArrays, "feval", true, location); 110 } 111 112 static boolean_T k_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, 113 const emlrtMsgIdentifier *msgId) 114 { 115 boolean_T ret; 116 static const int32_T dims = 0; 117 emlrtCheckBuiltInR2012b(sp, msgId, src, "logical", false, 0U, &dims); 118 ret = *mxGetLogicals(src); 119 emlrtDestroyArray(&src); 120 return ret; 121 } 122 123 static const mxArray *logical(const emlrtStack *sp, const mxArray *b, 124 emlrtMCInfo *location) 125 { 126 const mxArray *pArray; 127 const mxArray *m9; 128 pArray = b; 129 return emlrtCallMATLABR2012b(sp, 1, &m9, 1, &pArray, "logical", true, location); 130 } 131 132 int32_T b_fileManager(const emlrtStack *sp, real_T varargin_1) 133 { 134 int32_T f; 135 int32_T i5; 136 const mxArray *y; 137 char_T u[6]; 138 static const char_T cv2[6] = { 'f', 'c', 'l', 'o', 's', 'e' }; 139 140 const mxArray *m2; 141 static const int32_T iv7[2] = { 1, 6 }; 142 143 const mxArray *failp = NULL; 144 emlrtStack st; 145 emlrtStack b_st; 146 st.prev = sp; 147 st.tls = sp->tls; 148 st.site = &u_emlrtRSI; 149 b_st.prev = &st; 150 b_st.tls = st.tls; 151 for (i5 = 0; i5 < 6; i5++) { 152 u[i5] = cv2[i5]; 153 } 154 155 y = NULL; 156 m2 = emlrtCreateCharArray(2, iv7); 157 emlrtInitCharArrayR2013a(&st, 6, m2, &u[0]); 158 emlrtAssign(&y, m2); 159 b_st.site = &pb_emlrtRSI; 160 emlrtAssign(&failp, logical(&b_st, c_feval(&b_st, y, emlrt_marshallOut 161 (varargin_1), &d_emlrtMCI), &e_emlrtMCI)); 162 b_st.site = &ob_emlrtRSI; 163 if (e_emlrt_marshallIn(&b_st, emlrtAlias(failp), "failp")) { 164 f = -1; 165 } else { 166 f = 0; 167 } 168 169 emlrtDestroyArray(&failp); 170 return f; 171 } 172 173 real_T fileManager(const emlrtStack *sp, const emxArray_char_T *varargin_1) 174 { 175 real_T f; 176 emxArray_char_T *u; 177 int32_T i3; 178 const mxArray *y; 179 char_T b_u[5]; 180 static const char_T cv0[5] = { 'f', 'o', 'p', 'e', 'n' }; 181 182 const mxArray *m0; 183 static const int32_T iv4[2] = { 1, 5 }; 184 185 int32_T loop_ub; 186 const mxArray *b_y; 187 const mxArray *c_y; 188 emlrtStack st; 189 emlrtStack b_st; 190 st.prev = sp; 191 st.tls = sp->tls; 192 b_st.prev = &st; 193 b_st.tls = st.tls; 194 emlrtHeapReferenceStackEnterFcnR2012b(sp); 195 emxInit_char_T(sp, &u, 2, &g_emlrtRTEI, true); 196 st.site = &o_emlrtRSI; 197 for (i3 = 0; i3 < 5; i3++) { 198 b_u[i3] = cv0[i3]; 199 } 200 201 y = NULL; 202 m0 = emlrtCreateCharArray(2, iv4); 203 emlrtInitCharArrayR2013a(&st, 5, m0, &b_u[0]); 204 emlrtAssign(&y, m0); 205 i3 = u->size[0] * u->size[1]; 206 u->size[0] = 1; 207 u->size[1] = varargin_1->size[1]; 208 emxEnsureCapacity(&st, (emxArray__common *)u, i3, (int32_T)sizeof(char_T), 209 &g_emlrtRTEI); 210 loop_ub = varargin_1->size[0] * varargin_1->size[1]; 211 for (i3 = 0; i3 < loop_ub; i3++) { 212 u->data[i3] = varargin_1->data[i3]; 213 } 214 215 b_y = NULL; 216 m0 = emlrtCreateCharArray(2, *(int32_T (*)[2])u->size); 217 emlrtInitCharArrayR2013a(&st, u->size[1], m0, &u->data[0]); 218 emlrtAssign(&b_y, m0); 219 c_y = NULL; 220 m0 = emlrtCreateString1('r'); 221 emlrtAssign(&c_y, m0); 222 b_st.site = &sb_emlrtRSI; 223 f = emlrt_marshallIn(&b_st, feval(&b_st, y, b_y, c_y, &emlrtMCI), "feval"); 224 emxFree_char_T(&u); 225 emlrtHeapReferenceStackLeaveFcnR2012b(sp); 226 return f; 227 } 228 229 /* End of code generation (fileManager.c) */ 230 |