MCPcopy Create free account
hub / github.com/HelenOS/helenos / file_save

Function file_save

uspace/app/edit/edit.c:901–925  ·  view source on GitHub ↗

Save the document. */

Source from the content-addressed store, hash-verified

899
900/** Save the document. */
901static errno_t file_save(char const *fname)
902{
903 spt_t sp, ep;
904 errno_t rc;
905
906 status_display("Saving...");
907 pt_get_sof(&sp);
908 pt_get_eof(&ep);
909
910 rc = file_save_range(fname, &sp, &ep);
911
912 switch (rc) {
913 case EINVAL:
914 status_display("Error opening file!");
915 break;
916 case EIO:
917 status_display("Error writing data!");
918 break;
919 default:
920 status_display("File saved.");
921 break;
922 }
923
924 return rc;
925}
926
927/** Open Save As dialog. */
928static void file_save_as(void)

Callers 3

key_handle_ctrlFunction · 0.85
edit_file_saveFunction · 0.85
save_as_dialog_bokFunction · 0.85

Calls 4

status_displayFunction · 0.85
pt_get_sofFunction · 0.85
pt_get_eofFunction · 0.85
file_save_rangeFunction · 0.85

Tested by

no test coverage detected