Skip to content

Commit

Permalink
fixed being able to proceed with default config if
Browse files Browse the repository at this point in the history
the user config is enables but the file is not there.
  • Loading branch information
aghontpi committed Mar 21, 2018
1 parent 2d76951 commit 693fd4c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
14 changes: 13 additions & 1 deletion CPrettify.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def execute_(view,edit,region):

print('using ' + file_cfg + ' file')

if not userFoldercheck():

sublime.status_message("Not provided user config file")

flag = 1

return


packageDir=sublime.packages_path()

Expand Down Expand Up @@ -322,6 +330,8 @@ class CprettifyFileCommand(sublime_plugin.TextCommand):

def run(self, edit, **args):

global flag

#process settings, configurations

init()
Expand Down Expand Up @@ -384,7 +394,9 @@ def run(self, edit, **args):

execute_(self.view,edit,sublime.Region(0,self.view.size()))

sublime.status_message("Done.. Foramting")
if flag is 0:

sublime.status_message("Done.. Foramting")



Expand Down
23 changes: 13 additions & 10 deletions lib/abc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,34 @@ char input[11], k1[10], k2[10], temp[11];char LS1[5], LS2[5];
printf("Enter 10 bits input:");
scanf("%s",input);
input[10]='\0';//Applying p10...
for(i=0; i<10; i++){cnt = p10[i]
;temp[i] = input[cnt-1];
}
temp[i]='\0'
;printf("\nYour p10 key is :");
for(i=0; i<10; i++)
{ printf("%d,",p10[i]);}
{cnt = p10[i];
temp[i] = input[cnt-1];}
temp[i]='\0';
printf("\nYour p10 key is :");
for(i=0; i<10; i++)
{
printf("%d,",p10[i]);}
printf("\nBits after p10 :");
puts(temp);//Performing LS-1 on first half of temp
for(i=0; i<5; i++)
{if(i==4)
temp[i]=temp[0];
else
temp[i]=temp[i+1];}
temp[i]=temp[i+1];
}
//Performing LS-1 on second half of temp
for(i=5; i<10; i++)
{if(i==9
)temp[i]=temp[5];
{if(i==9)
temp[i]=temp[5];
else
temp[i]=temp[i+1];}
printf("Output after LS-1 :");
puts(temp);
printf("\nYour p8 key is :");
for(i=0; i<8; i++)
{ printf("%d,",p8[i]);
{
printf("%d,",p8[i]);
}//Applying p8...
for(i=0; i<8; i++)
{cnt = p8[i];
Expand Down

0 comments on commit 693fd4c

Please sign in to comment.