aboutsummaryrefslogtreecommitdiff
path: root/messageWind.c
diff options
context:
space:
mode:
Diffstat (limited to 'messageWind.c')
-rw-r--r--messageWind.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/messageWind.c b/messageWind.c
index 73d1182..5b71b5e 100644
--- a/messageWind.c
+++ b/messageWind.c
@@ -6,7 +6,6 @@
extern contact* contactList;
extern size_t nbContacts;
-
conversation* currentConv;
int x_WMessage = 1,y_WMessage = 1;
@@ -127,6 +126,16 @@ void showMessageWind(void) {
}
+int searchSMS( const char* toSearch ) {
+ if( !currentConv )
+ return -1;
+ for(int i = firstSMSIndex - 1; i >= 0 ; --i) {
+ if(strstr(currentConv->listSMS[i].text, toSearch) != NULL)
+ return i;
+ }
+
+ return -1;
+}