if (name != doc_name) { if (doc_name != NULL) g_free(doc_name); doc_name = g_strdup(name); }
GUI_load_document(const char* name){  GtkMathView* math_view;  g_return_val_if_fail(name != NULL, -1);  g_return_val_if_fail(main_area != NULL, -1);  g_return_val_if_fail(GTK_IS_MATH_VIEW(main_area), -1);  math_view = GTK_MATH_VIEW(main_area);  if (!gtk_math_view_load(math_view, name)) {    load_error_msg(name);    return -1;  }  gtk_statusbar_pop(GTK_STATUSBAR(status_bar), statusbar_context);  if (strlen(name) > 40) name += strlen(name) - 40;  gtk_statusbar_push(GTK_STATUSBAR(status_bar), statusbar_context, name);      return 0;}