Lines Matching refs:fp
53 FILE *fp; in readFile() local
58 fp = fopen(filename.c_str(), "r"); in readFile()
59 if (fp != NULL) { in readFile()
60 if ((read = getline(&line, &len, fp)) != -1) { in readFile()
66 fclose(fp); in readFile()
77 FILE *fp; in writeFile() local
80 fp = fopen(filename.c_str(), "w"); in writeFile()
81 if (fp != NULL) { in writeFile()
82 ret = fputs(contents.c_str(), fp); in writeFile()
83 fclose(fp); in writeFile()
143 FILE *fp; in switchToDrp() local
146 fp = fopen(filename.c_str(), "w"); in switchToDrp()
147 if (fp != NULL) { in switchToDrp()
148 int ret = fputs("dual", fp); in switchToDrp()
149 fclose(fp); in switchToDrp()
165 FILE *fp; in switchMode() local
173 fp = fopen(filename.c_str(), "w"); in switchMode()
174 if (fp != NULL) { in switchMode()
180 int ret = fputs(convertRoletoString(newRole).c_str(), fp); in switchMode()
181 fclose(fp); in switchMode()
245 FILE *fp; in switchRole() local
261 fp = fopen(filename.c_str(), "w"); in switchRole()
262 if (fp != NULL) { in switchRole()
263 int ret = fputs(convertRoletoString(newRole).c_str(), fp); in switchRole()
264 fclose(fp); in switchRole()