Revision: 42144
http://brlcad.svn.sourceforge.net/brlcad/?rev=42144&view=rev
Author: starseeker
Date: 2011-01-12 15:46:02 +0000 (Wed, 12 Jan 2011)
Log Message:
-----------
We can trust bu_wish not to return \0, so we don't need that check there. May
not need it anywhere, but we are getting returns from other functions early on
so would need more careful checking. Also remove the useless strcmp for editor
just after setting it to emacs.
Modified Paths:
--------------
brlcad/trunk/src/mged/tedit.c
Modified: brlcad/trunk/src/mged/tedit.c
===================================================================
--- brlcad/trunk/src/mged/tedit.c 2011-01-12 15:45:59 UTC (rev 42143)
+++ brlcad/trunk/src/mged/tedit.c 2011-01-12 15:46:02 UTC (rev 42144)
@@ -911,22 +911,22 @@
}
/* still unset? try vim */
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(VIM_EDITOR);
}
/* still unset? try vi */
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(VI_EDITOR);
}
/* still unset? try ed */
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(ED_EDITOR);
}
/* still unset? default to jove */
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
const char *jovepath = bu_brlcad_root("bin/jove", 1);
editor = JOVE_EDITOR;
if (jovepath) {
@@ -991,19 +991,19 @@
/* start with emacs... */
editor = bu_which(EMACS_EDITOR);
/* if emacs is found, set editor_opt */
- if (editor && !strcmp(editor, bu_which(EMACS_EDITOR))) {
+ if (editor) {
editor_opt = "-nw";
}
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(VIM_EDITOR);
}
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(VI_EDITOR);
}
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
editor = bu_which(ED_EDITOR);
}
- if (!editor || editor[0] == '\0') {
+ if (!editor) {
const char *binpath = bu_brlcad_root("bin", 1);
editor = JOVE_EDITOR;
if (binpath) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits