s3: Move "yesno" to the only place where it is used: client.c
authorVolker Lendecke <vl@samba.org>
Thu, 21 Jan 2010 11:57:07 +0000 (12:57 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 21 Jan 2010 11:58:11 +0000 (12:58 +0100)
source3/client/client.c
source3/include/proto.h
source3/lib/util.c

index 504b1dd9b30ba5dcd6d6a6153abdffbc804573f6..f177129dc782cc5920c1e8192ddc5477f1126aa4 100644 (file)
@@ -162,6 +162,24 @@ const char *client_set_cur_dir(const char *newdir)
        return client_get_cur_dir();
 }
 
+/****************************************************************************
+ Put up a yes/no prompt.
+****************************************************************************/
+
+static bool yesno(const char *p)
+{
+       char ans[20];
+       printf("%s",p);
+
+       if (!fgets(ans,sizeof(ans)-1,stdin))
+               return(False);
+
+       if (*ans == 'y' || *ans == 'Y')
+               return(True);
+
+       return(False);
+}
+
 /****************************************************************************
  Write to a local file with CR/LF->LF translation if appropriate. Return the
  number taken from the buffer. This may not equal the number written.
index 8e8b35cb5a2e047b0a5a7be5eefd22941ae8223f..4d5ebca63f3f21cc695302ad5bcce84176274410 100644 (file)
@@ -1140,7 +1140,6 @@ void smb_msleep(unsigned int t);
 NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
                       struct event_context *ev_ctx,
                       bool parent_longlived);
-bool yesno(const char *p);
 void *malloc_(size_t size);
 void *memalign_array(size_t el_size, size_t align, unsigned int count);
 void *calloc_array(size_t size, size_t nmemb);
index 8525d9c919e9f497befd6a2dcfca89f113f5a170..007226b5c9034c0c9d219aebd8647c79bd02f867 100644 (file)
@@ -940,24 +940,6 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
        return status;
 }
 
-/****************************************************************************
- Put up a yes/no prompt.
-****************************************************************************/
-
-bool yesno(const char *p)
-{
-       char ans[20];
-       printf("%s",p);
-
-       if (!fgets(ans,sizeof(ans)-1,stdin))
-               return(False);
-
-       if (*ans == 'y' || *ans == 'Y')
-               return(True);
-
-       return(False);
-}
-
 #if defined(PARANOID_MALLOC_CHECKER)
 
 /****************************************************************************