MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / util_GetEditor

Function util_GetEditor

src/tripwire/twcmdline.cpp:2713–2732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2711//================================================================
2712
2713bool util_GetEditor(TSTRING& strEd)
2714{
2715 // see if VISUAL environment var is set
2716 TCHAR* pchEd = _tgetenv(_T("VISUAL"));
2717 if (pchEd != NULL && pchEd[0] != _T('\0'))
2718 {
2719 strEd = pchEd;
2720 return true;
2721 }
2722
2723 // see if EDITOR environment var is set
2724 pchEd = _tgetenv(_T("EDITOR"));
2725 if (pchEd != NULL && pchEd[0] != _T('\0'))
2726 {
2727 strEd = pchEd;
2728 return true;
2729 }
2730
2731 return false;
2732}
2733
2734//Encase the explore and debug modes in this ifdef, since they are for internal
2735//use only.

Callers 1

InitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected